配置和生成
Flattened Image Tree 顾名思义,是参考 Flattened Device Tree 命令而来,使用 DTS 的语法, 通过一些新增的节点,描述生成镜像文件所使用的 Image 文件和配置。
例子如:
source/uboot-2021.10/doc/uImage.FIT/kernel_fdt.its
/dts-v1/; / { description = "Simple image with single Linux kernel and FDT blob"; #address-cells = <1>; images { kernel { description = "Vanilla Linux kernel"; data = /incbin/("./vmlinux.bin.gz"); type = "kernel"; arch = "ppc"; os = "linux"; compression = "gzip"; load = <00000000>; entry = <00000000>; hash-1 { algo = "crc32"; }; hash-2 { algo = "sha1"; }; }; fdt-1 { description = "Flattened Device Tree blob"; data = /incbin/("./target.dtb"); type = "flat_dt"; arch = "ppc"; compression = "none"; hash-1 { algo = "crc32"; }; hash-2 { algo = "sha1"; }; }; }; configurations { default = "conf-1"; conf-1 { description = "Boot Linux kernel with FDT blob"; kernel = "kernel"; fdt = "fdt-1"; }; }; };
此处描述的一个配置,其中包含了 fdt + kernel,以及校验方式。
生成 itb
image的命令:
mkimage -f kernel_fdt.its kernel_fdt.itb