From bff5e3d7ab853b01f56a83c15b49faed720f2386 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sun, 18 Jul 2010 17:05:05 +0000 Subject: 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 --- rbutil/mkamsboot/mkamsboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rbutil/mkamsboot/mkamsboot.c') 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, int of_packed_size, int of_unpacked_size, int *total_size, char *errstr, int errstrsize) { + /* XXX: we keep the first 0x200 bytes block unmodified, we just replace + * the ARM vectors */ unsigned int packed_size = bootloader_sizes[model] + sizeof(nrv2e_d8) + - of_packed_size + rb_packed_size; + of_packed_size + rb_packed_size + 0x200; /* how much memory is available */ 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, return 0; \ } while(0) - /* will packed data fit in the OF file ? - * XXX: we keep the first 0x200 bytes block unmodified, we just replace - * the ARM vectors */ - if(packed_size + 0x200 > of_unpacked_size) + /* will packed data fit in the OF file ? */ + if(packed_size > of_unpacked_size) ERROR( "[ERR] Packed data (%d bytes) doesn't fit in the firmware " "(%d bytes)\n", packed_size, of_unpacked_size -- cgit v1.2.3