summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-10-01 10:25:31 +0000
committerDave Chapman <dave@dchapman.com>2008-10-01 10:25:31 +0000
commit5891a384867e05016a24bcbe4b0963f795fe8dbe (patch)
treeeb8c32241e764dc177037cb90a76fdfa7a11beb9
parent757f5112e25efbfa71a2d289436a1b285ca46663 (diff)
downloadrockbox-5891a384867e05016a24bcbe4b0963f795fe8dbe.tar.gz
rockbox-5891a384867e05016a24bcbe4b0963f795fe8dbe.zip
Bug fix #1 for mkamsboot - pass the correct parameters to the ucl unpack function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18676 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/AMS/hacking/mkamsboot.c1
-rw-r--r--utils/AMS/hacking/test.S8
2 files changed, 6 insertions, 3 deletions
diff --git a/utils/AMS/hacking/mkamsboot.c b/utils/AMS/hacking/mkamsboot.c
index ea434bc893..f5c2f35d36 100644
--- a/utils/AMS/hacking/mkamsboot.c
+++ b/utils/AMS/hacking/mkamsboot.c
@@ -269,6 +269,7 @@ int main(int argc, char* argv[])
269 269
270 put_uint32le(&buf[0x420], firmware_size + 1); /* UCL unpack entry point */ 270 put_uint32le(&buf[0x420], firmware_size + 1); /* UCL unpack entry point */
271 put_uint32le(&buf[0x424], firmware_size - ucl_size); /* Location of OF */ 271 put_uint32le(&buf[0x424], firmware_size - ucl_size); /* Location of OF */
272 put_uint32le(&buf[0x428], ucl_size); /* Size of UCL image */
272 273
273 /* Update checksum */ 274 /* Update checksum */
274 sum = calc_checksum(buf + 0x400,firmware_size + uclunpack_size); 275 sum = calc_checksum(buf + 0x400,firmware_size + uclunpack_size);
diff --git a/utils/AMS/hacking/test.S b/utils/AMS/hacking/test.S
index d4bb2143bb..2e1796fcef 100644
--- a/utils/AMS/hacking/test.S
+++ b/utils/AMS/hacking/test.S
@@ -18,6 +18,7 @@
18/* These values are filled in by mkamsboot - don't move them from offset 0x20 */ 18/* These values are filled in by mkamsboot - don't move them from offset 0x20 */
19ucl_unpack: .word 0 /* Entry point (plus 1 - for thumb) of ucl_unpack */ 19ucl_unpack: .word 0 /* Entry point (plus 1 - for thumb) of ucl_unpack */
20ucl_start: .word 0 /* Start of the ucl-compressed OF image */ 20ucl_start: .word 0 /* Start of the ucl-compressed OF image */
21ucl_size: .word 0 /* Length in bytes of the compressed OF image */
21 22
22 23
23start: 24start:
@@ -29,6 +30,7 @@ loop: subs r1, r1, #1
29 /* Call the ucl decompress function, which will branch to 0x0 30 /* Call the ucl decompress function, which will branch to 0x0
30 on completion */ 31 on completion */
31 ldr r0, ucl_start /* Source */ 32 ldr r0, ucl_start /* Source */
32 mov r1, #0 /* Destination */ 33 ldr r1, ucl_size /* Source length */
33 ldr r2, ucl_unpack 34 mov r2, #0 /* Destination */
34 bx r2 35 ldr r3, ucl_unpack
36 bx r3