Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:techref:image.format [2019/08/04 12:36] someothertimedocs:techref:image.format [2020/12/14 14:04] (current) – ↷ Links adapted because of a move operation tmomas
Line 3: Line 3:
 You can help to improve this page by adding explanations for the different firmware types below.\\ You can help to improve this page by adding explanations for the different firmware types below.\\
 </WRAP> </WRAP>
 +
 +If you are confused by the many different firmware types and extensions in the [[toh:views:toh_fwdownload|OpenWrt firmware downloads]] table, this pages tries to explain a bit about this topic.
  
 ===== Standard formats ===== ===== Standard formats =====
- 
- 
- 
 ==== factory (.img/.bin) ==== ==== factory (.img/.bin) ====
 Use when flashing from OEM ( non-openwrt ) (([[docs:guide-user:installation:before.installation]])) Use when flashing from OEM ( non-openwrt ) (([[docs:guide-user:installation:before.installation]]))
  
 If 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 web flash via the OEM UI is not possible... Please consult the Table of Hardware for your device for installation instructions from OEM firmware. If 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 web flash via the OEM UI is not possible... Please consult the Table of Hardware for your device for installation instructions from OEM firmware.
- 
  
 ==== sysupgrade ( or trx ) ==== ==== sysupgrade ( or trx ) ====
 +Previously known as //trx image//, //sysupgrade// is designed to be flashed from OpenWrt/LEDE itself (([[docs:guide-user:installation:before.installation]])). Commonly used when upgrading.
  
-Previously know as //trx image//, //sysupgrade// is designed to be flashed from OpenWrt/LEDE itself (([[docs:guide-user:installation:before.installation]])). Commonly used when upgrading.+===== Specific formats ===== 
 +==== ext4 ==== 
 +This firmware contains a regular ext4 Linux partitionMostly used in x86 and x86_x64 systems.
  
