This is an old revision of the document!
Image formats
You can help to improve this page by adding explanations for the different firmware types below.
Standard formats
sysupgrade or trx images
Previously know as trx image, sysupgrade is designed to be flashed from OpenWrt/LEDE itself 1).
factory
Designed to be flashed by the bootloader flasher or stock firmware flasher 2)
Specific formats
initramfs
Can be loaded from an arbitrary location ( most often tftp ) and is self-contained in memory. This is like a Linux LiveCD. Often used to test firmware, as the first part of a multi-stage installation or as a recovery tool. 3)
uImage
This is an image format designed for U-Boot loader, generally consisting of a kernel with a header for the bootloader.
ext4
This firmware contains a regular ext4 Linux partition. Mostly used in x86 and x86_x64 systems.
squashfs
This firmware contains a type of partition that is compressed and mounts read-only. All modifications (file edit, new files, deleted files) are committed to an overlay.
rootfs
Only the root filesystem of LEDE
kernel
Linux core, generally without compression or appended headers.
ubifs
??
ubi
??
tftp
Designed to be loaded from tftp server. Device in recovery mode?
u-boot
This is an image format designed for U-Boot loader. Same as initramfs-or-uImage?
Subformats
bin, img, elf, dtb, chk, dlf
These are raw binary data of the firmware file
xz, gz, tar, lzma
These are compressed images
Developer files
sdk
SDK Toolchain for compiling single userspace packages 4)
Imagebuilder
To build custom images without compiling 5)
vmlinux
Linux kernel for build 6)
Firmware image names
If you are confused by the many different firmware types and extensions in the LEDE firmware downloads table, read on, this pages tries to explain a bit about this topic.
You can help to improve this page by adding explanations for the different firmware types below.
Firmware types
| Target | Install | Upgrade |
|---|---|---|
| adm5120 | squashfs.bin | squashfs.bin |
| apm821xx | squashfs-factory.img initramfs-kernel.bin | squashfs-sysupgrade.tar ext4-rootfs.img.gz |
| ar7 | squashfs.bin squashfs-code.bin | squashfs.bin |
| ar71xx | factory.img factory.bin | sysupgrade.bin |
| at91 | ||
| atheros | squashfs-factory.bin | squashfs-sysupgrade.tar |
| brcm2708 | ext4-sdcard.img.gz | - |
| brcm47xx | squashfs.bin squashfs.chk squashfs.trx | squashfs.bin squashfs.chk squashfs.trx |
| bcm53xx | squashfs.bin squashfs.chk squashfs.trx | squashfs.chk squashfs.trx |
| brcm63xx | squashfs-cfe.bin squashfs-factory.chk | squashfs-sysupgrade.bin |
| cns3xxx | - | sysupgrade.bin |
| imx6 | ? | ? |
| ipq806x | factory.img | sysupgrade.tar |
| ixp4xx | squashfs.bin squashfs.img zImage | squashfs-sysupgrade.bin |
| kirkwood | squashfs-factory.bin | squashfs-sysupgrade.bin |
| lantiq | initramfs-kernel.bin squashfs-factory.bin | squashfs-sysupgrade.bin |
| layerscape | squashfs-firmware.bin | - |
| mpc85xx | squashfs-factory.bin | squashfs-sysupgrade.bin |
| mvebu | sdcard.img.gz squashfs-factory.img | squashfs-sysupgrade.bin |
| mxs | ? | ? |
| orion | not supported | not supported |
| oxnas | squashfs-ubinized.bin ubifs-ubinized.bin | squashfs-sysupgrade.tar ubifs-sysupgrade.tar |
| ramips | initramfs-kernel.bin squashfs-factory.bin squashfs-factory.dlf initramfs-uImage.bin | squashfs-sysupgrade.bin squashfs-sysupgrade.tar |
| sunxi | ext4-sdcard.img.gz squashfs-sdcard.img.gz | |
| x86 | combined-ext4.img | combined-ext4.img.gz |
Explanations
factory.img/.bin
initramfs
An initramfs and initrd are basically the same. It’s a filesystem in memory, which contains userland software. In an embedded environment it might contain the whole distro, on bigger systems it can contain tools&scripts to assemble&mount raid arrays and stuff like that before passing userland boot to them. Both can have a uHeader, to let uBoot know what it is.
The initramfs-kernel image is used for development or special situations as a one-time boot as a stepping stone toward installing the regular sysupgrade version. Since the initramfs version runs entirely from RAM, it does not store any settings in flash, so it is not suitable for operational use.
initramfs-uImage.bin
initramfs-kernel.bin
sdcard.img.gz
sysupgrade / factory
There are basically two potential reasons why only a sysupgrade image is available for your router, either the router is already running some kind of OpenWrt fork (which understands the sysupgrade format natively) or there simply is no known way to assemble a factory image accepted by the router.
Source: https://forum.lede-project.org/t/install-lede-on-sitecom-wlr-8100/3304/2
sysupgrade.bin/.tar
squashfs.bin/.chk/.trx
- See also TRX vs. TRX2 vs. BIN
ubinized.bin
uImage
uImage is (in most cases) a zImage with a 64 byte uImage header, which contains the load address & entry point of the zImage, so that uBoot knows what to do with it. Further is contains a description of the actual contents (linux kernel, version, …)
zImage
zImage is a compressed plain kernel with a ‘pyggyback’. Some extra code which can decompress the kernel before booting it.
Image Formats General
This article describes and links to the various factory firmware image formats found.
For OpenWrt Flash Layout see: flash.layout.
Binwalk can help to analyze unknown formats.
Known Formats
by extension:
- BIN
- CHK
- DLF
- IMG
- TRX
Other Formats
- see header