OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 105... Line 105...
105 static uint32_t reserved_space; 105 static uint32_t reserved_space;
Line 106... Line 106...
106   106  
107 static struct file_info inspect_info; 107 static struct file_info inspect_info;
108 static int extract = 0; 108 static int extract = 0;
109 static bool endian_swap = false; -  
Line 110... Line 109...
110 static bool rootfs_ofs_calc = false; 109 static bool endian_swap = false;
111   110  
112 static const char md5salt_normal[MD5SUM_LEN] = { 111 static const char md5salt_normal[MD5SUM_LEN] = {
113 0xdc, 0xd7, 0x3a, 0xa5, 0xc3, 0x95, 0x98, 0xfb, 112 0xdc, 0xd7, 0x3a, 0xa5, 0xc3, 0x95, 0x98, 0xfb,
Line 201... Line 200...
201 " -F <id> use flash layout specified with <id>\n" 200 " -F <id> use flash layout specified with <id>\n"
202 " -k <file> read kernel image from the file <file>\n" 201 " -k <file> read kernel image from the file <file>\n"
203 " -r <file> read rootfs image from the file <file>\n" 202 " -r <file> read rootfs image from the file <file>\n"
204 " -a <align> align the rootfs start on an <align> bytes boundary\n" 203 " -a <align> align the rootfs start on an <align> bytes boundary\n"
205 " -R <offset> overwrite rootfs offset with <offset> (hexval prefixed with 0x)\n" 204 " -R <offset> overwrite rootfs offset with <offset> (hexval prefixed with 0x)\n"
206 " -O calculate rootfs offset for combined images\n" -  
207 " -o <file> write output to the file <file>\n" 205 " -o <file> write output to the file <file>\n"
208 " -s strip padding from the end of the image\n" 206 " -s strip padding from the end of the image\n"
209 " -j add jffs2 end-of-filesystem markers\n" 207 " -j add jffs2 end-of-filesystem markers\n"
210 " -N <vendor> set image vendor to <vendor>\n" 208 " -N <vendor> set image vendor to <vendor>\n"
211 " -V <version> set image version to <version>\n" 209 " -V <version> set image version to <version>\n"
Line 384... Line 382...
384 hdr->fw_length = htonl(layout->fw_max_len); 382 hdr->fw_length = htonl(layout->fw_max_len);
385 hdr->rootfs_ofs = htonl(rootfs_ofs); 383 hdr->rootfs_ofs = htonl(rootfs_ofs);
386 hdr->rootfs_len = htonl(rootfs_info.file_size); 384 hdr->rootfs_len = htonl(rootfs_info.file_size);
387 } 385 }
Line 388... Line -...
388   -  
389 if (combined && rootfs_ofs_calc) { -  
390 hdr->rootfs_ofs = htonl(sizeof(struct fw_header) + kernel_len); -  
391 } -  
392   386  
393 hdr->ver_hi = htons(fw_ver_hi); 387 hdr->ver_hi = htons(fw_ver_hi);
394 hdr->ver_mid = htons(fw_ver_mid); 388 hdr->ver_mid = htons(fw_ver_mid);
Line 395... Line 389...
395 hdr->ver_lo = htons(fw_ver_lo); 389 hdr->ver_lo = htons(fw_ver_lo);
Line 543... Line 537...
543 progname = basename(argv[0]); 537 progname = basename(argv[0]);
Line 544... Line 538...
544   538  
545 while ( 1 ) { 539 while ( 1 ) {
Line 546... Line 540...
546 int c; 540 int c;
547   541  
548 c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:OxX:ehsjv:"); 542 c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:ehsjv:");
Line 549... Line 543...
549 if (c == -1) 543 if (c == -1)
550 break; 544 break;
Line 596... Line 590...
596 sscanf(optarg, "0x%x", &rootfs_ofs); 590 sscanf(optarg, "0x%x", &rootfs_ofs);
597 break; 591 break;
598 case 'o': 592 case 'o':
599 ofname = optarg; 593 ofname = optarg;
600 break; 594 break;
601 case 'O': -  
602 rootfs_ofs_calc = 1; -  
603 break; -  
604 case 's': 595 case 's':
605 strip_padding = 1; 596 strip_padding = 1;
606 break; 597 break;
607 case 'i': 598 case 'i':
608 inspect_info.file_name = optarg; 599 inspect_info.file_name = optarg;