From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:OpenWrt fwtool trailer" |
|---|
| claim | "An OpenWrt fwtool trailer is 16 bytes at the end of the data it describes: magic 'FWx0' (0x46577830), a running CRC-32, a type byte (0 signature, 1 info), 3 pad bytes and a big-endian size that includes the trailer; trailers are read from the end of the file." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:OpenWrt fwtool trailer" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "fwimage_trailer" |
|---|
| size | "0x10" |
|---|
| endianness | "big" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "crc32" |
|---|
|
| offset | "0x8" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "type" |
|---|
|
| offset | "0x9" |
|---|
| size | 3 |
|---|
| type | "uint8_t[3]" |
|---|
| name | "__pad" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "size" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct fwimage_trailer, FWIMAGE_MAGIC 0x46577830, enum fwimage_type" |
|---|
| repo | "https://github.com/openwrt/fwtool" |
|---|
| commit | "04cd252e4e9394ffacd51f56f1f124abc534f715" |
|---|
| path | "fwimage.h" |
|---|
| lines | "18-37" |
|---|
|
| type | "source" |
|---|
| detail | "trailer fields converted with cpu_to_be32; extraction walks tails, data_len = size - sizeof(tr); crc_table loop without final inversion" |
|---|
| repo | "https://github.com/openwrt/fwtool" |
|---|
| commit | "04cd252e4e9394ffacd51f56f1f124abc534f715" |
|---|
| path | "fwtool.c" |
|---|
| lines | "137-143, 186-215, 325-395" |
|---|
|
| type | "source" |
|---|
| detail | "crc32_block returns the running value (no inversion)" |
|---|
| repo | "https://github.com/openwrt/fwtool" |
|---|
| commit | "04cd252e4e9394ffacd51f56f1f124abc534f715" |
|---|
| path | "crc32.h" |
|---|
| lines | "39-48" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "fwimage trailer" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T06:50:47.945Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:12:56.011Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read fwtool fwimage.h at the cited commit: FWIMAGE_MAGIC 0x46577830, struct fwimage_trailer {u32 magic, u32 crc32, u8 type, u8 __pad[3], u32 size} = 16 bytes, enum SIGNATURE 0 / INFO 1. Big-endian conversion and CRC handling in fwtool.c not re-read." |
|---|
|
|
|---|