summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/mkamsboot.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-18 17:05:05 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-18 17:05:05 +0000
commitbff5e3d7ab853b01f56a83c15b49faed720f2386 (patch)
treed453c5530b7b7b8b3f216406e908c101aa08e830 /rbutil/mkamsboot/mkamsboot.c
parentc2273cf5e2bdf0902d6b375155c49326e623669b (diff)
downloadrockbox-bff5e3d7ab853b01f56a83c15b49faed720f2386.tar.gz
rockbox-bff5e3d7ab853b01f56a83c15b49faed720f2386.zip
mkamsboot: take in account the additional 0x200 block when calculating size
Align sizes of different blocks on mkamsboot output git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27482 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/mkamsboot.c')
-rw-r--r--rbutil/mkamsboot/mkamsboot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c
index 74275279a1..1196038b09 100644
--- a/rbutil/mkamsboot/mkamsboot.c
+++ b/rbutil/mkamsboot/mkamsboot.c
@@ -612,8 +612,10 @@ int check_sizes(int model, int rb_packed_size, int rb_unpacked_size,
612 int of_packed_size, int of_unpacked_size, int *total_size, 612 int of_packed_size, int of_unpacked_size, int *total_size,
613 char *errstr, int errstrsize) 613 char *errstr, int errstrsize)
614{ 614{
615 /* XXX: we keep the first 0x200 bytes block unmodified, we just replace
616 * the ARM vectors */
615 unsigned int packed_size = bootloader_sizes[model] + sizeof(nrv2e_d8) + 617 unsigned int packed_size = bootloader_sizes[model] + sizeof(nrv2e_d8) +
616 of_packed_size + rb_packed_size; 618 of_packed_size + rb_packed_size + 0x200;
617 619
618 /* how much memory is available */ 620 /* how much memory is available */
619 unsigned int memory_size = model_memory_size(model); 621 unsigned int memory_size = model_memory_size(model);
@@ -632,10 +634,8 @@ int check_sizes(int model, int rb_packed_size, int rb_unpacked_size,
632 return 0; \ 634 return 0; \
633 } while(0) 635 } while(0)
634 636
635 /* will packed data fit in the OF file ? 637 /* will packed data fit in the OF file ? */
636 * XXX: we keep the first 0x200 bytes block unmodified, we just replace 638 if(packed_size > of_unpacked_size)
637 * the ARM vectors */
638 if(packed_size + 0x200 > of_unpacked_size)
639 ERROR( 639 ERROR(
640 "[ERR] Packed data (%d bytes) doesn't fit in the firmware " 640 "[ERR] Packed data (%d bytes) doesn't fit in the firmware "
641 "(%d bytes)\n", packed_size, of_unpacked_size 641 "(%d bytes)\n", packed_size, of_unpacked_size