kernel:基本概念
作者:互联网
bootloader 引导操作系统 (包括kernel,文件系统,设备树)
/***************** kernel格式之zImage *****************************/
1. The most well known format for the Linux kernel is the zImage.
2. The zImage contains a small header followed by a self-extracting code and
finally the payload itself.
3. U-Boot support this format by the bootz command.
补充:
zImage 组成
Header
DecompressingCode (所以称之为self-extracting)
Compressed Data
/***************** kernel格式之uImage *****************************/
1. When talking about U-Boot,the zImage is usually encapsulated in a file called uImage created with the mkimage utility.
当谈到U-Boot时,zImage通常封装在一个使用mkimage工具创建的名为uImage的文件中。
2. Beside image data, the uImage also contains information such as OS type, loader information, compression type and so on. Both data and header is checksumed with CRC32.
除了图像数据,uImage还包含OS类型、加载器信息、压缩类型等信息。数据和报头都用CRC32进行校验和。
3. The uImage format also supports multiple images. The zImage, initrd and devicetree blob may therefor be included in one single monolithic uImage. Drawbacks with this monolith is that it has no flexible indexing, no hash integrity and no support for security at all.
uImage格式还支持多个图像。因此,zImage、initrd和devicetree blob可以包含在单个单片uImage中。这个整体的缺点是,它没有灵活的索引,没有哈希完整性,完全不支持安全性。
总结:
zImage 通常使用mkimage工具封装在uImage中
uImage 还可能包含 zImage initr devicetree
uImage format
Header
Header checksum
Data size
Data load address
Entry point address
Data CRC
OS, CPU
Image type
Compression type
Image name
Image data
/***************** FIT(flattened Image Tree) *****************************/
This format has many benifits compared to the other:
1.Better solutions for multi component images
Multiple kernels (productions, feature, debug, rescue...)
Multiple devicetrees
Multiple initrds
2.Better hash integrity of images. Supports different hash algorithms like
SHA1
SHA256
MD5
crc32
3.Support signed images
Only boot verified images
Detect malware
标签:kernel,format,uImage,zImage,images,Data,基本概念 来源: https://blog.csdn.net/lexiaoyao521314/article/details/121119590