Format:U-Boot legacy uImage
| Magic | 27 05 19 56 |
|---|---|
| Extensions | .uImage, .ub, .img |
| Endianness | big |
| License | GPL-2.0+ (U-Boot) |
| On this wiki | Facts · Code · Notes · Topics |
The 64-byte big-endian header mkimage puts in front of a kernel, ramdisk or script for U-Boot: magic 0x27051956, CRCs, load and entry addresses, and OS, architecture, type and compression codes.
Header (struct legacy_img_hdr, 64 bytes, all big-endian)
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | ih_magic 0x27051956 (IH_MAGIC)
|
| 4 | 4 | ih_hcrc: CRC32 of the header with this field zeroed |
| 8 | 4 | ih_time: creation Unix time |
| 12 | 4 | ih_size: payload size |
| 16 | 4 | ih_load: load address |
| 20 | 4 | ih_ep: entry point |
| 24 | 4 | ih_dcrc: CRC32 of the payload |
| 28 | 1 | ih_os |
| 29 | 1 | ih_arch |
| 30 | 1 | ih_type |
| 31 | 1 | ih_comp |
| 32 | 32 | ih_name (NUL-padded) |
The payload follows at offset 64. Multi-file images (type 4) start with a list of big-endian u32 sizes ended by 0, then the files each padded to 4 bytes. Strip 64 bytes and run the payload through the matching decompressor, then see Platform:Linux kernel for the kernel and Format:Cpio newc (initramfs) for ramdisks. Modern builds use Format:FIT image instead.
See also Technique:Unpacking firmware update containers.
Codes (U-Boot include/image.h)
OS: 0 invalid, 1 OpenBSD, 2 NetBSD, 3 FreeBSD, 4 4.4BSD, 5 Linux, 6 SVR4, 7 Esix, 8 Solaris, 9 Irix, 10 SCO, 11 Dell, 12 NCR, 13 LynxOS, 14 VxWorks, 15 pSOS, 16 QNX, 17 U-Boot firmware, 18 RTEMS, 19 ARTOS, 20 Unity, 21 INTEGRITY, 22 OSE, 23 Plan 9, 24 OpenRTOS, 25 ARM Trusted Firmware, 26 TEE, 27 OpenSBI, 28 EFI, 29 ELF.
Architecture: 1 Alpha, 2 ARM, 3 x86, 4 IA64, 5 MIPS, 6 MIPS64, 7 PowerPC, 8 S390, 9 SuperH, 10 SPARC, 11 SPARC64, 12 M68K, 13 Nios, 14 MicroBlaze, 15 Nios II, 16 Blackfin, 17 AVR32, 18 ST200, 19 Sandbox, 20 NDS32, 21 OpenRISC, 22 ARM64, 23 ARC, 24 x86_64, 25 Xtensa, 26 RISC-V.
Type: 1 standalone, 2 kernel, 3 ramdisk, 4 multi, 5 firmware, 6 script, 7 filesystem, 8 flat device tree (Format:Flattened device tree), 14 kernel (no load address), 22 loadable list; the rest (9-13, 15-21, 23+) are SoC boot images such as kwbimage, imximage, omapimage, rkimage.
Compression: 0 none, 1 gzip, 2 bzip2, 3 lzma, 4 lzo, 5 lz4, 6 zstd.
The code lists are append-only, so numbers are stable across U-Boot versions. Source: u-boot include/image.h.
Code & repositories
- https://github.com/u-boot/u-boot @
8d534cec0cc0109a37c0ded8854da03f1526dc0e· license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize COPYING)
U-Boot include/image.h: legacy header, IH_* codes and FIT property names
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2026-10-16