summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-09-05 18:14:29 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-09-05 18:14:29 +0000
commit205254097249034a7cab46413cdda0152adc4578 (patch)
tree17b88f90e59155c4f0784acde8eb46c491f06ccc /rbutil/mkamsboot
parent25f0060d21b098ea3287c234761f703e9e55d5fe (diff)
downloadrockbox-205254097249034a7cab46413cdda0152adc4578.tar.gz
rockbox-205254097249034a7cab46413cdda0152adc4578.zip
sansa clipzip: implement default dualboot code (boots to OF unconditionally for now)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30435 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot')
-rw-r--r--rbutil/mkamsboot/dualboot.c12
-rw-r--r--rbutil/mkamsboot/dualboot.h1
-rw-r--r--rbutil/mkamsboot/dualboot/Makefile7
-rw-r--r--rbutil/mkamsboot/dualboot/dualboot.S3
-rw-r--r--rbutil/mkamsboot/mkamsboot.c6
5 files changed, 25 insertions, 4 deletions
diff --git a/rbutil/mkamsboot/dualboot.c b/rbutil/mkamsboot/dualboot.c
index 1eed483c2a..b6ca1b3db5 100644
--- a/rbutil/mkamsboot/dualboot.c
+++ b/rbutil/mkamsboot/dualboot.c
@@ -154,3 +154,15 @@ unsigned char dualboot_fuzev2[332] = {
0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
0x00, 0x00, 0x0d, 0xc8, 0x10, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x07, 0xc8
};
+unsigned char dualboot_clipzip[152] = {
+ 0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5,
+ 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
+ 0x2c, 0x30, 0x0f, 0xe5, 0x48, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
+ 0x00, 0x10, 0x80, 0xe5, 0x02, 0x00, 0x00, 0xea, 0x4c, 0x00, 0x1f, 0xe5, 0x4c, 0x10, 0x1f, 0xe5,
+ 0x01, 0x00, 0x00, 0xea, 0x60, 0x00, 0x1f, 0xe5, 0x60, 0x10, 0x1f, 0xe5, 0x58, 0x30, 0x1f, 0xe5,
+ 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4,
+ 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3,
+ 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8
+};
diff --git a/rbutil/mkamsboot/dualboot.h b/rbutil/mkamsboot/dualboot.h
index 038d46c389..787aa095f0 100644
--- a/rbutil/mkamsboot/dualboot.h
+++ b/rbutil/mkamsboot/dualboot.h
@@ -9,3 +9,4 @@ extern unsigned char dualboot_fuze[176];
extern unsigned char dualboot_clipv2[248];
extern unsigned char dualboot_clipplus[340];
extern unsigned char dualboot_fuzev2[332];
+extern unsigned char dualboot_clipzip[152];
diff --git a/rbutil/mkamsboot/dualboot/Makefile b/rbutil/mkamsboot/dualboot/Makefile
index e5bca91e21..32e609c8a4 100644
--- a/rbutil/mkamsboot/dualboot/Makefile
+++ b/rbutil/mkamsboot/dualboot/Makefile
@@ -4,8 +4,8 @@ CROSS_PREFIX=arm-elf
# adding a new target. mkamsboot.c also needs to be edited to refer to these
# new images.
-BOOTOBJS = nrv2e_d8.o dualboot_clip.o dualboot_e200v2.o dualboot_c200v2.o dualboot_m200v4.o dualboot_fuze.o dualboot_clipv2.o dualboot_clipplus.o dualboot_fuzev2.o
-BOOTBINS = nrv2e_d8.arm-bin dualboot_clip.arm-bin dualboot_e200v2.arm-bin dualboot_c200v2.arm-bin dualboot_m200v4.arm-bin dualboot_fuze.arm-bin dualboot_clipv2.arm-bin dualboot_clipplus.arm-bin dualboot_fuzev2.arm-bin
+BOOTOBJS = nrv2e_d8.o dualboot_clip.o dualboot_e200v2.o dualboot_c200v2.o dualboot_m200v4.o dualboot_fuze.o dualboot_clipv2.o dualboot_clipplus.o dualboot_fuzev2.o dualboot_clipzip.o
+BOOTBINS = nrv2e_d8.arm-bin dualboot_clip.arm-bin dualboot_e200v2.arm-bin dualboot_c200v2.arm-bin dualboot_m200v4.arm-bin dualboot_fuze.arm-bin dualboot_clipv2.arm-bin dualboot_clipplus.arm-bin dualboot_fuzev2.arm-bin dualboot_clipzip.arm-bin
all: ../dualboot.h ../dualboot.c
@@ -35,6 +35,9 @@ dualboot_clipplus.o: dualboot.S
dualboot_fuzev2.o: dualboot.S
$(CROSS_PREFIX)-$(CC) -DSANSA_FUZEV2 -c -o dualboot_fuzev2.o dualboot.S
+dualboot_clipzip.o: dualboot.S
+ $(CROSS_PREFIX)-$(CC) -DSANSA_CLIPZIP -c -o dualboot_clipzip.o dualboot.S
+
# Rules for the ucl unpack function
nrv2e_d8.o: nrv2e_d8.S
$(CROSS_PREFIX)-$(CC) -DPURE_THUMB -c -o nrv2e_d8.o nrv2e_d8.S
diff --git a/rbutil/mkamsboot/dualboot/dualboot.S b/rbutil/mkamsboot/dualboot/dualboot.S
index bdb872251d..5d8fe1268c 100644
--- a/rbutil/mkamsboot/dualboot/dualboot.S
+++ b/rbutil/mkamsboot/dualboot/dualboot.S
@@ -174,6 +174,9 @@ uclcopy:
cmp r2, #0 @ test input from pins
bne boot_of @ branch directly to OF if either pin high
+#elif defined(SANSA_CLIPZIP)
+ @ just boot the OF
+ b boot_of
#elif defined(SANSA_C200V2)
.set BUTTON_LEFT, (1<< 2)
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c
index 2682b7b19b..3e014deb90 100644
--- a/rbutil/mkamsboot/mkamsboot.c
+++ b/rbutil/mkamsboot/mkamsboot.c
@@ -122,7 +122,7 @@ const struct ams_models ams_identity[] = {
[MODEL_FUZEV2] = { 2, 2, "Fuze", dualboot_fuzev2, sizeof(dualboot_fuzev2), "fuz2", 68 },
[MODEL_FUZE] = { 1, 1, "Fuze", dualboot_fuze, sizeof(dualboot_fuze), "fuze", 43 },
[MODEL_M200V4] = { 4, 1, "m200", dualboot_m200v4, sizeof(dualboot_m200v4), "m2v4", 42 },
- [MODEL_CLIPZIP] = { 1, 2, "ClipZip", NULL, 0, "clzp", 79 }, /* TODO */
+ [MODEL_CLIPZIP] = { 1, 2, "ClipZip", dualboot_clipzip, sizeof(dualboot_clipzip), "clzp", 79 },
};
@@ -170,8 +170,10 @@ static struct md5sums sansasums[] = {
{ MODEL_FUZEV2, "2.02.26", "d4f6f85c3e4a8ea8f2e5acc421641801" },
{ MODEL_FUZEV2, "2.03.31", "74fb197ccd51707388f3b233402186a6" },
{ MODEL_FUZEV2, "2.03.33", "1599cc73d02ea7fe53fe2d4379c24b66" },
-
+#if 0 /* disabled for now because it's not been proven they can be patched */
{ MODEL_CLIPZIP, "1.01.12", "45adea0873326b5af34f096e5c402f78" },
+ { MODEL_CLIPZIP, "1.01.15", "f62af954334cd9ba1a87a7fa58ec6074" },
+#endif
};
#define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0]))