summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rbutil/mkimxboot/dualboot.c20
-rw-r--r--rbutil/mkimxboot/dualboot.h2
-rw-r--r--rbutil/mkimxboot/dualboot/dualboot.S11
3 files changed, 22 insertions, 11 deletions
diff --git a/rbutil/mkimxboot/dualboot.c b/rbutil/mkimxboot/dualboot.c
index c2998956de..67ab56d302 100644
--- a/rbutil/mkimxboot/dualboot.c
+++ b/rbutil/mkimxboot/dualboot.c
@@ -2,13 +2,15 @@
#include "dualboot.h"
-unsigned char dualboot_fuzeplus[128] = {
- 0x60, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5, 0x01, 0x01, 0x12, 0xe3, 0x00, 0x00, 0xa0, 0x03,
- 0x1e, 0xff, 0x2f, 0x01, 0x70, 0x40, 0x2d, 0xe9, 0x4c, 0x20, 0x9f, 0xe5, 0x00, 0x40, 0xa0, 0xe3,
- 0x48, 0x30, 0x9f, 0xe5, 0x00, 0x30, 0x93, 0xe5, 0x03, 0x35, 0xa0, 0xe1, 0x23, 0x3f, 0xa0, 0xe1,
- 0x01, 0x00, 0x53, 0xe3, 0x03, 0x40, 0x84, 0x00, 0x01, 0x20, 0x52, 0xe2, 0xf7, 0xff, 0xff, 0x1a,
- 0x2c, 0x20, 0x9f, 0xe5, 0x02, 0x00, 0x54, 0xe1, 0x02, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x81, 0xe5,
- 0x01, 0x00, 0xa0, 0xe3, 0x70, 0x80, 0xbd, 0xe8, 0x18, 0x00, 0x9f, 0xe5, 0x18, 0x10, 0x9f, 0xe5,
- 0x00, 0x10, 0x80, 0xe5, 0xfb, 0xff, 0xff, 0xea, 0x10, 0x86, 0x01, 0x80, 0x70, 0x64, 0x08, 0x00,
- 0xc0, 0x40, 0x04, 0x80, 0x80, 0x1a, 0x06, 0x00, 0x00, 0x41, 0x04, 0x80, 0x01, 0x00, 0x77, 0x3e
+unsigned char dualboot_fuzeplus[152] = {
+ 0x78, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5, 0x01, 0x01, 0x12, 0xe3, 0x00, 0x00, 0xa0, 0x03,
+ 0x1e, 0xff, 0x2f, 0x01, 0x70, 0x40, 0x2d, 0xe9, 0x64, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5,
+ 0x02, 0x21, 0xa0, 0xe1, 0x22, 0x2d, 0xa0, 0xe1, 0x20, 0x00, 0x12, 0xe3, 0x0c, 0x00, 0x00, 0x1a,
+ 0x50, 0x20, 0x9f, 0xe5, 0x00, 0x40, 0xa0, 0xe3, 0x44, 0x30, 0x9f, 0xe5, 0x00, 0x30, 0x93, 0xe5,
+ 0x03, 0x35, 0xa0, 0xe1, 0x23, 0x3f, 0xa0, 0xe1, 0x01, 0x00, 0x53, 0xe3, 0x03, 0x40, 0x84, 0x00,
+ 0x01, 0x20, 0x52, 0xe2, 0xf7, 0xff, 0xff, 0x1a, 0x2c, 0x20, 0x9f, 0xe5, 0x02, 0x00, 0x54, 0xe1,
+ 0x02, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x81, 0xe5, 0x01, 0x00, 0xa0, 0xe3, 0x70, 0x80, 0xbd, 0xe8,
+ 0x18, 0x00, 0x9f, 0xe5, 0x18, 0x10, 0x9f, 0xe5, 0x00, 0x10, 0x80, 0xe5, 0xfb, 0xff, 0xff, 0xea,
+ 0x10, 0x86, 0x01, 0x80, 0xc0, 0x40, 0x04, 0x80, 0x70, 0x64, 0x08, 0x00, 0x80, 0x1a, 0x06, 0x00,
+ 0x00, 0x41, 0x04, 0x80, 0x01, 0x00, 0x77, 0x3e
};
diff --git a/rbutil/mkimxboot/dualboot.h b/rbutil/mkimxboot/dualboot.h
index b5ccd7c33e..78efb8170d 100644
--- a/rbutil/mkimxboot/dualboot.h
+++ b/rbutil/mkimxboot/dualboot.h
@@ -1,3 +1,3 @@
/* Generated by bin2c */
-extern unsigned char dualboot_fuzeplus[128];
+extern unsigned char dualboot_fuzeplus[152];
diff --git a/rbutil/mkimxboot/dualboot/dualboot.S b/rbutil/mkimxboot/dualboot/dualboot.S
index 645a7889cb..4002167929 100644
--- a/rbutil/mkimxboot/dualboot/dualboot.S
+++ b/rbutil/mkimxboot/dualboot/dualboot.S
@@ -30,8 +30,16 @@ start:
tst r2, #0x40000000 @ bit 30, active low
moveq r0, #0 @ return 0, continue boot
bxeq lr
- /* otherwise monitor the power button for a short time */
+ /* save registers for the ROM */
stmfd sp!, {r4-r6,lr}
+ /* if the power source was 5v (ie usb), bypass the power button delay */
+ ldr r2, =0x800440c0 @ HW_POWER_STS
+ ldr r2, [r2]
+ mov r2, r2, lsl#2
+ mov r2, r2, lsr#26 @ extract PWRUP_SOURCE
+ tst r2, #0x20 @ bit 5: five volts
+ bne boot_rockbox
+ /* otherwise monitor the power button for a short time */
ldr r2, =550000 @ loop count
ldr r4, =0 @ number of times PSWITCH was 1
pswitch_monitor_loop:
@@ -48,6 +56,7 @@ pswitch_monitor_loop:
cmp r4, r2
bcc power_down
/* jump to section given as argument */
+boot_rockbox:
str r0, [r1]
mov r0, #1
ldmfd sp!, {r4-r6,pc}