什么是FIT uImage?

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/rikeyone/article/details/86594196

全称是flattened image tree uImage,为了更好的支持单个固件的通用性,类似于kernel device tree机制,uboot也需要对这种uImage固件进行支持。FIT uImage中加入多个dtb文件,和ramdisak文件,当然如果需要的话,同样可以支持多个kernel文件。

这样的目的就是能够使同一个uImage就能够在uboot中选择特定的kernel/dtb和ramdisk进行启动了,达成也该uImage可以通用多个板型的目的。它的特点如下:

  • 可以打包一个或者多个kernel
  • 可以打包一个或者多个dtb
  • 可以打包一个或者多个ramdisk

使用its文件来描述这个uImage的组成结构,并且编译时也需要此文件。举个例子:

{

    description = "U-Boot uImage FDT blobs";

    #address-cells = <1>;



    images {

        kernel@sdm660 {

            description = "Linux kernel";

            data = /incbin/("out/linux/arch/arm/boot/zImage");

            type = "kernel";

            arch = "arm";

            os = "linux";

            compression = "none";

            load = <0x20008000>;

            entry = <0x20008000>;

        };

        fdt@sdm660 {

            description = "Flattened Device Tree blob";

            data = /incbin/("out/linux/arch/arm/boot/dts/sdm660 .dtb");

            type = "flat_dt";

            arch = "arm";

            compression = "none";

        };

        ramdisk@sdm660  {

            description = "Ramdisk";

            data = /incbin/("out/rootfs/initramfs.gz");

            type = "ramdisk";

            arch = "arm";

            os = "linux";

            compression = "gzip";

        };

    };



    configurations {

        default = "conf@sdm660";

        conf@sdm660 {

            description = "Boot Linux kernel with FDT blob";

            kernel = "kernel@sdm660";

            fdt = "fdt@sdm660";

            ramdisk = "ramdisk@sdm660";

        };

    };

};

猜你喜欢

转载自blog.csdn.net/rikeyone/article/details/86594196
今日推荐