diff options
Diffstat (limited to 'utils/AMS/hacking/test.S')
| -rw-r--r-- | utils/AMS/hacking/test.S | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/utils/AMS/hacking/test.S b/utils/AMS/hacking/test.S index 52f54bd..d4bb214 100644 --- a/utils/AMS/hacking/test.S +++ b/utils/AMS/hacking/test.S @@ -1,11 +1,34 @@ +/* int ucl_nrv2e_decompress_8(const unsigned char *src, unsigned char *dst, + unsigned long *dst_len) */ -/* This value is filled in by mkamsboot */ -originalentry: .word 0 +.text +.global ucl_nrv2e_decompress_8 + +/* Vectors */ + ldr pc, =start +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 + +/* 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 */ + + +start: /* A delay loop - just to prove we're running */ mov r1, #0x500000 /* Approximately 5 seconds */ loop: subs r1, r1, #1 bne loop - /* Now branch back to the original firmware's entry point */ - ldr pc, originalentry + /* 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 |