- +==== squashfs ==== 
-===== Specific formats =====+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. 
 +.bin/.chk/.trx 
 +  * See also [[docs:techref:headers|TRX vs. TRX2 vs. BIN]]
  
 ==== initramfs ==== ==== 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. ((https://forum.lede-project.org/t/toward-a-good-flashing-lede-instructions-page/52/5))+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. ((https://forum.lede-project.org/t/toward-a-good-flashing-lede-instructions-page/52/5))
  
 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. 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.
Line 28: Line 31:
 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. 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-uImage.bin: 
-====  initramfs-kernel.bin ====+initramfs-kernel.bin:
  
-==== ext4 ==== +==== sdcard.img.gz ==== 
-This firmware contains a regular ext4 Linux partition Mostly used in x86 and x86_x64 systems. +Used by few devices ( mvebu/RPi etc. ), most often multi partition image which is uncompressed and written to external storage via PC.
- +
-==== squashfs ==== +
-This firmware contains type of partition that is compressed and mounts read-only. All modifications (file edit, new files, deleted files) are committed to an overlay.+
  
 ==== rootfs ==== ==== rootfs ====
Line 50: Line 50:
  
 ==== tftp ==== ==== tftp ====
-<color #ed1c24>Designed to be loaded from tftp server.  Device in recovery mode?</color>+<color #ed1c24>Designed to be loaded from tftp server. Device in recovery mode?</color>
  
 ==== u-boot ==== ==== u-boot ====
-<color #ed1c24>This is an image format designed for U-Boot loader.  Same as initramfs-or-uImage?</color> +<color #ed1c24>This is an image format designed for U-Boot loader. Same as initramfs-or-uImage?</color>
- +
- +
-==== sdcard.img.gz ==== +
-Used by few devices ( mvebu/RPi etc. ), most often a multi partition image which is uncompressed and written to external storage via PC. +
- +
- +
-==== squashfs.bin/.chk/.trx ==== +
-  * See also [[docs:techref:header|TRX vs. TRX2 vs. BIN]] +
 ==== ubinized.bin ==== ==== ubinized.bin ====
  
Line 70: Line 61:
 ==== zImage ==== ==== zImage ====
 zImage is a compressed plain kernel with a ‘pyggyback’. Some extra code which can decompress the kernel before booting it. zImage is a compressed plain kernel with a ‘pyggyback’. Some extra code which can decompress the kernel before booting it.
- 
  
 ===== Subformats ===== ===== Subformats =====
- 
 ==== bin, img, elf, dtb, chk, dlf ==== ==== bin, img, elf, dtb, chk, dlf ====
 These are raw binary data of the firmware file These are raw binary data of the firmware file
Line 79: Line 68:
 ==== xz, gz, tar, lzma ==== ==== xz, gz, tar, lzma ====
 These are compressed images These are compressed images
- 
  
 ===== Developer files ===== ===== Developer files =====
- 
 ==== sdk ==== ==== sdk ====
 SDK Toolchain for compiling single userspace packages ((https://we.riseup.net/lackof/openwrt-on-x86-64)) SDK Toolchain for compiling single userspace packages ((https://we.riseup.net/lackof/openwrt-on-x86-64))
Line 92: Line 79:
 Linux kernel for build ((https://we.riseup.net/lackof/openwrt-on-x86-64)) Linux kernel for build ((https://we.riseup.net/lackof/openwrt-on-x86-64))
  
- +====== Example Firmware image names ======
- +
-====== Firmware image names ====== +
-~~NOTOC~~ +
- +
-If you are confused by the many different firmware types and extensions in the [[toh:views:toh_fwdownload|LEDE firmware downloads]] table, read on, this pages tries to explain a bit about this topic. +
- +
-<WRAP center round info 50%> +
-You can help to improve this page by adding explanations for the different firmware types below.\\ +
-</WRAP> +
- +
 ===== Firmware types ===== ===== Firmware types =====
-^ Target       ^ Install                                                                                     ^ Upgrade                                             +^ Target ^ Install ^ Upgrade ^ 
-| adm5120      | squashfs.bin                                                                                | squashfs.bin                                        +| adm5120 | squashfs.bin | squashfs.bin | 
-| apm821xx     | squashfs-factory.img\\ initramfs-kernel.bin                                                 | squashfs-sysupgrade.tar\\ ext4-rootfs.img.gz        +| apm821xx | squashfs-factory.img\\ initramfs-kernel.bin | squashfs-sysupgrade.tar\\ ext4-rootfs.img.gz | 
-| ar7          | squashfs.bin\\ squashfs-code.bin                                                            | squashfs.bin                                        +| ar7 | squashfs.bin\\ squashfs-code.bin | squashfs.bin | 
-| ar71xx       | factory.img\\ factory.bin                                                                   | sysupgrade.bin                                      +| ar71xx | factory.img\\ factory.bin | sysupgrade.bin | 
-| at91                                                                                                                                                         +| at91 | | | 
-| atheros      | squashfs-factory.bin                                                                        | squashfs-sysupgrade.tar                             +| atheros | squashfs-factory.bin | squashfs-sysupgrade.tar | 
-| brcm2708     | ext4-sdcard.img.gz                                                                          | -                                                   +| brcm2708 | ext4-sdcard.img.gz | - | 
-| brcm47xx     | squashfs.bin\\ squashfs.chk\\ squashfs.trx                                                  | squashfs.bin\\ squashfs.chk\\ squashfs.trx          +| brcm47xx | squashfs.bin\\ squashfs.chk\\ squashfs.trx | squashfs.bin\\ squashfs.chk\\ squashfs.trx | 
-| bcm53xx      | squashfs.bin\\ squashfs.chk\\ squashfs.trx                                                  | \\ 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                             +| brcm63xx | squashfs-cfe.bin\\ squashfs-factory.chk | squashfs-sysupgrade.bin | 
-| cns3xxx      | -                                                                                           | sysupgrade.bin                                      +| cns3xxx | - | sysupgrade.bin | 
-| imx6         | ?                                                                                           | ?                                                   +| imx6 | ? | ? | 
-| ipq806x      | factory.img                                                                                 | sysupgrade.tar                                      +| ipq806x | factory.img | sysupgrade.tar | 
-| ixp4xx       | squashfs.bin\\ squashfs.img\\ zImage                                                        | squashfs-sysupgrade.bin                             +| ixp4xx | squashfs.bin\\ squashfs.img\\ zImage | squashfs-sysupgrade.bin | 
-| kirkwood     | squashfs-factory.bin                                                                        | squashfs-sysupgrade.bin                             +| kirkwood | squashfs-factory.bin | squashfs-sysupgrade.bin | 
-| lantiq       | initramfs-kernel.bin\\ squashfs-factory.bin                                                 | squashfs-sysupgrade.bin                             +| lantiq | initramfs-kernel.bin\\ squashfs-factory.bin | squashfs-sysupgrade.bin | 
-| layerscape   | squashfs-firmware.bin                                                                       | -                                                   +| layerscape | squashfs-firmware.bin | - | 
-| mpc85xx      | squashfs-factory.bin                                                                        | squashfs-sysupgrade.bin                             +| mpc85xx | squashfs-factory.bin | squashfs-sysupgrade.bin | 
-| mvebu        | sdcard.img.gz\\ squashfs-factory.img                                                        | \\ squashfs-sysupgrade.bin                          +| mvebu | sdcard.img.gz\\ squashfs-factory.img | \\ squashfs-sysupgrade.bin | 
-| mxs          | ?                                                                                           | ?                                                   +| mxs | ? | ? | 
-| orion        | not supported                                                                               | not supported                                       +| orion | not supported | not supported | 
-| oxnas        | squashfs-ubinized.bin\\ ubifs-ubinized.bin                                                  | squashfs-sysupgrade.tar\\ ubifs-sysupgrade.tar      +| 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   +| 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                                                                                                    +| sunxi | ext4-sdcard.img.gz \\ squashfs-sdcard.img.gz | | 
-| x86          | combined-ext4.img                                                                           | combined-ext4.img.gz                                | +| x86 | combined-ext4.img | combined-ext4.img.gz |
- +
- +
- +
  
 ====== Image Formats General ====== ====== Image Formats General ======
Line 144: Line 116:
  
 ===== Known Formats ===== ===== Known Formats =====
- 
 by extension: by extension:
   * BIN   * BIN
Line 153: Line 124:
  
 ===== Other Formats ===== ===== Other Formats =====
 +  * see [[docs:techref:brcm63xx.imagetag]]
 +  * see [[docs:techref:headers]]
  
-  * see [[docs:techref:brcm63xx.imagetag]] 
-  * see [[docs:techref:header]] 
  • Last modified: 2019/08/04 12:36
  • by someothertime