Ways to copy FIT image from the flash to RAM

Hi there,
What are the ways of copying whole FIT image form NOR flash to RAM by specifying flash offset without any extra bytes. I've seen quite a lot of times when kernel image size has a fixed value (as an uboot environment variable), which is greater than the actual kernel size. Problem with that that we copy from flash whatever is after kernel which is not required, and there is a potential problem when kernel gets bigger at some point than the fixed size specified in the variable mentioned above. As FIT file has all required info about size, is there a command to copy it to RAM from flash?
Thank you
Cheers, Andy

On 9/11/20 1:47 PM, Andrii Voloshyn wrote:
Hi there,
What are the ways of copying whole FIT image form NOR flash to RAM by specifying flash offset without any extra bytes.
I've seen quite a lot of times when kernel image size has a fixed value (as an uboot environment variable), which is greater than the actual kernel size. Problem with that that we copy from flash whatever is after kernel which is not required, and there is a potential problem when kernel gets bigger at some point than the fixed size specified in the variable mentioned above. As FIT file has all required info about size, is there a command to copy it to RAM from flash?
Thank you
Cheers, Andy
Yes... but only for NAND flash...
I am also interested in booting from NOR flash, so I was looking around and noticed that the function nand_load_image used by the nboot command contains no nand-specific functionality. Although it calls nand_read_skip_bad, that in turn only call simple wrappers around generic mtd functions. The only nan-specific part is the check against unknown command suffixes, which is easily moved to do_nandboot.
In terms of things already supported by U-Boot, you could format your flash device with UBIFS, and then use ubifsmount/ubifsload/bootm to boot.
--Sean
participants (2)
-
Andrii Voloshyn
-
Sean Anderson