mkamsboot: supports Fuze firmwares

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18936 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2008-10-30 20:00:56 +00:00
parent ee378abe63
commit 29a5373724
3 changed files with 30 additions and 7 deletions

View file

@ -10,8 +10,8 @@ LIBUCL=../../tools/ucl/src/libucl.a
# #
# If anyone reading this wants to improve this makefile, please do! # If anyone reading this wants to improve this makefile, please do!
BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o bootimg_fuze.o
BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h bootimg_fuze.h
CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \ CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \
dualboot-clip.bin bootimg_clip.c bootimg_clip.h 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 \ M200V2FILES = dualboot-m200v2.o dualboot-m200v2.elf dualboot-m200v2.o \
dualboot-m200v2.bin bootimg_m200v2.c bootimg_m200v2.h 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 all: mkamsboot
$(LIBUCL): $(LIBUCL):
@ -56,6 +59,23 @@ bootimg_clip.c bootimg_clip.h: dualboot-clip.bin bin2c
bootimg_clip.o: bootimg_clip.c bootimg_clip.o: bootimg_clip.c
gcc -c -o 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 # E200V2
dualboot-e200v2.o: dualboot.S dualboot-e200v2.o: dualboot.S
@ -114,4 +134,4 @@ bin2c: bin2c.c
clean: clean:
rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \ rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \
bin2c uclimg.c uclimg.h uclimg.o md5.o \ bin2c uclimg.c uclimg.h uclimg.o md5.o \
$(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES) $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES) $(FUZEFILES)

View file

@ -132,6 +132,8 @@ uclcopy:
/* check value read (0 means button pressed) */ /* check value read (0 means button pressed) */
cmp r2, #0 cmp r2, #0
beq boot_of beq boot_of
#elif defined(SANSA_FUZE)
/* no pinout known except A3 */
#else #else
#error No target-specific key check defined! #error No target-specific key check defined!
#endif #endif

View file

@ -91,6 +91,7 @@ execution to the uncompressed firmware.
#include "bootimg_clip.h" #include "bootimg_clip.h"
#include "bootimg_e200v2.h" #include "bootimg_e200v2.h"
#include "bootimg_fuze.h"
#include "bootimg_m200v2.h" #include "bootimg_m200v2.h"
/* Win32 compatibility */ /* Win32 compatibility */
@ -125,7 +126,7 @@ static const char* model_names[] =
static const unsigned char* bootloaders[] = static const unsigned char* bootloaders[] =
{ {
NULL, bootimg_fuze,
bootimg_clip, bootimg_clip,
NULL, NULL,
bootimg_e200v2, bootimg_e200v2,
@ -135,7 +136,7 @@ static const unsigned char* bootloaders[] =
static const int bootloader_sizes[] = static const int bootloader_sizes[] =
{ {
0, sizeof(bootimg_fuze),
sizeof(bootimg_clip), sizeof(bootimg_clip),
0, 0,
sizeof(bootimg_e200v2), sizeof(bootimg_e200v2),
@ -147,7 +148,7 @@ static const int bootloader_sizes[] =
-add parameter to the "scramble" tool */ -add parameter to the "scramble" tool */
static const char* rb_model_names[] = static const char* rb_model_names[] =
{ {
NULL, "fuze",
"clip", "clip",
NULL, NULL,
"e2v2", "e2v2",
@ -159,7 +160,7 @@ static const char* rb_model_names[] =
".sansa" files - these are the same as MODEL_NUMBER in config-target.h */ ".sansa" files - these are the same as MODEL_NUMBER in config-target.h */
static const int rb_model_num[] = static const int rb_model_num[] =
{ {
0, 43,
40, 40,
0, 0,
41, 41,