diff options
Diffstat (limited to 'rbutil/mkamsboot/mkamsboot.c')
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.c | 10 |
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 |