mirror of
git://projects.qi-hardware.com/iris.git
synced 2024-12-29 19:44:16 +02:00
small fixes
This commit is contained in:
parent
b756006112
commit
6022307d82
@ -59,7 +59,9 @@ ifneq ($(UNBRICK),)
|
|||||||
boot_threads = $(standard_boot_programs) $(unbrick_boot_programs)
|
boot_threads = $(standard_boot_programs) $(unbrick_boot_programs)
|
||||||
ARCH_CXXFLAGS = -DNUM_THREADS=3
|
ARCH_CXXFLAGS = -DNUM_THREADS=3
|
||||||
BOOT_CPPFLAGS = -DUNBRICK
|
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 =
|
mips/start.o: TARGET =
|
||||||
unbrick: mips/nanonote/unbrick.cc
|
unbrick: mips/nanonote/unbrick.cc
|
||||||
g++ -Wall -Wextra -Werror `pkg-config --cflags --libs shevek` -lusb $< -o $@
|
g++ -Wall -Wextra -Werror `pkg-config --cflags --libs shevek` -lusb $< -o $@
|
||||||
|
@ -94,12 +94,12 @@ void boot (std::string const &filename, unsigned load, unsigned entry):
|
|||||||
if !handle:
|
if !handle:
|
||||||
std::cerr << "unable to find device\n"
|
std::cerr << "unable to find device\n"
|
||||||
return
|
return
|
||||||
std::cerr << "sending stage 1\n"
|
|
||||||
std::ifstream file (STAGE1_FILE)
|
std::ifstream file (STAGE1_FILE)
|
||||||
std::ostringstream stage1
|
std::ostringstream stage1
|
||||||
stage1 << file.rdbuf ()
|
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 ())
|
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)
|
request (VR_PROGRAM_START1, STAGE1_ENTRY)
|
||||||
usleep (100)
|
usleep (100)
|
||||||
std::ostringstream stage2
|
std::ostringstream stage2
|
||||||
@ -107,11 +107,11 @@ void boot (std::string const &filename, unsigned load, unsigned entry):
|
|||||||
file.close ()
|
file.close ()
|
||||||
file.open (filename.c_str ())
|
file.open (filename.c_str ())
|
||||||
stage2 << file.rdbuf ()
|
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 ())
|
send_file (load, stage2.str ().size (), stage2.str ().data ())
|
||||||
std::cerr << "flushing caches\n"
|
std::cerr << "flushing caches\n"
|
||||||
request (VR_FLUSH_CACHES)
|
request (VR_FLUSH_CACHES)
|
||||||
std::cerr << "running Iris\n"
|
std::cerr << shevek::ostring ("running Iris @%x\n", entry)
|
||||||
request (VR_PROGRAM_START2, entry)
|
request (VR_PROGRAM_START2, entry)
|
||||||
usb_release_interface (handle, 0)
|
usb_release_interface (handle, 0)
|
||||||
usb_close (handle)
|
usb_close (handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user