summaryrefslogtreecommitdiffstats
path: root/utils/AMS
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 /utils/AMS
parent757f5112e25efbfa71a2d289436a1b285ca46663 (diff)
downloadrockbox-5891a384867e05016a24bcbe4b0963f795fe8dbe.tar.gz
rockbox-5891a384867e05016a24bcbe4b0963f795fe8dbe.tar.bz2
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
Diffstat (limited to 'utils/AMS')
-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[])
put_uint32le(&buf[0x420], firmware_size + 1); /* UCL unpack entry point */
put_uint32le(&buf[0x424], firmware_size - ucl_size); /* Location of OF */
+ put_uint32le(&buf[0x428], ucl_size); /* Size of UCL image */
/* Update checksum */
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 @@
/* These values are filled in by mkamsboot - don't move them from offset 0x20 */
ucl_unpack: .word 0 /* Entry point (plus 1 - for thumb) of ucl_unpack */
ucl_start: .word 0 /* Start of the ucl-compressed OF image */
+ucl_size: .word 0 /* Length in bytes of the compressed OF image */
start:
@@ -29,6 +30,7 @@ loop: subs r1, r1, #1
/* Call the ucl decompress function, which will branch to 0x0
on completion */
ldr r0, ucl_start /* Source */
- mov r1, #0 /* Destination */
- ldr r2, ucl_unpack
- bx r2
+ ldr r1, ucl_size /* Source length */
+ mov r2, #0 /* Destination */
+ ldr r3, ucl_unpack
+ bx r3