1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

working fat reader

This commit is contained in:
Bas Wijnen
2010-06-22 20:55:02 +02:00
parent 8968030551
commit a277156a2e
16 changed files with 570 additions and 308 deletions

View File

@@ -18,7 +18,6 @@
load = 0x80000000
UDC_BOOT=1
ARCH_CXXFLAGS = -DNUM_THREADS=2
ARCH_CPPFLAGS = -I. -Imips -Imips/nanonote -Wa,-mips32 -DNANONOTE -DUSE_SERIAL
CROSS = mipsel-linux-gnu-
OBJDUMP = $(CROSS)objdump
@@ -32,18 +31,23 @@ arch_headers = mips/arch.hh mips/nanonote/jz4740.hh mips/nanonote/board.hh
udc_boot_programs = udc
sd_boot_programs = sd+mmc partition fat
standard_boot_programs = bootinit
ifdef UDC_BOOT
boot_threads = $(standard_boot_programs) $(udc_boot_programs)
threadlist = mips/nanonote/threadlist-udc
INIT_FLAGS = -DUDC_BOOT
else
boot_threads = $(standard_boot_programs) $(sd_boot_programs)
threadlist = mips/nanonote/threadlist-sd
INIT_FLAGS = -DSD_BOOT
endif
programs = init gpio lcd bsquare ball buzzer metronome elfrun alarm gui nand test $(udc_boot_programs) $(sd_boot_programs) $(standard_boot_programs)
ifdef UDC_BOOT
boot_threads = $(standard_boot_programs) $(udc_boot_programs)
threadlist = mips/nanonote/threadlist-udc
ARCH_CXXFLAGS = -DNUM_THREADS=2
all: test
else
boot_threads = $(standard_boot_programs) $(sd_boot_programs)
threadlist = mips/nanonote/threadlist-sd
ARCH_CXXFLAGS = -DNUM_THREADS=4
all: iris-sd.tar
iris-sd.tar: $(addprefix fs/,$(addsuffix .elf,$(programs))) iris.raw init.config
mkimage -a $(load) -e a$(shell /bin/sh -c '$(OBJDUMP) -t iris.elf | grep __start$$ | cut -b2-8') -n Iris -d iris.raw fs/uimage | sed -e 's/:/;/g'
cd fs && tar cvf ../$@ uimage init.config $(addsuffix .elf,$(programs)) --dereference
endif
test: iris.raw mips/nanonote/server/usb-server mips/nanonote/sdram-setup.raw $(addsuffix .elf,$(addprefix fs/,$(programs))) fs/init.config
echo "reboot 0xa$(shell /bin/sh -c '$(OBJDUMP) -t iris.elf | grep __start$$ | cut -b2-8')" | nc localhost 5050
@@ -66,7 +70,7 @@ mips/nanonote/sdram-setup.elf: mips/nanonote/sdram-setup.ld
mips/nanonote/sdram-setup.elf: LDFLAGS = --omagic -T mips/nanonote/sdram-setup.ld
$(threadlist).o: $(addprefix fs/,$(addsuffix .elf,$(boot_threads)))
mips/boot.o: TARGET_FLAGS = -DMEMORY_SIZE="32 << 20"
mips/init.o: TARGET_FLAGS = -I/usr/include $(INIT_FLAGS)
mips/init.o: TARGET_FLAGS = -I/usr/include
source/bootinit.o: TARGET_FLAGS = -I/usr/include
source/elfrun.o: TARGET_FLAGS = -I/usr/include
source/gpio.ccp: source/nanonote-gpio.ccp

View File

@@ -322,7 +322,6 @@ static void dump_devices ():
std::cerr << "\nSetting: " << Iris::Setting::ID
std::cerr << "\nDirectory: " << Iris::Directory::ID
std::cerr << "\nWDirectory: " << Iris::WDirectory::ID
std::cerr << "\nFilesystem: " << Iris::Filesystem::ID
std::cerr << "\nStream: " << Iris::Stream::ID
std::cerr << "\n"

View File

@@ -21,11 +21,11 @@
.balign 0x1000
thread0:
.incbin "bootinit.elf"
.incbin "fs/bootinit.elf"
.balign 0x1000
thread1:
.incbin "udc.elf"
.incbin "fs/udc.elf"
.balign 0x1000
thread2: