I've used binwalk before, but these images don't show a uImage header.
Stock firmware downloaded from Netgear's website:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
58 0x3A TRX firmware header, little endian, image size: 5472256 bytes, CRC32: 0x5D5D9E7E, flags: 0x0, version: 1, header size: 28 bytes, loader offset: 0x1C, linux kernel offset: 0x1208CC, rootfs offset: 0x0
86 0x56 LZMA compressed data, properties: 0x5D, dictionary size: 65536 bytes, uncompressed size: 3433512 bytes
1181958 0x120906 Squashfs filesystem, little endian, non-standard signature, version 3.0, size: 4284555 bytes, 702 inodes, blocksize: 65536 bytes, created: 2020-07-22 08:06:11
OpenWrt firmware for similar Netgear router:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
58 0x3A TRX firmware header, little endian, image size: 4329472 bytes, CRC32: 0xAAD2E46D, flags: 0x0, version: 1, header size: 28 bytes, loader offset: 0x1C, linux kernel offset: 0x944, rootfs offset: 0x175000
86 0x56 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
2430 0x97E LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: -1 bytes
1527866 0x17503A Squashfs filesystem, little endian, version 4.0, compression:xz, size: 2514358 bytes, 1177 inodes, blocksize: 262144 bytes, created: 2021-01-19 13:10:02
Stock firmware, dumped from the stock firmware's outputimage
utility:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
43956 0xABB4 gzip compressed data, maximum compression, has original file name: "piggy", from Unix, last modified: 2012-08-29 03:38:35
262144 0x40000 TRX firmware header, little endian, image size: 5341184 bytes, CRC32: 0x212215FC, flags: 0x0, version: 1, header size: 28 bytes, loader offset: 0x1C, linux kernel offset: 0x12088C, rootfs offset: 0x0
262172 0x4001C LZMA compressed data, properties: 0x5D, dictionary size: 65536 bytes, uncompressed size: 3433512 bytes
1443980 0x16088C Squashfs filesystem, little endian, non-standard signature, version 3.0, size: 4153870 bytes, 703 inodes, blocksize: 65536 bytes, created: 2012-08-30 06:22:12
7667728 0x750010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7733264 0x760010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7798800 0x770010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7864336 0x780010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7929872 0x790010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
Stock firmware, dumped from CFE:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
43956 0xABB4 gzip compressed data, maximum compression, has original file name: "piggy", from Unix, last modified: 2012-08-29 03:38:35
262144 0x40000 TRX firmware header, little endian, image size: 5341184 bytes, CRC32: 0x212215FC, flags: 0x0, version: 1, header size: 28 bytes, loader offset: 0x1C, linux kernel offset: 0x12088C, rootfs offset: 0x0
262172 0x4001C LZMA compressed data, properties: 0x5D, dictionary size: 65536 bytes, uncompressed size: 3433512 bytes
1443980 0x16088C Squashfs filesystem, little endian, non-standard signature, version 3.0, size: 4153870 bytes, 703 inodes, blocksize: 65536 bytes, created: 2012-08-30 06:22:12
7667728 0x750010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7733264 0x760010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7798800 0x770010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7864336 0x780010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
7929872 0x790010 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
I did strings
on that piggy
stuff before the TRX header, and it had the help and error messages from CFE, so I'm assuming that's the CFE. Correct me if I'm wrong, but it seems like the flash is set up like this:
- CFE
- TRX header (thanks for the link about how these work)
- LZMA-compressed kernel
- squashfs filesystem
- ???
The firmware update files to start with the TRX header. Does that mean they don't include a CFE? If CFE remains untouched, I'm ready to flash pretty much anything, now that I have a backup. I dug through the firmwares with binwalk -Me
and couldn't find anything that looks like a CFE. Maybe that means it's compressed, but I'm hoping that means that these updates don't touch CFE. What do you think?