Uimage production is the use of U-boot tools Mkimage,build after U-boot will also be mkimage build out to/tools directory, can be directly used, it is in front of the zimage to add 64 bytes of head, Allows U-boot to identify the type of kernel to load, load addresses, and so on.
Basic format: mkimage-a arch-o os-t type-c comp-a addr-e ep-n name-d data_file[:d ata_file ...] image
-A Specifies the architecture of the CPU: (U-boot supports multiple architectures, this should be arm)
value Represents the architecture of
alpha alpha
arm a rm
x86 intel x86
ia64 ia64
mips mips
mips64 MIPS-A-Bit
ppc PowerPC
s390 ibm S390
sh superh
sparc SPARC
sparc64 SPARC 64 Bit
m68k MC68000
-o Specifies the operating system type, which can take the following values: (U-boot supports a variety of OS, this should be Linux)
OpenBSD, NetBSD, FreeBSD, 4_4bsd, Linux, SVR4, Esix, Solaris, IRIX, SCO, Dell, NCR, LynxOS, VxWorks, PSOs, QNX, U-boot, Rtems, Artos
-t specifies the image type and can take the following values: (U-boot can load different images, this should be kernel)
Standalone, kernel, RAMDisk, multi, firmware, script, filesystem
-c Specifies the image compression method, you can take the following values: (in addition to the zimage itself is a compressed format, U-boot can also be re-compressed, this should be none)
None No compression
Gzip compression method with gzip
Bzip2 compression method with bzip2
-a specifies the address of the image to be loaded in memory, which can be different from the actual load (such as TFTP loading), or the same, as explained later.
-e Specifies the entry address for the image to run, which can be equal to the load address or the address after the address offset 64 bytes (+0x40) is loaded, as explained later.
-n Specifies the image name
-d Specifies "source file" and the generated "target file name "
The most adjusted parameter is-A,-e, and these two parameters need to be consistent with the action that is actually loaded into memory.
1. If the address specified by the-a parameter is different when the load is loaded, then-e must be equal to-a. U-boot will remove the kernel image without a 64-byte information header and move it to-e, and start directly. Note that the storage space for the two image does not overlap, leaving at least the space of image size between the two.
Compilation Environment:
Mkimage-a arm-o linux-t kernel-c none-a 0x70008000-e 0x70008000-n ' Linux '-D zimage uimage
CP uimage/tftpboot/
Target Board Environment:
TFTP 0x72200000 uimage; Bootm 0x72200000;
2. If the address at load is the same as the-a parameter, then-E must be the address of-a + 0x40. At this point the u-boot does not need to perform the move again, starting directly according to the e-mail address.
Compilation Environment:
Mkimage-a arm-o linux-t kernel-c none-a 0x0x70008000-e 0x70008040-n ' Linux '-D zimage uimage
CP uimage/tftpboot/
Target Board Environment:
TFTP 0x70008000 uimage; Bootm 0x70008000;
U-boot mkimage Specify the Linux kernel address in two ways