What is the difference between the two?
Image : Linux Linux kernel binary image file.
zImage : A compressed version of the Linux kernel image, which is self-extracting.
uImage : an image file with a U-Boot shell (installed using the mkimage utility), which includes information about the type of OS and bootloader.
A very common practice (for example, a typical Linux Makefile for Linux) is to use the zImage file. Since the zImage file is self-extracting (that is, it does not require external decompressors), the shell indicates that this kernel is βnot compressedβ, even if it really is.
Note that the author / developer of U-Boot considers the (widespread) use of using zImage inside uImage questionable:
Actually, it's pretty silly to use zImage inside a uImage. it's much better to use a normal (uncompressed) kernel image, compress it using only gzip, and use it as poayload for mkimage. Here, U-Boot does uncompresiong instead of including another uncompressor with each kernel image.
(cited https://lists.yoctoproject.org/pipermail/yocto/2013-October/016779.html )
What type of image should I use?
You can select everything you want to program. To save memory, you probably should choose a compressed image over an uncompressed one. Remember that kernel execution (presumably the Linux kernel) is not only about loading the kernel image into memory. Depending on the architecture (for example, ARM) and the version of the Linux kernel (for example, with or without DTB), there are registers and memory buffers that can be prepared for the kernel. In one case, there was also hardware initialization performed by U-Boot, which was to be replicated.
ADDITION
I know that u-boot needs a kernel in the uImage format.
This is accurate for all versions of U-Boot that have a bootm command.
But later versions of U-Boot may also contain the bootz command, which can load zImage.
sawdust Mar 11 '14 at 23:24 2014-03-11 23:24
source share