firmware-utils: mktplinkfw2: update firmware header
authorRafał Miłecki <rafal@milecki.pl>
Sun, 2 Jul 2017 09:23:52 +0000 (11:23 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 8 Jul 2017 16:10:16 +0000 (18:10 +0200)
1) Be consistent and use tabs
2) Drop FIXME from boot comments - some images use these fields normally

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
tools/firmware-utils/src/mktplinkfw2.c

index fbf1f0df9e358e66dc3427d703e82f5e1c1289b3..e49777773f4096956404a92e50ffaed1fee440c7 100644 (file)
@@ -39,32 +39,32 @@ struct file_info {
 };
 
 struct fw_header {
-       uint32_t        version;        /* 0x00: header version */
-       char            fw_version[48]; /* 0x04: fw version string */
-       uint32_t        hw_id;          /* 0x34: hardware id */
-       uint32_t        hw_rev;         /* 0x38: FIXME: hardware revision? */
-       uint32_t        hw_ver_add;     /* 0x3c: additional hardware version */
-       uint8_t         md5sum1[MD5SUM_LEN]; /* 0x40 */
-       uint32_t        unk2;           /* 0x50: 0x00000000 */
-       uint8_t         md5sum2[MD5SUM_LEN]; /* 0x54 */
-       uint32_t        unk3;           /* 0x64: 0xffffffff */
-
-       uint32_t        kernel_la;      /* 0x68: kernel load address */
-       uint32_t        kernel_ep;      /* 0x6c: kernel entry point */
-       uint32_t        fw_length;      /* 0x70: total length of the image */
-       uint32_t        kernel_ofs;     /* 0x74: kernel data offset */
-       uint32_t        kernel_len;     /* 0x78: kernel data length */
-       uint32_t        rootfs_ofs;     /* 0x7c: rootfs data offset */
-       uint32_t        rootfs_len;     /* 0x80: rootfs data length */
-       uint32_t        boot_ofs;       /* 0x84: FIXME: seems to be unused */
-       uint32_t        boot_len;       /* 0x88: FIXME: seems to be unused */
-       uint16_t        unk4;           /* 0x8c: 0x55aa */
-       uint8_t         sver_hi;        /* 0x8e */
-       uint8_t         sver_lo;        /* 0x8f */
-       uint8_t         unk5;           /* 0x90: magic: 0xa5 */
-       uint8_t         ver_hi;         /* 0x91 */
-       uint8_t         ver_mid;        /* 0x92 */
-       uint8_t         ver_lo;         /* 0x93 */
+       uint32_t        version;                        /* 0x00: header version */
+       char            fw_version[48];                 /* 0x04: fw version string */
+       uint32_t        hw_id;                          /* 0x34: hardware id */
+       uint32_t        hw_rev;                         /* 0x38: FIXME: hardware revision? */
+       uint32_t        hw_ver_add;                     /* 0x3c: additional hardware version */
+       uint8_t         md5sum1[MD5SUM_LEN];            /* 0x40 */
+       uint32_t        unk2;                           /* 0x50: 0x00000000 */
+       uint8_t         md5sum2[MD5SUM_LEN];            /* 0x54 */
+       uint32_t        unk3;                           /* 0x64: 0xffffffff */
+
+       uint32_t        kernel_la;                      /* 0x68: kernel load address */
+       uint32_t        kernel_ep;                      /* 0x6c: kernel entry point */
+       uint32_t        fw_length;                      /* 0x70: total length of the image */
+       uint32_t        kernel_ofs;                     /* 0x74: kernel data offset */
+       uint32_t        kernel_len;                     /* 0x78: kernel data length */
+       uint32_t        rootfs_ofs;                     /* 0x7c: rootfs data offset */
+       uint32_t        rootfs_len;                     /* 0x80: rootfs data length */
+       uint32_t        boot_ofs;                       /* 0x84: bootloader offset */
+       uint32_t        boot_len;                       /* 0x88: bootloader length */
+       uint16_t        unk4;                           /* 0x8c: 0x55aa */
+       uint8_t         sver_hi;                        /* 0x8e */
+       uint8_t         sver_lo;                        /* 0x8f */
+       uint8_t         unk5;                           /* 0x90: magic: 0xa5 */
+       uint8_t         ver_hi;                         /* 0x91 */
+       uint8_t         ver_mid;                        /* 0x92 */
+       uint8_t         ver_lo;                         /* 0x93 */
        uint8_t         pad[364];
 } __attribute__ ((packed));