diff options
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 | ||