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
This commit is contained in:
Dave Chapman 2008-10-01 10:25:31 +00:00
parent 757f5112e2
commit 5891a38486
2 changed files with 6 additions and 3 deletions

View file

@ -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);

View file

@ -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