diff options
Diffstat (limited to 'rbutil')
-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 | |||
10 | # | 10 | # |
11 | # If anyone reading this wants to improve this makefile, please do! | 11 | # If anyone reading this wants to improve this makefile, please do! |
12 | 12 | ||
13 | BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o | 13 | BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o bootimg_fuze.o |
14 | BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h | 14 | BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h bootimg_fuze.h |
15 | 15 | ||
16 | CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \ | 16 | CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \ |
17 | dualboot-clip.bin bootimg_clip.c bootimg_clip.h | 17 | dualboot-clip.bin bootimg_clip.c bootimg_clip.h |
@@ -22,6 +22,9 @@ E200V2FILES = dualboot-e200v2.o dualboot-e200v2.elf dualboot-e200v2.o \ | |||
22 | M200V2FILES = dualboot-m200v2.o dualboot-m200v2.elf dualboot-m200v2.o \ | 22 | M200V2FILES = dualboot-m200v2.o dualboot-m200v2.elf dualboot-m200v2.o \ |
23 | dualboot-m200v2.bin bootimg_m200v2.c bootimg_m200v2.h | 23 | dualboot-m200v2.bin bootimg_m200v2.c bootimg_m200v2.h |
24 | 24 | ||
25 | FUZEFILES = dualboot-fuze.o dualboot-fuze.elf dualboot-fuze.o \ | ||
26 | dualboot-fuze.bin bootimg_fuze.c bootimg_fuze.h | ||
27 | |||
25 | all: mkamsboot | 28 | all: mkamsboot |
26 | 29 | ||
27 | $(LIBUCL): | 30 | $(LIBUCL): |
@@ -56,6 +59,23 @@ bootimg_clip.c bootimg_clip.h: dualboot-clip.bin bin2c | |||
56 | bootimg_clip.o: bootimg_clip.c | 59 | bootimg_clip.o: bootimg_clip.c |
57 | gcc -c -o bootimg_clip.o bootimg_clip.c | 60 | gcc -c -o bootimg_clip.o bootimg_clip.c |
58 | 61 | ||
62 | # FUZE | ||
63 | |||
64 | dualboot-fuze.o: dualboot.S | ||
65 | arm-elf-gcc -DSANSA_FUZE -c -o dualboot-fuze.o dualboot.S | ||
66 | |||
67 | dualboot-fuze.elf: dualboot-fuze.o | ||
68 | arm-elf-ld -e 0 -Ttext=0 -o dualboot-fuze.elf dualboot-fuze.o | ||
69 | |||
70 | dualboot-fuze.bin: dualboot-fuze.elf | ||
71 | arm-elf-objcopy -O binary dualboot-fuze.elf dualboot-fuze.bin | ||
72 | |||
73 | bootimg_fuze.c bootimg_fuze.h: dualboot-fuze.bin bin2c | ||
74 | ./bin2c dualboot-fuze.bin bootimg_fuze | ||
75 | |||
76 | bootimg_fuze.o: bootimg_fuze.c | ||
77 | gcc -c -o bootimg_fuze.o bootimg_fuze.c | ||
78 | |||
59 | # E200V2 | 79 | # E200V2 |
60 | 80 | ||
61 | dualboot-e200v2.o: dualboot.S | 81 | dualboot-e200v2.o: dualboot.S |
@@ -114,4 +134,4 @@ bin2c: bin2c.c | |||
114 | clean: | 134 | clean: |
115 | rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \ | 135 | rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \ |
116 | bin2c uclimg.c uclimg.h uclimg.o md5.o \ | 136 | bin2c uclimg.c uclimg.h uclimg.o md5.o \ |
117 | $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES) | 137 | $(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: | |||
132 | /* check value read (0 means button pressed) */ | 132 | /* check value read (0 means button pressed) */ |
133 | cmp r2, #0 | 133 | cmp r2, #0 |
134 | beq boot_of | 134 | beq boot_of |
135 | #elif defined(SANSA_FUZE) | ||
136 | /* no pinout known except A3 */ | ||
135 | #else | 137 | #else |
136 | #error No target-specific key check defined! | 138 | #error No target-specific key check defined! |
137 | #endif | 139 | #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. | |||
91 | 91 | ||
92 | #include "bootimg_clip.h" | 92 | #include "bootimg_clip.h" |
93 | #include "bootimg_e200v2.h" | 93 | #include "bootimg_e200v2.h" |
94 | #include "bootimg_fuze.h" | ||
94 | #include "bootimg_m200v2.h" | 95 | #include "bootimg_m200v2.h" |
95 | 96 | ||
96 | /* Win32 compatibility */ | 97 | /* Win32 compatibility */ |
@@ -125,7 +126,7 @@ static const char* model_names[] = | |||
125 | 126 | ||
126 | static const unsigned char* bootloaders[] = | 127 | static const unsigned char* bootloaders[] = |
127 | { | 128 | { |
128 | NULL, | 129 | bootimg_fuze, |
129 | bootimg_clip, | 130 | bootimg_clip, |
130 | NULL, | 131 | NULL, |
131 | bootimg_e200v2, | 132 | bootimg_e200v2, |
@@ -135,7 +136,7 @@ static const unsigned char* bootloaders[] = | |||
135 | 136 | ||
136 | static const int bootloader_sizes[] = | 137 | static const int bootloader_sizes[] = |
137 | { | 138 | { |
138 | 0, | 139 | sizeof(bootimg_fuze), |
139 | sizeof(bootimg_clip), | 140 | sizeof(bootimg_clip), |
140 | 0, | 141 | 0, |
141 | sizeof(bootimg_e200v2), | 142 | sizeof(bootimg_e200v2), |
@@ -147,7 +148,7 @@ static const int bootloader_sizes[] = | |||
147 | -add parameter to the "scramble" tool */ | 148 | -add parameter to the "scramble" tool */ |
148 | static const char* rb_model_names[] = | 149 | static const char* rb_model_names[] = |
149 | { | 150 | { |
150 | NULL, | 151 | "fuze", |
151 | "clip", | 152 | "clip", |
152 | NULL, | 153 | NULL, |
153 | "e2v2", | 154 | "e2v2", |
@@ -159,7 +160,7 @@ static const char* rb_model_names[] = | |||
159 | ".sansa" files - these are the same as MODEL_NUMBER in config-target.h */ | 160 | ".sansa" files - these are the same as MODEL_NUMBER in config-target.h */ |
160 | static const int rb_model_num[] = | 161 | static const int rb_model_num[] = |
161 | { | 162 | { |
162 | 0, | 163 | 43, |
163 | 40, | 164 | 40, |
164 | 0, | 165 | 0, |
165 | 41, | 166 | 41, |