summaryrefslogtreecommitdiff
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 @@
2 2
3#include "dualboot.h" 3#include "dualboot.h"
4 4
5unsigned char dualboot_fuzeplus[128] = { 5unsigned char dualboot_fuzeplus[152] = {
6 0x60, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5, 0x01, 0x01, 0x12, 0xe3, 0x00, 0x00, 0xa0, 0x03, 6 0x78, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5, 0x01, 0x01, 0x12, 0xe3, 0x00, 0x00, 0xa0, 0x03,
7 0x1e, 0xff, 0x2f, 0x01, 0x70, 0x40, 0x2d, 0xe9, 0x4c, 0x20, 0x9f, 0xe5, 0x00, 0x40, 0xa0, 0xe3, 7 0x1e, 0xff, 0x2f, 0x01, 0x70, 0x40, 0x2d, 0xe9, 0x64, 0x20, 0x9f, 0xe5, 0x00, 0x20, 0x92, 0xe5,
8 0x48, 0x30, 0x9f, 0xe5, 0x00, 0x30, 0x93, 0xe5, 0x03, 0x35, 0xa0, 0xe1, 0x23, 0x3f, 0xa0, 0xe1, 8 0x02, 0x21, 0xa0, 0xe1, 0x22, 0x2d, 0xa0, 0xe1, 0x20, 0x00, 0x12, 0xe3, 0x0c, 0x00, 0x00, 0x1a,
9 0x01, 0x00, 0x53, 0xe3, 0x03, 0x40, 0x84, 0x00, 0x01, 0x20, 0x52, 0xe2, 0xf7, 0xff, 0xff, 0x1a, 9 0x50, 0x20, 0x9f, 0xe5, 0x00, 0x40, 0xa0, 0xe3, 0x44, 0x30, 0x9f, 0xe5, 0x00, 0x30, 0x93, 0xe5,
10 0x2c, 0x20, 0x9f, 0xe5, 0x02, 0x00, 0x54, 0xe1, 0x02, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x81, 0xe5, 10 0x03, 0x35, 0xa0, 0xe1, 0x23, 0x3f, 0xa0, 0xe1, 0x01, 0x00, 0x53, 0xe3, 0x03, 0x40, 0x84, 0x00,
11 0x01, 0x00, 0xa0, 0xe3, 0x70, 0x80, 0xbd, 0xe8, 0x18, 0x00, 0x9f, 0xe5, 0x18, 0x10, 0x9f, 0xe5, 11 0x01, 0x20, 0x52, 0xe2, 0xf7, 0xff, 0xff, 0x1a, 0x2c, 0x20, 0x9f, 0xe5, 0x02, 0x00, 0x54, 0xe1,
12 0x00, 0x10, 0x80, 0xe5, 0xfb, 0xff, 0xff, 0xea, 0x10, 0x86, 0x01, 0x80, 0x70, 0x64, 0x08, 0x00, 12 0x02, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x81, 0xe5, 0x01, 0x00, 0xa0, 0xe3, 0x70, 0x80, 0xbd, 0xe8,
13 0xc0, 0x40, 0x04, 0x80, 0x80, 0x1a, 0x06, 0x00, 0x00, 0x41, 0x04, 0x80, 0x01, 0x00, 0x77, 0x3e 13 0x18, 0x00, 0x9f, 0xe5, 0x18, 0x10, 0x9f, 0xe5, 0x00, 0x10, 0x80, 0xe5, 0xfb, 0xff, 0xff, 0xea,
14 0x10, 0x86, 0x01, 0x80, 0xc0, 0x40, 0x04, 0x80, 0x70, 0x64, 0x08, 0x00, 0x80, 0x1a, 0x06, 0x00,
15 0x00, 0x41, 0x04, 0x80, 0x01, 0x00, 0x77, 0x3e
14}; 16};
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 @@
1/* Generated by bin2c */ 1/* Generated by bin2c */
2 2
3extern unsigned char dualboot_fuzeplus[128]; 3extern 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:
30 tst r2, #0x40000000 @ bit 30, active low 30 tst r2, #0x40000000 @ bit 30, active low
31 moveq r0, #0 @ return 0, continue boot 31 moveq r0, #0 @ return 0, continue boot
32 bxeq lr 32 bxeq lr
33 /* otherwise monitor the power button for a short time */ 33 /* save registers for the ROM */
34 stmfd sp!, {r4-r6,lr} 34 stmfd sp!, {r4-r6,lr}
35 /* if the power source was 5v (ie usb), bypass the power button delay */
36 ldr r2, =0x800440c0 @ HW_POWER_STS
37 ldr r2, [r2]
38 mov r2, r2, lsl#2
39 mov r2, r2, lsr#26 @ extract PWRUP_SOURCE
40 tst r2, #0x20 @ bit 5: five volts
41 bne boot_rockbox
42 /* otherwise monitor the power button for a short time */
35 ldr r2, =550000 @ loop count 43 ldr r2, =550000 @ loop count
36 ldr r4, =0 @ number of times PSWITCH was 1 44 ldr r4, =0 @ number of times PSWITCH was 1
37pswitch_monitor_loop: 45pswitch_monitor_loop:
@@ -48,6 +56,7 @@ pswitch_monitor_loop:
48 cmp r4, r2 56 cmp r4, r2
49 bcc power_down 57 bcc power_down
50 /* jump to section given as argument */ 58 /* jump to section given as argument */
59boot_rockbox:
51 str r0, [r1] 60 str r0, [r1]
52 mov r0, #1 61 mov r0, #1
53 ldmfd sp!, {r4-r6,pc} 62 ldmfd sp!, {r4-r6,pc}