Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Isaac702

By: a guest on May 23rd, 2009  |  syntax: None  |  size: 1.37 KB  |  views: 159  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. *** imagetag.c  2009-05-23 18:10:39.000000000 +0100
  2. --- imagetag1.c 2009-05-24 00:05:40.000000000 +0100
  3. ***************
  4. *** 52,58 ****
  5.         struct imagecomp        kernel;         /* 116 - 137: The offset and length of the kernel */
  6.         uint8_t                 dualimage[2];   /* 138 - 139: use "0" here */
  7.         uint8_t                 inactive[2];    /* 140 - 141: use "0" here */
  8. !       uint8_t                 reserved1[74];  /* 142 - 215: reserved */
  9.         uint32_t                imagecrc;       /* 216 - 219: crc of the images (net byte order) */
  10.   //    uint8_t                 reserved2[16];  /* 220 - 235: reserved */
  11.         uint8_t                 reserved2[4];   /* 220 - 223: reserved */
  12. --- 52,60 ----
  13.         struct imagecomp        kernel;         /* 116 - 137: The offset and length of the kernel */
  14.         uint8_t                 dualimage[2];   /* 138 - 139: use "0" here */
  15.         uint8_t                 inactive[2];    /* 140 - 141: use "0" here */
  16. !       uint8_t                 reserved1[50];  /* 142 - 191: reserved */
  17. !       uint8_t                 flashver[2];    /* 192 - 193: reserved */
  18. !       uint8_t                 reserved4[22];  /* 194 - 215: reserved */
  19.         uint32_t                imagecrc;       /* 216 - 219: crc of the images (net byte order) */
  20.   //    uint8_t                 reserved2[16];  /* 220 - 235: reserved */
  21.         uint8_t                 reserved2[4];   /* 220 - 223: reserved */
  22. ***************
  23. *** 271,276 ****
  24. --- 273,279 ----
  25.                 sprintf(tag.wrtrootfslen, "%lu", rootfslen);
  26.         }
  27.  
  28. +       strcpy(tag.flashver, "5");
  29.         tag.imagecrc = htonl(crc);
  30.         tag.headercrc = htonl(crc32(IMAGETAG_CRC_START, (uint8_t*)&tag, sizeof(tag) - 20));