After the kernel is compiled (make), two files are generated, one image and one zimage. image is the kernel image file, and zimage is the kernel Image Compression file, the image size is about 4 m, while the zimage size is less than 2 m.
What is uimage? It is a uboot-specific image file. It is added with a 64-Byte "Header" before zimage, indicating the kernel version, loading location, generation time, size, and other information; it is no different from zimage after 0x40.
How to generate a uimage file? Find the mkimage file in the/tools directory of uboot and copy it to the/usr/local/bin directory. Then run makeuimage in the kernel directory. If it succeeds, you can find the uimage file in the arch/ARM/boot/directory, which is 64 bytes larger than zimage.
In fact, it is an automatic and manual difference. With the uimage header description, U-boot will know the information of the corresponding image. If there is no header, You need to manually set those parameters.
U-boot U means "General.
Zimage is a commonly used compressed image file in armlinux. uimage is a dedicated image file for U-boot. It adds a "Header" with a length of 0x40 before zimage ", specifies the type, loading location, generation time, size, and other information of the image file. In other words, there is no difference between zimage and uimage if it is executed directly from the position 0x40 of uimage. In addition, the linux2.4 kernel does not support uimage. The linux2.6 kernel has many support for embedded systems, but uimage generation also needs to be set. I will introduce this later.
Several TypesLinuxDifferences between kernel files:
1. The original kernel file compiled by vmlinux is not compressed.
2. zimage is a gzip compressed file in vmlinux.
3. bzimagebz indicates "bigzimage", which is not compressed with Bzip2. The difference between the two is that zimage decompress the kernel to the low-end memory (the first 640 K), and bzimage decompress the kernel to the high-end memory (more than 1 MB ). If the kernel is small, zimage or bzimage will be used. If the kernel is large, bzimage will be used.
4. uimage U-boot is a dedicated image file. It is added with a tag with a length of 0x40 before zimage.
5. vmlinuz is a copy of bzimage/zimage file or a link to bzimage/zimage.
6. initrd is short for "initialramdisk. It is usually used to temporarily boot the hardware to the State in which the actual kernel vmlinuz can take over and continue to boot.
Generally, after vmlinux is generated, the kernel is compressed to zimage. The compressed directory is
Kernel/ARCH/ARM/boot.
The compressed zimage file is downloaded to flash, and zimage is composed of the compressed vmlinux and decompression program, as shown in:
View the datasheet of 2410 and find that the base address of the memory ing is 0x30000000.
So how does 0x30008000 come from?
The Kernel File kernel/document/ARM/booting contains:
Calling the kernel Image
Existingboot loaders: Mandatory
New boot loaders: Mandatory
There aretwo options for calling the kernel zimage. If the zimage is stored inflash, and is linked correctly to be run
From Flash, then it islegal for the boot loader to call the zimage in Flash directly.
Thezimage may also be placed in system RAM (at any location) and calledthere. Note that the kernel uses 16 K
Ram below the image tostore page tables. The recommended placement is 32kib into RAM.
It seems that 32 K (0x8000) space is used under the image to store the kernel page table,
0x30008000 is the startup address of the 2410 kernel in Ram.
Usually, the U-BOOT kernel and file system are downloaded to the SDRAM through TFTP, and then burned to the NAND Flash, because the SDRAM is prone to power loss. Use the Data Manual to query the initial address of the SDRAM and then fix it. SDRAM is similar to memory, and NAND Flash is equivalent to hard disk. Set the U-BOOT to start from NAND flash after burning and writing.