diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-06-30 21:30:06 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-06-30 21:30:06 +0000 |
commit | 143d4514036243f223e7b7023784f57fca08318d (patch) | |
tree | 0b6e1e1e7aaa001aee564091bb393c18a270567f /utils/sbtools/sbtoelf.c | |
parent | 1a1ac92f453410b6f81ce6092b18162c1903af35 (diff) | |
download | rockbox-143d4514036243f223e7b7023784f57fca08318d.tar.gz rockbox-143d4514036243f223e7b7023784f57fca08318d.zip |
elftosb: add support for jumps/calls with one argument
sbtoelf: remove sb version check and print it in the basic info
Thanks TheLemonMan !
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30106 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/sbtools/sbtoelf.c')
-rw-r--r-- | utils/sbtools/sbtoelf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 7e6b77055b..851189f05e 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c | |||
@@ -355,15 +355,16 @@ static void extract(unsigned long filesize) | |||
355 | bugp("File size mismatch"); | 355 | bugp("File size mismatch"); |
356 | if(sb_header->header_size * BLOCK_SIZE != sizeof(struct sb_header_t)) | 356 | if(sb_header->header_size * BLOCK_SIZE != sizeof(struct sb_header_t)) |
357 | bugp("Bad header size"); | 357 | bugp("Bad header size"); |
358 | if((sb_header->major_ver != IMAGE_MAJOR_VERSION || | ||
359 | sb_header->minor_ver != IMAGE_MINOR_VERSION) && strcasecmp(s_getenv("SB_IGNORE_VER"), "YES")) | ||
360 | bugp("Bad file format version"); | ||
361 | if(sb_header->sec_hdr_size * BLOCK_SIZE != sizeof(struct sb_section_header_t)) | 358 | if(sb_header->sec_hdr_size * BLOCK_SIZE != sizeof(struct sb_section_header_t)) |
362 | bugp("Bad section header size"); | 359 | bugp("Bad section header size"); |
363 | 360 | ||
364 | color(BLUE); | 361 | color(BLUE); |
365 | printf("Basic info:\n"); | 362 | printf("Basic info:\n"); |
366 | color(GREEN); | 363 | color(GREEN); |
364 | printf(" SB version: "); | ||
365 | color(YELLOW); | ||
366 | printf("%d.%d\n", sb_header->major_ver, sb_header->minor_ver); | ||
367 | color(GREEN); | ||
367 | printf(" Header SHA-1: "); | 368 | printf(" Header SHA-1: "); |
368 | byte *hdr_sha1 = sb_header->sha1_header; | 369 | byte *hdr_sha1 = sb_header->sha1_header; |
369 | color(YELLOW); | 370 | color(YELLOW); |
@@ -716,7 +717,6 @@ int main(int argc, const char **argv) | |||
716 | { | 717 | { |
717 | printf("Usage: %s <firmware> <key file> [<out prefix>]\n",*argv); | 718 | printf("Usage: %s <firmware> <key file> [<out prefix>]\n",*argv); |
718 | printf("To use raw command mode, set environment variable SB_RAW_CMD to YES\n"); | 719 | printf("To use raw command mode, set environment variable SB_RAW_CMD to YES\n"); |
719 | printf("To ignore the file version check, set environment variable SB_IGNORE_VER to YES\n"); | ||
720 | return 1; | 720 | return 1; |
721 | } | 721 | } |
722 | 722 | ||