summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot/main.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-01-31 20:15:50 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-01-31 20:15:50 +0000
commit02dce4500dd8f60a0a911aacd367a1cff8e15da6 (patch)
treeffd145c74a2794af7f0e5b8c27300e304a186048 /rbutil/mkamsboot/main.c
parent6f2bba961f7744dd1f136a95b5a460daa0f9e1fe (diff)
downloadrockbox-02dce4500dd8f60a0a911aacd367a1cff8e15da6.tar.gz
rockbox-02dce4500dd8f60a0a911aacd367a1cff8e15da6.zip
mkamsboot: restructure model / firmware file information.
Merge the various arrays holding model specific information into a structure and give it a distinct name. Avoids problems when linking with Rockbox Utility. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29177 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/main.c')
-rw-r--r--rbutil/mkamsboot/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/rbutil/mkamsboot/main.c b/rbutil/mkamsboot/main.c
index 4f82bbc8c2..2280b49437 100644
--- a/rbutil/mkamsboot/main.c
+++ b/rbutil/mkamsboot/main.c
@@ -104,7 +104,8 @@ int main(int argc, char* argv[])
fprintf(stderr, "[INFO] Original firmware MD5 checksum match\n");
fprintf(stderr, "[INFO] Model: Sansa %s v%d - Firmware version: %s\n",
- model_names[sum.model], hw_revisions[sum.model], sum.version);
+ ams_identity[sum.model].model_name,
+ ams_identity[sum.model].hw_revision, sum.version);
printf("[INFO] Firmware patching has begun !\n\n");
@@ -118,7 +119,7 @@ int main(int argc, char* argv[])
fprintf(stderr, "[INFO] Packed bootloader size: %8d bytes\n",
rb_packedsize);
fprintf(stderr, "[INFO] Dual-boot function size: %8d bytes\n",
- bootloader_sizes[sum.model]);
+ ams_identity[sum.model].bootloader_size);
fprintf(stderr, "[INFO] UCL unpack function size: %8u bytes\n",
(unsigned int)sizeof(nrv2e_d8));
fprintf(stderr, "[INFO] Original firmware version: %8u bytes\n",
@@ -137,8 +138,9 @@ int main(int argc, char* argv[])
return 1;
}
- patch_firmware(sum.model, fw_revisions[sum.model], firmware_size, buf, len,
- of_packed, of_packedsize, rb_packed, rb_packedsize);
+ patch_firmware(sum.model, ams_identity[sum.model].fw_revision,
+ firmware_size, buf, len, of_packed, of_packedsize, rb_packed,
+ rb_packedsize);
/* Write the new firmware */
fdout = open(outfile, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);