summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/mkamsboot.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-11-14 22:16:22 +0000
committerDave Chapman <dave@dchapman.com>2008-11-14 22:16:22 +0000
commitdcb0e43148c2900db6ef05cacd7d8f313a55dbce (patch)
treea07a2ead6bbc61138379cb461cf854961bfda2f7 /rbutil/mkamsboot/mkamsboot.c
parent11b5d5a37ec2178e414217d434c6a1262d152f55 (diff)
downloadrockbox-dcb0e43148c2900db6ef05cacd7d8f313a55dbce.tar.gz
rockbox-dcb0e43148c2900db6ef05cacd7d8f313a55dbce.zip
Clean up the Makefile a little - no functional changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19106 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/mkamsboot.c')
-rw-r--r--rbutil/mkamsboot/mkamsboot.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c
index e9438b317d..52cb2cece9 100644
--- a/rbutil/mkamsboot/mkamsboot.c
+++ b/rbutil/mkamsboot/mkamsboot.c
@@ -86,13 +86,13 @@ execution to the uncompressed firmware.
86#include <ucl/ucl.h> 86#include <ucl/ucl.h>
87 87
88/* Headers for ARM code binaries */ 88/* Headers for ARM code binaries */
89#include "uclimg.h" 89#include "nrv2e_d8.h"
90#include "md5.h" 90#include "md5.h"
91 91
92#include "bootimg_clip.h" 92#include "dualboot_clip.h"
93#include "bootimg_e200v2.h" 93#include "dualboot_e200v2.h"
94#include "bootimg_fuze.h" 94#include "dualboot_fuze.h"
95#include "bootimg_m200v4.h" 95#include "dualboot_m200v4.h"
96 96
97/* Win32 compatibility */ 97/* Win32 compatibility */
98#ifndef O_BINARY 98#ifndef O_BINARY
@@ -126,21 +126,21 @@ static const char* model_names[] =
126 126
127static const unsigned char* bootloaders[] = 127static const unsigned char* bootloaders[] =
128{ 128{
129 bootimg_fuze, 129 dualboot_fuze,
130 bootimg_clip, 130 dualboot_clip,
131 NULL, 131 NULL,
132 bootimg_e200v2, 132 dualboot_e200v2,
133 bootimg_m200v4, 133 dualboot_m200v4,
134 NULL 134 NULL
135}; 135};
136 136
137static const int bootloader_sizes[] = 137static const int bootloader_sizes[] =
138{ 138{
139 sizeof(bootimg_fuze), 139 sizeof(dualboot_fuze),
140 sizeof(bootimg_clip), 140 sizeof(dualboot_clip),
141 0, 141 0,
142 sizeof(bootimg_e200v2), 142 sizeof(dualboot_e200v2),
143 sizeof(bootimg_m200v4), 143 sizeof(dualboot_m200v4),
144 0 144 0
145}; 145};
146 146
@@ -540,9 +540,9 @@ int main(int argc, char* argv[])
540 fprintf(stderr,"[INFO] Bootloader size: %d bytes\n",(int)bootloader_size); 540 fprintf(stderr,"[INFO] Bootloader size: %d bytes\n",(int)bootloader_size);
541 fprintf(stderr,"[INFO] Packed bootloader size: %d bytes\n",rb_packedsize); 541 fprintf(stderr,"[INFO] Packed bootloader size: %d bytes\n",rb_packedsize);
542 fprintf(stderr,"[INFO] Dual-boot function size: %d bytes\n",bootloader_sizes[model]); 542 fprintf(stderr,"[INFO] Dual-boot function size: %d bytes\n",bootloader_sizes[model]);
543 fprintf(stderr,"[INFO] UCL unpack function size: %d bytes\n",sizeof(uclimg)); 543 fprintf(stderr,"[INFO] UCL unpack function size: %d bytes\n",sizeof(nrv2e_d8));
544 544
545 totalsize = bootloader_sizes[model] + sizeof(uclimg) + of_packedsize + 545 totalsize = bootloader_sizes[model] + sizeof(nrv2e_d8) + of_packedsize +
546 rb_packedsize; 546 rb_packedsize;
547 547
548 fprintf(stderr,"[INFO] Total size of new image: %d bytes\n",totalsize); 548 fprintf(stderr,"[INFO] Total size of new image: %d bytes\n",totalsize);
@@ -566,8 +566,8 @@ int main(int argc, char* argv[])
566 p = buf + 0x400 + firmware_size; 566 p = buf + 0x400 + firmware_size;
567 567
568 /* 1 - UCL unpack function */ 568 /* 1 - UCL unpack function */
569 p -= sizeof(uclimg); 569 p -= sizeof(nrv2e_d8);
570 memcpy(p, uclimg, sizeof(uclimg)); 570 memcpy(p, nrv2e_d8, sizeof(nrv2e_d8));
571 571
572 /* 2 - Compressed copy of original firmware */ 572 /* 2 - Compressed copy of original firmware */
573 p -= of_packedsize; 573 p -= of_packedsize;
@@ -583,14 +583,14 @@ int main(int argc, char* argv[])
583 583
584 /* UCL unpack function */ 584 /* UCL unpack function */
585 put_uint32le(&buf[0x420], firmware_size - 1); 585 put_uint32le(&buf[0x420], firmware_size - 1);
586 put_uint32le(&buf[0x424], sizeof(uclimg)); 586 put_uint32le(&buf[0x424], sizeof(nrv2e_d8));
587 587
588 /* Compressed original firmware image */ 588 /* Compressed original firmware image */
589 put_uint32le(&buf[0x428], firmware_size - sizeof(uclimg) - 1); 589 put_uint32le(&buf[0x428], firmware_size - sizeof(nrv2e_d8) - 1);
590 put_uint32le(&buf[0x42c], of_packedsize); 590 put_uint32le(&buf[0x42c], of_packedsize);
591 591
592 /* Compressed Rockbox image */ 592 /* Compressed Rockbox image */
593 put_uint32le(&buf[0x430], firmware_size - sizeof(uclimg) - of_packedsize - 1); 593 put_uint32le(&buf[0x430], firmware_size - sizeof(nrv2e_d8) - of_packedsize - 1);
594 put_uint32le(&buf[0x434], rb_packedsize); 594 put_uint32le(&buf[0x434], rb_packedsize);
595 595
596 596