diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2008-10-30 20:00:56 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2008-10-30 20:00:56 +0000 |
commit | 29a5373724d143d2629cafd8cc0c1961546c1bd6 (patch) | |
tree | 3b79dbdea69c1b3e81c6c1b9132609d35f62baca | |
parent | ee378abe636a99a86cd9a6b98f37c667bca1bd8f (diff) |
mkamsboot: supports Fuze firmwares
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18936 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | rbutil/mkamsboot/Makefile | 26 | ||||
-rw-r--r-- | rbutil/mkamsboot/dualboot.S | 2 | ||||
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.c | 9 |
3 files changed, 30 insertions, 7 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile index ea8ca274c3..93a25aee00 100644 --- a/rbutil/mkamsboot/Makefile +++ b/rbutil/mkamsboot/Makefile @@ -10,8 +10,8 @@ LIBUCL=../../tools/ucl/src/libucl.a # # If anyone reading this wants to improve this makefile, please do! -BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o -BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h +BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o bootimg_fuze.o +BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h bootimg_fuze.h CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \ dualboot-clip.bin bootimg_clip.c bootimg_clip.h @@ -22,6 +22,9 @@ E200V2FILES = dualboot-e200v2.o dualboot-e200v2.elf dualboot-e200v2.o \ M200V2FILES = dualboot-m200v2.o dualboot-m200v2.elf dualboot-m200v2.o \ dualboot-m200v2.bin bootimg_m200v2.c bootimg_m200v2.h +FUZEFILES = dualboot-fuze.o dualboot-fuze.elf dualboot-fuze.o \ + dualboot-fuze.bin bootimg_fuze.c bootimg_fuze.h + all: mkamsboot $(LIBUCL): @@ -56,6 +59,23 @@ bootimg_clip.c bootimg_clip.h: dualboot-clip.bin bin2c bootimg_clip.o: bootimg_clip.c gcc -c -o bootimg_clip.o bootimg_clip.c +# FUZE + +dualboot-fuze.o: dualboot.S + arm-elf-gcc -DSANSA_FUZE -c -o dualboot-fuze.o dualboot.S + +dualboot-fuze.elf: dualboot-fuze.o + arm-elf-ld -e 0 -Ttext=0 -o dualboot-fuze.elf dualboot-fuze.o + +dualboot-fuze.bin: dualboot-fuze.elf + arm-elf-objcopy -O binary dualboot-fuze.elf dualboot-fuze.bin + +bootimg_fuze.c bootimg_fuze.h: dualboot-fuze.bin bin2c + ./bin2c dualboot-fuze.bin bootimg_fuze + +bootimg_fuze.o: bootimg_fuze.c + gcc -c -o bootimg_fuze.o bootimg_fuze.c + # E200V2 dualboot-e200v2.o: dualboot.S @@ -114,4 +134,4 @@ bin2c: bin2c.c clean: rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \ bin2c uclimg.c uclimg.h uclimg.o md5.o \ - $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES) + $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES) $(FUZEFILES) diff --git a/rbutil/mkamsboot/dualboot.S b/rbutil/mkamsboot/dualboot.S index 4fac02f010..e3033de3fb 100644 --- a/rbutil/mkamsboot/dualboot.S +++ b/rbutil/mkamsboot/dualboot.S @@ -132,6 +132,8 @@ uclcopy: /* check value read (0 means button pressed) */ cmp r2, #0 beq boot_of +#elif defined(SANSA_FUZE) + /* no pinout known except A3 */ #else #error No target-specific key check defined! #endif diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c index f2fc8195bc..476bdf2158 100644 --- a/rbutil/mkamsboot/mkamsboot.c +++ b/rbutil/mkamsboot/mkamsboot.c @@ -91,6 +91,7 @@ execution to the uncompressed firmware. #include "bootimg_clip.h" #include "bootimg_e200v2.h" +#include "bootimg_fuze.h" #include "bootimg_m200v2.h" /* Win32 compatibility */ @@ -125,7 +126,7 @@ static const char* model_names[] = static const unsigned char* bootloaders[] = { - NULL, + bootimg_fuze, bootimg_clip, NULL, bootimg_e200v2, @@ -135,7 +136,7 @@ static const unsigned char* bootloaders[] = static const int bootloader_sizes[] = { - 0, + sizeof(bootimg_fuze), sizeof(bootimg_clip), 0, sizeof(bootimg_e200v2), @@ -147,7 +148,7 @@ static const int bootloader_sizes[] = -add parameter to the "scramble" tool */ static const char* rb_model_names[] = { - NULL, + "fuze", "clip", NULL, "e2v2", @@ -159,7 +160,7 @@ static const char* rb_model_names[] = ".sansa" files - these are the same as MODEL_NUMBER in config-target.h */ static const int rb_model_num[] = { - 0, + 43, 40, 0, 41, |