forked from len0rd/rockbox
Fix some off-by-one errors, plus remove some unused variables
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18768 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c4bcfac69
commit
1a549d49f7
2 changed files with 4 additions and 6 deletions
|
|
@ -39,7 +39,7 @@ start:
|
|||
ldr r1, uclunpack_size /* Source length */
|
||||
sub r2, r0, r1 /* Source start - 1*/
|
||||
|
||||
ldr r3, =DRAM_SIZE /* Destination end */
|
||||
ldr r3, =(DRAM_SIZE-1) /* Destination end */
|
||||
|
||||
uclcopy:
|
||||
ldrb r4, [r0], #-1
|
||||
|
|
|
|||
|
|
@ -279,8 +279,6 @@ int main(int argc, char* argv[])
|
|||
unsigned char* buf;
|
||||
int firmware_size;
|
||||
off_t bootloader_size;
|
||||
uint32_t ucl_size;
|
||||
uint32_t ucl_paddedsize;
|
||||
uint32_t sum,filesum;
|
||||
uint8_t model_id;
|
||||
int model;
|
||||
|
|
@ -419,15 +417,15 @@ int main(int argc, char* argv[])
|
|||
in each image, along with the size in bytes */
|
||||
|
||||
/* UCL unpack function */
|
||||
put_uint32le(&buf[0x420], firmware_size);
|
||||
put_uint32le(&buf[0x420], firmware_size - 1);
|
||||
put_uint32le(&buf[0x424], sizeof(uclimg));
|
||||
|
||||
/* Compressed original firmware image */
|
||||
put_uint32le(&buf[0x428], firmware_size - sizeof(uclimg));
|
||||
put_uint32le(&buf[0x428], firmware_size - sizeof(uclimg) - 1);
|
||||
put_uint32le(&buf[0x42c], of_packedsize);
|
||||
|
||||
/* Compressed Rockbox image */
|
||||
put_uint32le(&buf[0x430], firmware_size - sizeof(uclimg) - of_packedsize);
|
||||
put_uint32le(&buf[0x430], firmware_size - sizeof(uclimg) - of_packedsize - 1);
|
||||
put_uint32le(&buf[0x434], rb_packedsize);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue