[source] firmware-utils: mktplinkfw2: update firmware header
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 8 09:10:36 PDT 2017
rmilecki pushed a commit to source.git, branch master:
https://git.lede-project.org/90e27a185fe112d81371a7281553c639e4d6c687
commit 90e27a185fe112d81371a7281553c639e4d6c687
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Sun Jul 2 11:23:52 2017 +0200
firmware-utils: mktplinkfw2: update firmware header
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 at milecki.pl>
---
tools/firmware-utils/src/mktplinkfw2.c | 52 +++++++++++++++++-----------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c
index fbf1f0d..e497777 100644
--- a/tools/firmware-utils/src/mktplinkfw2.c
+++ b/tools/firmware-utils/src/mktplinkfw2.c
@@ -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));
More information about the lede-commits
mailing list