forked from len0rd/rockbox
Clip+ remove setting GPIOB PIN0, it seems needed only for power
Also only use 0x50000 bytes of memory since the files just fit in. TODO: make mkamsboot abort if the decompressed OF or bootloader doesn't fit in RAM / or overlap on compressed data or uclunpack function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24727 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b4e1cae3d6
commit
40e833af5f
3 changed files with 16 additions and 35 deletions
|
|
@ -118,21 +118,18 @@ 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[256] = {
|
||||
0xe0, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
unsigned char dualboot_clipplus[208] = {
|
||||
0xb4, 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, 0xa0, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4,
|
||||
0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x8c, 0x00, 0x9f, 0xe5,
|
||||
0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x80, 0x00, 0x9f, 0xe5,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x04, 0x10, 0x80, 0xe5, 0x7d, 0x1f, 0xa0, 0xe3,
|
||||
0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff, 0x1a, 0x68, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0x90, 0xe5,
|
||||
0x64, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x20, 0x82, 0xe1, 0x50, 0x00, 0x9f, 0xe5,
|
||||
0x00, 0x10, 0xa0, 0xe3, 0x04, 0x10, 0x80, 0xe5, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x00, 0x52, 0xe3,
|
||||
0x02, 0x00, 0x00, 0x1a, 0x8c, 0x00, 0x1f, 0xe5, 0x8c, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea,
|
||||
0xa0, 0x00, 0x1f, 0xe5, 0xa0, 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, 0x00, 0x00, 0x0c, 0xc8, 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0b, 0xc8
|
||||
0x01, 0x20, 0x40, 0xe0, 0x74, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4,
|
||||
0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x60, 0x00, 0x9f, 0xe5,
|
||||
0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x54, 0x00, 0x9f, 0xe5,
|
||||
0x20, 0x10, 0x90, 0xe5, 0x50, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x20, 0x82, 0xe1,
|
||||
0x00, 0x00, 0x52, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x1f, 0xe5, 0x60, 0x10, 0x1f, 0xe5,
|
||||
0x01, 0x00, 0x00, 0xea, 0x74, 0x00, 0x1f, 0xe5, 0x74, 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, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0b, 0xc8
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,4 +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[256];
|
||||
extern unsigned char dualboot_clipplus[208];
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@
|
|||
|
||||
.text
|
||||
|
||||
#if defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
|
||||
.set RAM_SIZE, 0x100000 /* Use 1MB of SDRAM on v2 firmwares (bigger firmware) */
|
||||
#if defined(SANSA_CLIPV2)
|
||||
.set RAM_SIZE, 0x100000 /* Use 1MB of SDRAM (bigger firmware do not fit in
|
||||
* 0x50000 bytes) */
|
||||
#else
|
||||
.set RAM_SIZE, 0x50000 /* Use full IRAM on v1 firmwares */
|
||||
.set RAM_SIZE, 0x50000 /* Use full IRAM (or part of SDRAM on as3525v2) */
|
||||
#endif
|
||||
|
||||
/* AS3525 hardware registers */
|
||||
|
|
@ -157,17 +158,6 @@ uclcopy:
|
|||
cmp r1, #0 /* C3 = #0 means button pressed */
|
||||
beq boot_of
|
||||
#elif defined(SANSA_CLIPPLUS)
|
||||
@ All GPIO_DIR == 0x00 from reset
|
||||
@ Set B0
|
||||
ldr r0, =GPIOB
|
||||
mov r1, #(1<<0) @ pin 0
|
||||
str r1, [r0, #0x400] @ GPIOB(0) = output
|
||||
str r1, [r0, #4*(1<<0)] @ write 1 to GPIOB(0) B0 set
|
||||
|
||||
mov r1, #500 @ small delay
|
||||
1: subs r1, r1, #1
|
||||
bne 1b
|
||||
|
||||
@ read pins
|
||||
ldr r0, =GPIOC
|
||||
ldr r1, [r0, #4*(1<<3)] @ read pin C3 "|<<"
|
||||
|
|
@ -177,12 +167,6 @@ uclcopy:
|
|||
|
||||
orr r2, r2, r1 @ c3 || A1
|
||||
|
||||
@ Unset GPIOB(0) & Restore GPIOB_DIR
|
||||
ldr r0, =GPIOB
|
||||
mov r1, #0
|
||||
str r1, [r0, #4*(1<<0)] @ write 0 to GPIOB(0) B0 unset
|
||||
str r1, [r0, #0x400] @ Restore GPIOB_DIR to 0x00
|
||||
|
||||
cmp r2, #0 @ test input from pins
|
||||
bne boot_of @ branch directly to OF if either pin high
|
||||
#elif defined(SANSA_C200V2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue