1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2024-12-28 12:39:52 +02:00

small fixes

This commit is contained in:
Bas Wijnen 2010-10-10 22:49:24 +02:00
parent b756006112
commit 6022307d82
2 changed files with 7 additions and 5 deletions

View File

@ -59,7 +59,9 @@ ifneq ($(UNBRICK),)
boot_threads = $(standard_boot_programs) $(unbrick_boot_programs)
ARCH_CXXFLAGS = -DNUM_THREADS=3
BOOT_CPPFLAGS = -DUNBRICK
all: mips/nanonote/nand-boot.raw iris.raw unbrick
all: stage1.raw iris.raw unbrick
stage1.raw: mips/nanonote/sdram-setup.raw
cp $< $@
mips/start.o: TARGET =
unbrick: mips/nanonote/unbrick.cc
g++ -Wall -Wextra -Werror `pkg-config --cflags --libs shevek` -lusb $< -o $@

View File

@ -94,12 +94,12 @@ void boot (std::string const &filename, unsigned load, unsigned entry):
if !handle:
std::cerr << "unable to find device\n"
return
std::cerr << "sending stage 1\n"
std::ifstream file (STAGE1_FILE)
std::ostringstream stage1
stage1 << file.rdbuf ()
std::cerr << shevek::ostring ("sending stage 1 (size %x) @%x\n", stage1.str ().size (), STAGE1_LOAD)
send_file (STAGE1_LOAD, stage1.str ().size (), stage1.str ().data ())
std::cerr << "running stage 1\n"
std::cerr << shevek::ostring ("running stage 1 @%x\n", STAGE1_ENTRY)
request (VR_PROGRAM_START1, STAGE1_ENTRY)
usleep (100)
std::ostringstream stage2
@ -107,11 +107,11 @@ void boot (std::string const &filename, unsigned load, unsigned entry):
file.close ()
file.open (filename.c_str ())
stage2 << file.rdbuf ()
std::cerr << shevek::ostring ("sending Iris (size 0x%x)\n", stage2.str ().size ())
std::cerr << shevek::ostring ("sending Iris (size 0x%x) @%x\n", stage2.str ().size (), load)
send_file (load, stage2.str ().size (), stage2.str ().data ())
std::cerr << "flushing caches\n"
request (VR_FLUSH_CACHES)
std::cerr << "running Iris\n"
std::cerr << shevek::ostring ("running Iris @%x\n", entry)
request (VR_PROGRAM_START2, entry)
usb_release_interface (handle, 0)
usb_close (handle)