做搜狗pc网站,运营管理系统,博客网站 做淘宝客,厦门有什么好企业网站1、编译
FIT image 文件的编译过程很简单#xff0c;根据实际情况#xff0c;编写image source file之后#xff08;假设名称为u-boot.its#xff09;#xff0c;在命令行使用mkimage工具编译即可#xff1a;
./tools/mkimage [-D dtc_options] [-f fit-image.its|-f a…1、编译
FIT image 文件的编译过程很简单根据实际情况编写image source file之后假设名称为u-boot.its在命令行使用mkimage工具编译即可
./tools/mkimage [-D dtc_options] [-f fit-image.its|-f auto|-f auto-conf|-F] [-b dtb [-b dtb]] [-E] [-B size] [-i ramdisk.cpio.gz] fit-imagedtb file is used with -f auto, it may occur multiple times.-D set all options for device tree compiler-f input filename for FIT source-i input filename for ramdisk file-E place data outside of the FIT structure-B align size in hex for FIT structure and header-b append the device tree binary to the FIT-t update the timestamp in the FIT其中
-D指定 DTCDevice Tree Compiler编译器的选项
-f 指定需要编译的image source file并在后面指定需要生成的image文件一般以.itb为后缀例如u-boot.itb。
-i指定用于创建 FIT 镜像的 RAM disk 文件名
-E将image data file放置在FIT结构外的选项
-B指定 FIT 结构和头的对齐大小
-b支持将一个或多个设备树二进制文件附加到 FIT 文件中可使用 -b dtb 多次指定;
-t更新 FIT 文件中的时间戳;
其中-E这个字段比较重要它会影响生成的itb的文件布局
如果没有指定该选项其生成的itb文件格式和dts文件编译生成的dtb文件布局一样包括data属性指定的/incbin/(bl31_0x00040000.bin)文件也会以二进制数据格式的形式放到FIT结构内
如果指定了该选项会为data属性指向的文件扩充data-offset指定文件的偏移这个偏移是以FIT结构结束地址下一扇区起始地址开始计算的、以及data-size指定文件的大小属性而在data属性指向的二进制数据文件将会被追加到FIT结构的尾部也是扇区对齐下面我们分析的itb文件布局格式就是这种因此我们可以采用如下方式生成u-boot.itb文件
./tools/mkimage -f u-boot.its -E u-boot.itbu-boot.itb生成后也可以使用mkimage命令查看它的信息
tools/mkimage -l u-boot.itb2源文件its
/dts-v1/;/ {description Configuration to load ATF before U-Boot;#address-cells 1;images {uboot {description U-Boot (64-bit);data /incbin/(u-boot-nodtb.bin);type standalone;os U-Boot;arch arm64;compression none;load 0x00200000;hash {algo sha256;};};atf1 {description ARM Trusted Firmware;data /incbin/(bl31_0x00040000.bin);type firmware;arch arm64;os arm-trusted-firmware;compression none;load 0x00040000;entry 0x00040000;hash {algo sha256;};};atf2 {description ARM Trusted Firmware;data /incbin/(bl31_0xff3b0000.bin);type firmware;arch arm64;os arm-trusted-firmware;compression none;load 0xff3b0000;hash {algo sha256;};};atf3 {description ARM Trusted Firmware;data /incbin/(bl31_0xff8c0000.bin);type firmware;arch arm64;os arm-trusted-firmware;compression none;load 0xff8c0000;hash {algo sha256;};};atf4 {description ARM Trusted Firmware;data /incbin/(bl31_0xff8c1000.bin);type firmware;arch arm64;os arm-trusted-firmware;compression none;load 0xff8c1000;hash {algo sha256;};};atf5 {description ARM Trusted Firmware;data /incbin/(bl31_0xff8c2000.bin);type firmware;arch arm64;os arm-trusted-firmware;compression none;load 0xff8c2000;hash {algo sha256;};};fdt {description U-Boot device tree blob;data /incbin/(u-boot.dtb);type flat_dt;arch arm64;compression none;hash {algo sha256;};};};configurations {default config;config {description Rockchip armv8 with ATF;rollback-index 0x0;firmware atf1;loadables uboot, atf2 , atf3 , atf4 , atf5 , atf6 ;fdt fdt;signature {algo sha256,rsa2048;padding pss;key-name-hint dev;sign-images fdt, firmware, loadables;};};};};由于configs/xx_defconfig中配置了CONFIG_SPL_FIT_GENERATOR因此这里会通过脚本生成u-boot.its
CONFIG_SPL_FIT_GENERATOR“arch/arm/mach-rockchip/make_fit_atf.py”