From 5891a384867e05016a24bcbe4b0963f795fe8dbe Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Wed, 1 Oct 2008 10:25:31 +0000 Subject: 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 --- utils/AMS/hacking/mkamsboot.c | 1 + utils/AMS/hacking/test.S | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'utils') 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 -- cgit