summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rbutil/mkamsboot/README2
-rw-r--r--rbutil/mkamsboot/dualboot.c14
-rw-r--r--rbutil/mkamsboot/dualboot.h1
-rw-r--r--rbutil/mkamsboot/dualboot/Makefile7
-rw-r--r--rbutil/mkamsboot/dualboot/dualboot.S8
-rw-r--r--rbutil/mkamsboot/mkamsboot.c21
-rw-r--r--rbutil/mkamsboot/mkamsboot.h1
-rwxr-xr-xtools/configure36
-rw-r--r--tools/scramble.c4
9 files changed, 78 insertions, 16 deletions
diff --git a/rbutil/mkamsboot/README b/rbutil/mkamsboot/README
index 53f1fba9b9..a9eba35d21 100644
--- a/rbutil/mkamsboot/README
+++ b/rbutil/mkamsboot/README
@@ -23,6 +23,7 @@ Supported models
----------------
Sansa Clip : firmware version starting with "01."
+Sansa Clip+ : firmware version starting with "01."
Sansa Clipv2: firmware version starting with "02."
Sansa Fuze : firmware version starting with "01."
Sansa E200v2: firmware version starting with "03."
@@ -37,6 +38,7 @@ For the firmware upgrade to happen, the firmware has to be named specially:
clip v2 : m30pa.bin
clip : m300a.bin
+clip+ : clppa.bin
fuze : fuzea.bin
e200v2 : e200pa.bin
c200v2 : c200pa.bin
diff --git a/rbutil/mkamsboot/dualboot.c b/rbutil/mkamsboot/dualboot.c
index 2eda3930cd..01a3083f58 100644
--- a/rbutil/mkamsboot/dualboot.c
+++ b/rbutil/mkamsboot/dualboot.c
@@ -116,3 +116,17 @@ unsigned char dualboot_clipv2[272] = {
0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x38, 0x00, 0x00, 0x00,
0xff, 0xff, 0x0f, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0e, 0xc8
};
+unsigned char dualboot_clipplus[188] = {
+ 0xa8, 0xf0, 0x9f, 0xe5, 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,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5,
+ 0x01, 0x20, 0x40, 0xe0, 0x68, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4,
+ 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x54, 0x00, 0x9f, 0xe5,
+ 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x05, 0x06, 0xa0, 0xe3,
+ 0x01, 0x00, 0x50, 0xe2, 0xfd, 0xff, 0xff, 0x1a, 0x02, 0x00, 0x00, 0xea, 0x54, 0x00, 0x1f, 0xe5,
+ 0x54, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x68, 0x00, 0x1f, 0xe5, 0x68, 0x10, 0x1f, 0xe5,
+ 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,
+ 0x38, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x14, 0x00, 0x0f, 0xc8
+};
diff --git a/rbutil/mkamsboot/dualboot.h b/rbutil/mkamsboot/dualboot.h
index b88a18240f..f3f1fc7654 100644
--- a/rbutil/mkamsboot/dualboot.h
+++ b/rbutil/mkamsboot/dualboot.h
@@ -7,3 +7,4 @@ extern unsigned char dualboot_c200v2[228];
extern unsigned char dualboot_m200v4[204];
extern unsigned char dualboot_fuze[228];
extern unsigned char dualboot_clipv2[272];
+extern unsigned char dualboot_clipplus[188];
diff --git a/rbutil/mkamsboot/dualboot/Makefile b/rbutil/mkamsboot/dualboot/Makefile
index 06b90c7fb9..94ec718574 100644
--- a/rbutil/mkamsboot/dualboot/Makefile
+++ b/rbutil/mkamsboot/dualboot/Makefile
@@ -4,8 +4,8 @@ CC=gcc
# 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
-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
+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
+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
all: dualboot.h
@@ -31,6 +31,9 @@ dualboot_c200v2.o: dualboot.S
dualboot_clipv2.o: dualboot.S
arm-elf-gcc -DSANSA_CLIPV2 -c -o dualboot_clipv2.o dualboot.S
+dualboot_clipplus.o: dualboot.S
+ arm-elf-gcc -DSANSA_CLIPPLUS -c -o dualboot_clipplus.o dualboot.S
+
# Rules for the ucl unpack function
nrv2e_d8.o: nrv2e_d8.S
arm-elf-gcc -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 5210ba5160..fe1a64befb 100644
--- a/rbutil/mkamsboot/dualboot/dualboot.S
+++ b/rbutil/mkamsboot/dualboot/dualboot.S
@@ -21,7 +21,7 @@
.text
- #if defined(SANSA_CLIPV2)
+#if defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
.set RAM_SIZE, 0x100000 /* Use 1MB of SDRAM on v2 firmwares (bigger firmware) */
#else
.set RAM_SIZE, 0x50000 /* Use full IRAM on v1 firmwares */
@@ -156,6 +156,12 @@ uclcopy:
cmp r1, #0 /* C3 = #0 means button pressed */
beq boot_of
+#elif defined(SANSA_CLIPPLUS)
+ /* TODO */
+ mov r0, #0x500000 /* Approximately 5 seconds */
+1: subs r0, r0, #1 /* just to prove we are running */
+ bne 1b
+ b boot_of /* branch to OF */
#elif defined(SANSA_C200V2)
/* check for RIGHT on C6, should changed to LEFT as soon as it
* known in which pin that is in order for consistency */
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c
index 8d40a1966c..d983d37853 100644
--- a/rbutil/mkamsboot/mkamsboot.c
+++ b/rbutil/mkamsboot/mkamsboot.c
@@ -109,7 +109,7 @@ execution to the uncompressed firmware.
#define O_BINARY 0
#endif
-/* 4 for m200, 2 for e200/c200, 1 or 2 for fuze/clop */
+/* 4 for m200, 2 for e200/c200, 1 or 2 for fuze/clip, 1 for clip+ */
const unsigned short hw_revisions[] = {
[MODEL_FUZE] = 1,
[MODEL_CLIP] = 1,
@@ -117,9 +117,10 @@ const unsigned short hw_revisions[] = {
[MODEL_E200V2] = 2,
[MODEL_M200V4] = 4,
[MODEL_C200V2] = 2,
+ [MODEL_CLIPPLUS]= 1,
};
-/* version 2 is used in Clipv2 and Fuzev2 firmwares */
+/* version 2 is used in Clipv2, Clip+ and Fuzev2 firmwares */
const unsigned short fw_revisions[] = {
[MODEL_FUZE] = 1,
[MODEL_CLIP] = 1,
@@ -127,6 +128,7 @@ const unsigned short fw_revisions[] = {
[MODEL_E200V2] = 1,
[MODEL_M200V4] = 1,
[MODEL_C200V2] = 1,
+ [MODEL_CLIPPLUS]= 2,
};
/* Descriptive name of these models */
@@ -134,6 +136,7 @@ const char* model_names[] = {
[MODEL_FUZE] = "Fuze",
[MODEL_CLIP] = "Clip",
[MODEL_CLIPV2] = "Clip",
+ [MODEL_CLIPPLUS]= "Clip+",
[MODEL_E200V2] = "e200",
[MODEL_M200V4] = "m200",
[MODEL_C200V2] = "c200",
@@ -147,6 +150,7 @@ static const unsigned char* bootloaders[] = {
[MODEL_E200V2] = dualboot_e200v2,
[MODEL_M200V4] = dualboot_m200v4,
[MODEL_C200V2] = dualboot_c200v2,
+ [MODEL_CLIPPLUS]= dualboot_clipplus,
};
/* Size of dualboot functions for these models */
@@ -157,6 +161,7 @@ const int bootloader_sizes[] = {
[MODEL_E200V2] = sizeof(dualboot_e200v2),
[MODEL_M200V4] = sizeof(dualboot_m200v4),
[MODEL_C200V2] = sizeof(dualboot_c200v2),
+ [MODEL_CLIPPLUS]= sizeof(dualboot_clipplus),
};
/* Model names used in the Rockbox header in ".sansa" files - these match the
@@ -168,6 +173,7 @@ static const char* rb_model_names[] = {
[MODEL_E200V2] = "e2v2",
[MODEL_M200V4] = "m2v4",
[MODEL_C200V2] = "c2v2",
+ [MODEL_CLIPPLUS]= "cli+",
};
/* Model numbers used to initialise the checksum in the Rockbox header in
@@ -178,7 +184,8 @@ static const int rb_model_num[] = {
[MODEL_CLIPV2] = 60,
[MODEL_E200V2] = 41,
[MODEL_M200V4] = 42,
- [MODEL_C200V2] = 44
+ [MODEL_C200V2] = 44,
+ [MODEL_CLIPPLUS]= 66,
};
/* Checksums of unmodified original firmwares - for safety, and device
@@ -212,7 +219,11 @@ static struct md5sums sansasums[] = {
{ MODEL_CLIP, "1.01.32", "d835d12342500732ffb9c4ee54abec15" },
{ MODEL_CLIPV2, "2.01.16", "c57fb3fcbe07c2c9b360f060938f80cb" },
- { MODEL_CLIPV2, "2.01.32", "0ad3723e52022509089d938d0fbbf8c5" }
+ { MODEL_CLIPV2, "2.01.32", "0ad3723e52022509089d938d0fbbf8c5" },
+
+#if 0 /* uncomment when Clip+ support is tested */
+ { MODEL_CLIPPLUS, "01.02.09", "656d38114774c2001dc18e6726df3c5d" },
+#endif
};
#define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0]))
@@ -293,6 +304,8 @@ static int get_model(int model_id)
return MODEL_M200V4;
case 0x27:
return MODEL_CLIPV2;
+ case 0x28:
+ return MODEL_CLIPPLUS;
}
return MODEL_UNKNOWN;
diff --git a/rbutil/mkamsboot/mkamsboot.h b/rbutil/mkamsboot/mkamsboot.h
index 647770ff46..06fd329c8c 100644
--- a/rbutil/mkamsboot/mkamsboot.h
+++ b/rbutil/mkamsboot/mkamsboot.h
@@ -41,6 +41,7 @@ enum {
MODEL_E200V2,
MODEL_M200V4,
MODEL_C200V2,
+ MODEL_CLIPPLUS,
};
diff --git a/tools/configure b/tools/configure
index d14875aef1..33c272d1b1 100755
--- a/tools/configure
+++ b/tools/configure
@@ -900,14 +900,14 @@ cat <<EOF
==Onda== 59) Sansa c200v2
120) VX747 ==Meizu== 60) Sansa Clipv2
121) VX767 110) M6SL 61) Sansa View
- 122) VX747+ 111) M6SP
- 123) VX777 112) M3 ==Logik==
- 80) DAX 1GB MP3/DAB
- ==Samsung== ==Tatung==
- 140) YH-820 150) Elio TPJ-1022 ==Lyre project==
- 141) YH-920 130) Lyre proto 1
- 142) YH-925 131) Mini2440
- 143) YP-S3
+ 122) VX747+ 111) M6SP 62) Sansa Clip+
+ 123) VX777 112) M3
+ ==Logik==
+ ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
+ 140) YH-820 150) Elio TPJ-1022
+ 141) YH-920 ==Lyre project==1
+ 142) YH-925 130) Lyre proto 1
+ 143) YP-S3 131) Mini2440
EOF
buildfor=`input`;
@@ -2048,6 +2048,26 @@ fi
t_model="sansa-view"
;;
+ 62|sansaclipplus)
+ target_id=66
+ modelname="sansaclipplus"
+ target="-DSANSA_CLIPPLUS"
+ memory=8
+ arm926ejscc
+ bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
+ bmp2rb_native="$bmp2rb_mono"
+ tool="$rootdir/tools/scramble -add=cli+"
+ output="rockbox.sansa"
+ bootoutput="bootloader-clipplus.sansa"
+ appextra="recorder:gui"
+ plugins="yes"
+ swcodec="yes"
+ toolset=$scramblebitmaptools
+ t_cpu="arm"
+ t_manufacturer="as3525"
+ t_model="sansa-clipplus"
+ ;;
+
150|tatungtpj1022)
target_id=25
modelname="tatungtpj1022"
diff --git a/tools/scramble.c b/tools/scramble.c
index 9bfdbda905..3ee8b26aa4 100644
--- a/tools/scramble.c
+++ b/tools/scramble.c
@@ -125,7 +125,7 @@ void usage(void)
"\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n");
printf("\t 9200, 1630, 6330, ldax, m200, c100, clip, e2v2,\n"
"\t m2v4, fuze, c2v2, clv2, y820, y920, y925, x747,\n"
- "\t 747p, x777, nn2g, m244)\n");
+ "\t 747p, x777, nn2g, m244, cli+)\n");
printf("\nNo option results in Archos standard player/recorder format.\n");
exit(1);
@@ -320,6 +320,8 @@ int main (int argc, char** argv)
modelnum = 64;
else if (!strcmp(&argv[1][5], "6330")) /* Philips HDD6330 */
modelnum = 65;
+ else if (!strcmp(&argv[1][5], "cli+")) /* Sansa Clip+ */
+ modelnum = 66;
else if (!strcmp(&argv[1][5], "m244"))
modelnum = 131;
else {