Search code examples
u-boot

uboot using FIT to upgrade


I am using a custom embedded rtos and booting with uboot via a FIT image. "bootm" works very nicely with this .itb container.

I would like to include in the Sha signed image .itb file upgrades to my filesystem. That way uboot (via scripts) can upgrade files in the flash fat filesystem. The docs file update_uboot.its gives a hint as to what I need with:

    update@1 {
        description = "U-Boot binary";
        data = /incbin/("./u-boot.bin");
        compression = "none";
        type = "firmware";
        load = <FFFC0000>;
        hash@1 {
            algo = "sha1";
        };
    };

Where presumably this is a packaged binary upgrade for u-boot. And I can generate the image file with mkimage. However I cannot find any directions of how to use this or flash this, etc.

And generically there are several very interesting FIT types like "filesystem" which imply there is a way to package up a complete filesystem. That is very close to what I want, but I cannot find any way to extract and flash the filesystem from u-boot scripts.

I tried to do a "cp $loadaddr:update@1 0x90000000 10" but cp does not copy the data from the itb file. And from the source it looks like do_mem_cp does not do any special FIT syntax handling.

I am using a fairly recent TI Sitara uboot (u-boot-2016.05+gitAUTOINC+2f757e5b2c-g2f757e5b2c), do I need to modify the source to do what I want?

Thanks, Steve


Solution

  • You're looking for the imxtract command to extract parts of a FIT image in memory.