diff options
Diffstat (limited to 'rbutil/mkamsboot')
-rw-r--r-- | rbutil/mkamsboot/dualboot.c | 197 | ||||
-rw-r--r-- | rbutil/mkamsboot/dualboot.h | 14 | ||||
-rw-r--r-- | rbutil/mkamsboot/dualboot/dualboot.S | 24 | ||||
-rw-r--r-- | rbutil/mkamsboot/main.c | 8 | ||||
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.c | 75 | ||||
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.h | 24 |
6 files changed, 207 insertions, 135 deletions
diff --git a/rbutil/mkamsboot/dualboot.c b/rbutil/mkamsboot/dualboot.c index fbf2891107..32dad00ff0 100644 --- a/rbutil/mkamsboot/dualboot.c +++ b/rbutil/mkamsboot/dualboot.c | |||
@@ -15,121 +15,124 @@ unsigned char nrv2e_d8[168] = { | |||
15 | 0x02, 0x31, 0xee, 0x42, 0x00, 0xd2, 0x01, 0x31, 0x13, 0x78, 0x53, 0x5d, 0x13, 0x70, 0x01, 0x32, | 15 | 0x02, 0x31, 0xee, 0x42, 0x00, 0xd2, 0x01, 0x31, 0x13, 0x78, 0x53, 0x5d, 0x13, 0x70, 0x01, 0x32, |
16 | 0x01, 0x39, 0xfa, 0xd1, 0xbe, 0xe7, 0x00, 0x00 | 16 | 0x01, 0x39, 0xfa, 0xd1, 0xbe, 0xe7, 0x00, 0x00 |
17 | }; | 17 | }; |
18 | unsigned char dualboot_clip[248] = { | 18 | unsigned char dualboot_clip[256] = { |
19 | 0xd8, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 19 | 0xe4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
23 | 0x01, 0x20, 0x40, 0xe0, 0x98, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 23 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
24 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x84, 0x00, 0x9f, 0xe5, | 24 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
25 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x78, 0x00, 0x9f, 0xe5, | 25 | 0x88, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
26 | 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, | 26 | 0x7c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x11, 0x90, 0xe5, |
27 | 0x0c, 0x00, 0x00, 0x1a, 0x64, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 27 | 0x00, 0x00, 0x51, 0xe3, 0x0c, 0x00, 0x00, 0x1a, 0x68, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0xa0, 0xe3, |
28 | 0x80, 0x10, 0x80, 0xe5, 0x58, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 28 | 0x00, 0x14, 0x80, 0xe5, 0x80, 0x10, 0x80, 0xe5, 0x5c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, |
29 | 0x04, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x84, 0x00, 0x1f, 0xe5, | 29 | 0x00, 0x14, 0x80, 0xe5, 0x04, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x1a, |
30 | 0x84, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x98, 0x00, 0x1f, 0xe5, 0x98, 0x10, 0x1f, 0xe5, | 30 | 0x88, 0x00, 0x1f, 0xe5, 0x88, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x9c, 0x00, 0x1f, 0xe5, |
31 | 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, | 31 | 0x9c, 0x10, 0x1f, 0xe5, 0x94, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, |
32 | 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, | 32 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, |
33 | 0x38, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, | 33 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, |
34 | 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0c, 0xc8 | 34 | 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0c, 0xc8 |
35 | }; | 35 | }; |
36 | unsigned char dualboot_e200v2[228] = { | 36 | unsigned char dualboot_e200v2[236] = { |
37 | 0xc8, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 37 | 0xd4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
41 | 0x01, 0x20, 0x40, 0xe0, 0x88, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 41 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
42 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x74, 0x00, 0x9f, 0xe5, | 42 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
43 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x68, 0x00, 0x9f, 0xe5, | 43 | 0x78, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
44 | 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, | 44 | 0x6c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, |
45 | 0x08, 0x00, 0x00, 0x1a, 0x54, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 45 | 0x00, 0x00, 0x51, 0xe3, 0x08, 0x00, 0x00, 0x1a, 0x58, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, |
46 | 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0x74, 0x00, 0x1f, 0xe5, | 46 | 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, |
47 | 0x74, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x88, 0x00, 0x1f, 0xe5, 0x88, 0x10, 0x1f, 0xe5, | 47 | 0x78, 0x00, 0x1f, 0xe5, 0x78, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x8c, 0x00, 0x1f, 0xe5, |
48 | 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, | 48 | 0x8c, 0x10, 0x1f, 0xe5, 0x84, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, |
49 | 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, | 49 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, |
50 | 0x38, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, | 50 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, |
51 | 0x00, 0x00, 0x0d, 0xc8 | 51 | 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8 |
52 | }; | 52 | }; |
53 | unsigned char dualboot_c200v2[228] = { | 53 | unsigned char dualboot_c200v2[236] = { |
54 | 0xc8, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 54 | 0xd4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
58 | 0x01, 0x20, 0x40, 0xe0, 0x88, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 58 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
59 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x74, 0x00, 0x9f, 0xe5, | 59 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
60 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x68, 0x00, 0x9f, 0xe5, | 60 | 0x78, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
61 | 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x08, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, | 61 | 0x6c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x08, 0x10, 0x90, 0xe5, |
62 | 0x08, 0x00, 0x00, 0x1a, 0x54, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 62 | 0x00, 0x00, 0x51, 0xe3, 0x08, 0x00, 0x00, 0x1a, 0x58, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, |
63 | 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0x74, 0x00, 0x1f, 0xe5, | 63 | 0x00, 0x14, 0x80, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, |
64 | 0x74, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x88, 0x00, 0x1f, 0xe5, 0x88, 0x10, 0x1f, 0xe5, | 64 | 0x78, 0x00, 0x1f, 0xe5, 0x78, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x8c, 0x00, 0x1f, 0xe5, |
65 | 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, | 65 | 0x8c, 0x10, 0x1f, 0xe5, 0x84, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, |
66 | 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, | 66 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, |
67 | 0x38, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, | 67 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, |
68 | 0x00, 0x00, 0x0d, 0xc8 | 68 | 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8 |
69 | }; | 69 | }; |
70 | unsigned char dualboot_m200v4[204] = { | 70 | unsigned char dualboot_m200v4[212] = { |
71 | 0xb4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 71 | 0xc0, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
75 | 0x01, 0x20, 0x40, 0xe0, 0x74, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 75 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
76 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x60, 0x00, 0x9f, 0xe5, | 76 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
77 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x54, 0x00, 0x9f, 0xe5, | 77 | 0x64, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
78 | 0x20, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x80, 0x10, 0x80, 0xe5, 0x04, 0x20, 0x90, 0xe5, | 78 | 0x58, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x80, 0x10, 0x80, 0xe5, |
79 | 0x00, 0x00, 0x52, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x1f, 0xe5, 0x60, 0x10, 0x1f, 0xe5, | 79 | 0x04, 0x20, 0x90, 0xe5, 0x00, 0x00, 0x52, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x64, 0x00, 0x1f, 0xe5, |
80 | 0x01, 0x00, 0x00, 0xea, 0x74, 0x00, 0x1f, 0xe5, 0x74, 0x10, 0x1f, 0xe5, 0x01, 0x40, 0x43, 0xe0, | 80 | 0x64, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x78, 0x00, 0x1f, 0xe5, 0x78, 0x10, 0x1f, 0xe5, |
81 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, | 81 | 0x70, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, |
82 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x38, 0x00, 0x00, 0x00, | 82 | 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, |
83 | 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8 | 83 | 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x0f, 0xc8, |
84 | 0x00, 0x00, 0x0b, 0xc8 | ||
84 | }; | 85 | }; |
85 | unsigned char dualboot_fuze[228] = { | 86 | unsigned char dualboot_fuze[236] = { |
86 | 0xc8, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 87 | 0xd4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
90 | 0x01, 0x20, 0x40, 0xe0, 0x88, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 91 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
91 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x74, 0x00, 0x9f, 0xe5, | 92 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
92 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x68, 0x00, 0x9f, 0xe5, | 93 | 0x78, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
93 | 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, | 94 | 0x6c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, |
94 | 0x08, 0x00, 0x00, 0x1a, 0x54, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 95 | 0x00, 0x00, 0x51, 0xe3, 0x08, 0x00, 0x00, 0x1a, 0x58, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, |
95 | 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0x74, 0x00, 0x1f, 0xe5, | 96 | 0x00, 0x14, 0x80, 0xe5, 0x20, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, |
96 | 0x74, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x88, 0x00, 0x1f, 0xe5, 0x88, 0x10, 0x1f, 0xe5, | 97 | 0x78, 0x00, 0x1f, 0xe5, 0x78, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x8c, 0x00, 0x1f, 0xe5, |
97 | 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, | 98 | 0x8c, 0x10, 0x1f, 0xe5, 0x84, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, |
98 | 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, | 99 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, |
99 | 0x38, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, | 100 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, |
100 | 0x00, 0x00, 0x0d, 0xc8 | 101 | 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8 |
101 | }; | 102 | }; |
102 | unsigned char dualboot_clipv2[272] = { | 103 | unsigned char dualboot_clipv2[280] = { |
103 | 0xf4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 104 | 0x00, 0xf1, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 107 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
107 | 0x01, 0x20, 0x40, 0xe0, 0xb4, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 108 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
108 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0xa0, 0x00, 0x9f, 0xe5, | 109 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
109 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x94, 0x00, 0x9f, 0xe5, | 110 | 0xa4, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
110 | 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, | 111 | 0x98, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x11, 0x90, 0xe5, |
111 | 0x13, 0x00, 0x00, 0x1a, 0x80, 0x00, 0x9f, 0xe5, 0x38, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, | 112 | 0x00, 0x00, 0x51, 0xe3, 0x13, 0x00, 0x00, 0x1a, 0x84, 0x00, 0x9f, 0xe5, 0x38, 0x10, 0xa0, 0xe3, |
112 | 0x08, 0x10, 0xa0, 0xe3, 0x20, 0x10, 0x80, 0xe5, 0x10, 0x10, 0xa0, 0xe3, 0x40, 0x10, 0x80, 0xe5, | 113 | 0x00, 0x14, 0x80, 0xe5, 0x08, 0x10, 0xa0, 0xe3, 0x20, 0x10, 0x80, 0xe5, 0x10, 0x10, 0xa0, 0xe3, |
113 | 0x20, 0x10, 0xa0, 0xe3, 0x80, 0x10, 0x80, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x40, 0x10, 0x80, 0xe5, | 114 | 0x40, 0x10, 0x80, 0xe5, 0x20, 0x10, 0xa0, 0xe3, 0x80, 0x10, 0x80, 0xe5, 0x00, 0x10, 0xa0, 0xe3, |
114 | 0x05, 0x10, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff, 0x1a, 0x04, 0x10, 0x90, 0xe5, | 115 | 0x40, 0x10, 0x80, 0xe5, 0x05, 0x10, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff, 0x1a, |
115 | 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0xa0, 0x00, 0x1f, 0xe5, 0xa0, 0x10, 0x1f, 0xe5, | 116 | 0x04, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0xa4, 0x00, 0x1f, 0xe5, |
116 | 0x01, 0x00, 0x00, 0xea, 0xb4, 0x00, 0x1f, 0xe5, 0xb4, 0x10, 0x1f, 0xe5, 0x01, 0x40, 0x43, 0xe0, | 117 | 0xa4, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0xb8, 0x00, 0x1f, 0xe5, 0xb8, 0x10, 0x1f, 0xe5, |
117 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, | 118 | 0xb0, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, |
118 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x38, 0x00, 0x00, 0x00, | 119 | 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, |
119 | 0xff, 0xff, 0x0f, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0e, 0xc8 | 120 | 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x0f, 0xc8, |
121 | 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0e, 0xc8 | ||
120 | }; | 122 | }; |
121 | unsigned char dualboot_clipplus[208] = { | 123 | unsigned char dualboot_clipplus[216] = { |
122 | 0xb4, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 124 | 0xc0, 0xf0, 0x9f, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
123 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 126 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1f, 0xe5, 0x20, 0x10, 0x1f, 0xe5, | 127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x1f, 0xe5, |
126 | 0x01, 0x20, 0x40, 0xe0, 0x74, 0x30, 0x9f, 0xe5, 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, | 128 | 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 0x01, 0x40, 0x50, 0xe4, |
127 | 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x02, 0x50, 0x83, 0xe2, 0x60, 0x00, 0x9f, 0xe5, | 129 | 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x2c, 0x30, 0x0f, 0xe5, |
128 | 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x54, 0x00, 0x9f, 0xe5, | 130 | 0x64, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, |
129 | 0x20, 0x10, 0x90, 0xe5, 0x50, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x20, 0x82, 0xe1, | 131 | 0x58, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0x90, 0xe5, 0x54, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, |
130 | 0x00, 0x00, 0x52, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x1f, 0xe5, 0x60, 0x10, 0x1f, 0xe5, | 132 | 0x01, 0x20, 0x82, 0xe1, 0x00, 0x00, 0x52, 0xe3, 0x02, 0x00, 0x00, 0x1a, 0x64, 0x00, 0x1f, 0xe5, |
131 | 0x01, 0x00, 0x00, 0xea, 0x74, 0x00, 0x1f, 0xe5, 0x74, 0x10, 0x1f, 0xe5, 0x01, 0x40, 0x43, 0xe0, | 133 | 0x64, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0x78, 0x00, 0x1f, 0xe5, 0x78, 0x10, 0x1f, 0xe5, |
132 | 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, | 134 | 0x70, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, |
133 | 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x38, 0x00, 0x00, 0x00, | 135 | 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, |
134 | 0xff, 0xff, 0x04, 0x00, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0b, 0xc8 | 136 | 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x0f, 0xc8, |
137 | 0x00, 0x00, 0x0d, 0xc8, 0x00, 0x00, 0x0b, 0xc8 | ||
135 | }; | 138 | }; |
diff --git a/rbutil/mkamsboot/dualboot.h b/rbutil/mkamsboot/dualboot.h index 7d0b177ed7..28139ae34f 100644 --- a/rbutil/mkamsboot/dualboot.h +++ b/rbutil/mkamsboot/dualboot.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* Generated by bin2c */ | 1 | /* Generated by bin2c */ |
2 | 2 | ||
3 | extern unsigned char nrv2e_d8[168]; | 3 | extern unsigned char nrv2e_d8[168]; |
4 | extern unsigned char dualboot_clip[248]; | 4 | extern unsigned char dualboot_clip[256]; |
5 | extern unsigned char dualboot_e200v2[228]; | 5 | extern unsigned char dualboot_e200v2[236]; |
6 | extern unsigned char dualboot_c200v2[228]; | 6 | extern unsigned char dualboot_c200v2[236]; |
7 | extern unsigned char dualboot_m200v4[204]; | 7 | extern unsigned char dualboot_m200v4[212]; |
8 | extern unsigned char dualboot_fuze[228]; | 8 | extern unsigned char dualboot_fuze[236]; |
9 | extern unsigned char dualboot_clipv2[272]; | 9 | extern unsigned char dualboot_clipv2[280]; |
10 | extern unsigned char dualboot_clipplus[208]; | 10 | extern unsigned char dualboot_clipplus[216]; |
diff --git a/rbutil/mkamsboot/dualboot/dualboot.S b/rbutil/mkamsboot/dualboot/dualboot.S index cf11b66cfa..a27ab34d85 100644 --- a/rbutil/mkamsboot/dualboot/dualboot.S +++ b/rbutil/mkamsboot/dualboot/dualboot.S | |||
@@ -21,13 +21,6 @@ | |||
21 | 21 | ||
22 | .text | 22 | .text |
23 | 23 | ||
24 | #if defined(SANSA_CLIPV2) | ||
25 | .set RAM_SIZE, 0x100000 /* Use 1MB of SDRAM (bigger firmware do not fit in | ||
26 | * 0x50000 bytes) */ | ||
27 | #else | ||
28 | .set RAM_SIZE, 0x50000 /* Use full IRAM (or part of SDRAM on as3525v2) */ | ||
29 | #endif | ||
30 | |||
31 | /* AS3525 hardware registers */ | 24 | /* AS3525 hardware registers */ |
32 | .set GPIOA, 0xC80B0000 | 25 | .set GPIOA, 0xC80B0000 |
33 | .set GPIOB, 0xC80C0000 | 26 | .set GPIOB, 0xC80C0000 |
@@ -59,6 +52,7 @@ ucl_of_size: .word 0 /* Size in bytes of the compressed OF image */ | |||
59 | ucl_rb_end: .word 0 /* End of the ucl-compressed RB image */ | 52 | ucl_rb_end: .word 0 /* End of the ucl-compressed RB image */ |
60 | ucl_rb_size: .word 0 /* Size in bytes of the compressed RB image */ | 53 | ucl_rb_size: .word 0 /* Size in bytes of the compressed RB image */ |
61 | 54 | ||
55 | ucl_dest: .word 0 /* End of our destination buffer (end of memory) */ | ||
62 | 56 | ||
63 | start: | 57 | start: |
64 | /* First copy the UCL unpack function to the end of RAM */ | 58 | /* First copy the UCL unpack function to the end of RAM */ |
@@ -66,7 +60,7 @@ start: | |||
66 | ldr r1, uclunpack_size /* Source length */ | 60 | ldr r1, uclunpack_size /* Source length */ |
67 | sub r2, r0, r1 /* Source start - 1*/ | 61 | sub r2, r0, r1 /* Source start - 1*/ |
68 | 62 | ||
69 | ldr r3, =(RAM_SIZE-1) /* Destination end */ | 63 | ldr r3, ucl_dest /* Destination end */ |
70 | 64 | ||
71 | uclcopy: | 65 | uclcopy: |
72 | ldrb r4, [r0], #-1 | 66 | ldrb r4, [r0], #-1 |
@@ -74,8 +68,8 @@ uclcopy: | |||
74 | cmp r2, r0 | 68 | cmp r2, r0 |
75 | bne uclcopy | 69 | bne uclcopy |
76 | 70 | ||
77 | add r5, r3, #2 /* r5 is entry point of copy of uclunpack */ | 71 | /* store the new destination buffer */ |
78 | /* function, plus one (for thumb mode */ | 72 | str r3, ucl_dest |
79 | 73 | ||
80 | /* enable gpio clock */ | 74 | /* enable gpio clock */ |
81 | ldr r0, =CGU_PERI | 75 | ldr r0, =CGU_PERI |
@@ -84,9 +78,9 @@ uclcopy: | |||
84 | str r1, [r0] | 78 | str r1, [r0] |
85 | 79 | ||
86 | 80 | ||
87 | /* TODO : M200V4 */ | 81 | /* TODO : M200V4 ? */ |
88 | #if defined(SANSA_C200V2) | 82 | #if defined(SANSA_C200V2) |
89 | #define USB_PIN 1 | 83 | #define USB_PIN 1 /* FIXME: not correct on some c200v2s */ |
90 | #elif defined(SANSA_CLIP) || defined(SANSA_CLIPV2) | 84 | #elif defined(SANSA_CLIP) || defined(SANSA_CLIPV2) |
91 | #define USB_PIN 6 | 85 | #define USB_PIN 6 |
92 | #elif defined(SANSA_FUZE) || defined(SANSA_E200V2) | 86 | #elif defined(SANSA_FUZE) || defined(SANSA_E200V2) |
@@ -210,11 +204,13 @@ boot_of: | |||
210 | 204 | ||
211 | decompress: | 205 | decompress: |
212 | /* At this point: */ | 206 | /* At this point: */ |
213 | /* r5 = entry point (plus one for thumb) of uclunpack function */ | ||
214 | /* r3 = destination_end for copy of UCL image */ | ||
215 | /* r0 = source_end for UCL image to copy */ | 207 | /* r0 = source_end for UCL image to copy */ |
216 | /* r1 = size of UCL image to copy */ | 208 | /* r1 = size of UCL image to copy */ |
217 | 209 | ||
210 | ldr r3, ucl_dest | ||
211 | add r5, r3, #2 /* r5 is entry point of copy of uclunpack */ | ||
212 | /* function, plus one (for thumb mode */ | ||
213 | |||
218 | sub r4, r3, r1 /* r4 := destination_start - 1 */ | 214 | sub r4, r3, r1 /* r4 := destination_start - 1 */ |
219 | 215 | ||
220 | fw_copy: | 216 | fw_copy: |
diff --git a/rbutil/mkamsboot/main.c b/rbutil/mkamsboot/main.c index 5715248685..1132334261 100644 --- a/rbutil/mkamsboot/main.c +++ b/rbutil/mkamsboot/main.c | |||
@@ -57,6 +57,7 @@ int main(int argc, char* argv[]) | |||
57 | int of_packedsize; | 57 | int of_packedsize; |
58 | unsigned char* rb_packed; | 58 | unsigned char* rb_packed; |
59 | int rb_packedsize; | 59 | int rb_packedsize; |
60 | int patchable; | ||
60 | int totalsize; | 61 | int totalsize; |
61 | char errstr[200]; | 62 | char errstr[200]; |
62 | struct md5sums sum; | 63 | struct md5sums sum; |
@@ -121,12 +122,13 @@ int main(int argc, char* argv[]) | |||
121 | fprintf(stderr, "[INFO] UCL unpack function size: %u bytes\n", | 122 | fprintf(stderr, "[INFO] UCL unpack function size: %u bytes\n", |
122 | (unsigned int)sizeof(nrv2e_d8)); | 123 | (unsigned int)sizeof(nrv2e_d8)); |
123 | 124 | ||
124 | totalsize = total_size(sum.model, of_packedsize, rb_packedsize); | 125 | patchable = check_sizes(sum.model, rb_packedsize, bootloader_size, |
126 | of_packedsize, firmware_size, &totalsize, errstr, sizeof(errstr)); | ||
125 | 127 | ||
126 | fprintf(stderr, "[INFO] Total size of new image: %d bytes\n", totalsize); | 128 | fprintf(stderr, "[INFO] Total size of new image: %d bytes\n", totalsize); |
127 | 129 | ||
128 | if (totalsize > firmware_size) { | 130 | if (!patchable) { |
129 | fprintf(stderr, "[ERR] No room to insert bootloader, aborting\n"); | 131 | fprintf(stderr, "%s", errstr); |
130 | free(buf); | 132 | free(buf); |
131 | free(of_packed); | 133 | free(of_packed); |
132 | free(rb_packed); | 134 | free(rb_packed); |
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c index 5b0006006e..9e0099d1b6 100644 --- a/rbutil/mkamsboot/mkamsboot.c +++ b/rbutil/mkamsboot/mkamsboot.c | |||
@@ -227,6 +227,25 @@ static struct md5sums sansasums[] = { | |||
227 | 227 | ||
228 | #define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0])) | 228 | #define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0])) |
229 | 229 | ||
230 | static unsigned int model_memory_size(int model) | ||
231 | { | ||
232 | if(model == MODEL_CLIPV2) | ||
233 | { | ||
234 | /* The decompressed Clipv2 OF is around 380kB. | ||
235 | * Since it doesn't fit in the 0x50000 bytes IRAM, the OF starts | ||
236 | * with DRAM mapped at 0x0 | ||
237 | * | ||
238 | * We could use all the available memory (supposedly 8MB) | ||
239 | * but 1MB ought to be enough for our use | ||
240 | */ | ||
241 | return 1 << 20; | ||
242 | } | ||
243 | else | ||
244 | { /* The OF boots with IRAM (320kB) mapped at 0x0 */ | ||
245 | return 320 << 10; | ||
246 | } | ||
247 | } | ||
248 | |||
230 | int firmware_revision(int model) | 249 | int firmware_revision(int model) |
231 | { | 250 | { |
232 | return fw_revisions[model]; | 251 | return fw_revisions[model]; |
@@ -469,8 +488,8 @@ unsigned char* load_rockbox_file( | |||
469 | 488 | ||
470 | /* Check for correct model string */ | 489 | /* Check for correct model string */ |
471 | if (memcmp(rb_model_names[model], header + 4, 4)!=0) | 490 | if (memcmp(rb_model_names[model], header + 4, 4)!=0) |
472 | ERROR("[ERR] Model name \"%s\" not found in %s\n", | 491 | ERROR("[ERR] Expected model name \"%s\" in %s, not \"%4.4s\"\n", |
473 | rb_model_names[model], filename); | 492 | rb_model_names[model], filename, (char*)header+4); |
474 | 493 | ||
475 | *bufsize = filesize(fd) - sizeof(header); | 494 | *bufsize = filesize(fd) - sizeof(header); |
476 | 495 | ||
@@ -515,6 +534,7 @@ void patch_firmware( | |||
515 | { | 534 | { |
516 | unsigned char *p; | 535 | unsigned char *p; |
517 | uint32_t sum, filesum; | 536 | uint32_t sum, filesum; |
537 | uint32_t ucl_dest; | ||
518 | unsigned int i; | 538 | unsigned int i; |
519 | 539 | ||
520 | /* Zero the original firmware area - not needed, but helps debugging */ | 540 | /* Zero the original firmware area - not needed, but helps debugging */ |
@@ -555,6 +575,8 @@ void patch_firmware( | |||
555 | - 1); | 575 | - 1); |
556 | put_uint32le(&buf[0x434], rb_packedsize); | 576 | put_uint32le(&buf[0x434], rb_packedsize); |
557 | 577 | ||
578 | ucl_dest = model_memory_size(model) - 1; /* last byte of memory */ | ||
579 | put_uint32le(&buf[0x438], ucl_dest); | ||
558 | 580 | ||
559 | /* Update the firmware block checksum */ | 581 | /* Update the firmware block checksum */ |
560 | sum = calc_checksum(buf + 0x400, firmware_size); | 582 | sum = calc_checksum(buf + 0x400, firmware_size); |
@@ -579,10 +601,49 @@ void patch_firmware( | |||
579 | put_uint32le(buf + len - 4, filesum); | 601 | put_uint32le(buf + len - 4, filesum); |
580 | } | 602 | } |
581 | 603 | ||
582 | /* returns size of new firmware block */ | 604 | /* returns != 0 if the firmware can be safely patched */ |
583 | int total_size(int model, int rb_packedsize, int of_packedsize) | 605 | int check_sizes(int model, int rb_packed_size, int rb_unpacked_size, |
606 | int of_packed_size, int of_unpacked_size, int *total_size, | ||
607 | char *errstr, int errstrsize) | ||
584 | { | 608 | { |
585 | return bootloader_sizes[model] + sizeof(nrv2e_d8) + of_packedsize + | 609 | unsigned int packed_size = bootloader_sizes[model] + sizeof(nrv2e_d8) + |
586 | rb_packedsize; | 610 | of_packed_size + rb_packed_size; |
587 | } | ||
588 | 611 | ||
612 | /* how much memory is available */ | ||
613 | unsigned int memory_size = model_memory_size(model); | ||
614 | |||
615 | /* the memory used when unpacking the OF */ | ||
616 | unsigned int ram_of = sizeof(nrv2e_d8) + of_packed_size + of_unpacked_size; | ||
617 | |||
618 | /* the memory used when unpacking the bootloader */ | ||
619 | unsigned int ram_rb = sizeof(nrv2e_d8) + rb_packed_size + rb_unpacked_size; | ||
620 | |||
621 | *total_size = packed_size; | ||
622 | |||
623 | #define ERROR(format, ...) \ | ||
624 | do { \ | ||
625 | snprintf(errstr, errstrsize, format, __VA_ARGS__); \ | ||
626 | return 0; \ | ||
627 | } while(0) | ||
628 | |||
629 | /* will packed data fit in the OF file ? */ | ||
630 | if(packed_size > of_unpacked_size) | ||
631 | ERROR( | ||
632 | "[ERR] Packed data (%d bytes) doesn't fit in the firmware " | ||
633 | "(%d bytes)\n", packed_size, of_unpacked_size | ||
634 | ); | ||
635 | |||
636 | else if(ram_rb > memory_size) | ||
637 | ERROR("[ERR] Rockbox can't be unpacked at runtime, needs %d bytes " | ||
638 | "of memory and only %d available\n", ram_rb, memory_size | ||
639 | ); | ||
640 | |||
641 | else if(ram_of > memory_size) | ||
642 | ERROR("[ERR] OF can't be unpacked at runtime, needs %d bytes " | ||
643 | "of memory and only %d available\n", ram_of, memory_size | ||
644 | ); | ||
645 | |||
646 | return 1; | ||
647 | |||
648 | #undef ERROR | ||
649 | } | ||
diff --git a/rbutil/mkamsboot/mkamsboot.h b/rbutil/mkamsboot/mkamsboot.h index 06fd329c8c..cf5628aa5d 100644 --- a/rbutil/mkamsboot/mkamsboot.h +++ b/rbutil/mkamsboot/mkamsboot.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #ifdef __cplusplus | 31 | #ifdef __cplusplus |
32 | extern "C" { | 32 | extern "C" { |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | /* Supported models */ | 35 | /* Supported models */ |
36 | enum { | 36 | enum { |
@@ -133,21 +133,31 @@ void patch_firmware( | |||
133 | unsigned char* rb_packed, int rb_packedsize); | 133 | unsigned char* rb_packed, int rb_packedsize); |
134 | 134 | ||
135 | 135 | ||
136 | /* total_size() | 136 | /* check_sizes() |
137 | * | 137 | * |
138 | * Calculates the size of the new firmware block | 138 | * Verify if the given bootloader can be embedded in the OF file, while still |
139 | * allowing both the bootloader and the OF to be unpacked at runtime | ||
139 | * | 140 | * |
140 | * ARGUMENTS | 141 | * ARGUMENTS |
141 | * | 142 | * |
142 | * model : firmware model (MODEL_XXX) | 143 | * model : firmware model (MODEL_XXX) |
143 | * rb_packed_size : size of compressed rockbox bootloader | 144 | * rb_packed_size : size of compressed rockbox bootloader |
144 | * of_packedsize : size of compressed original firmware block | 145 | * rb_unpacked_size : size of compressed rockbox bootloader |
146 | * of_packed_size : size of compressed original firmware block | ||
147 | * of_unpacked_size : size of compressed original firmware block | ||
148 | * total_size : will contain the size of useful data that would be | ||
149 | * written to the firmware block, even in case of an | ||
150 | * error | ||
151 | * errstr : provided buffer to store an eventual error | ||
152 | * errstrsize : size of provided error buffer | ||
145 | * | 153 | * |
146 | * RETURN VALUE | 154 | * RETURN VALUE |
147 | * Size of new firmware block | 155 | * 0 if the conditions aren't met, 1 if we can go and patch the firmware |
148 | */ | 156 | */ |
149 | 157 | ||
150 | int total_size(int model, int rb_packedsize, int of_packedsize); | 158 | int check_sizes(int model, int rb_packed_size, int rb_unpacked_size, |
159 | int of_packed_size, int of_unpacked_size, int *total_size, | ||
160 | char *errstr, int errstrsize); | ||
151 | 161 | ||
152 | /* firmware_revision() | 162 | /* firmware_revision() |
153 | * | 163 | * |
@@ -164,6 +174,6 @@ int firmware_revision(int model); | |||
164 | 174 | ||
165 | #ifdef __cplusplus | 175 | #ifdef __cplusplus |
166 | }; | 176 | }; |
167 | #endif | 177 | #endif |
168 | 178 | ||
169 | #endif | 179 | #endif |