All of lore.kernel.org
 help / color / mirror / Atom feed
* Ways to copy FIT image from the flash to RAM
@ 2020-09-11 17:47 Andrii Voloshyn
  2020-09-17 20:26 ` Sean Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Andrii Voloshyn @ 2020-09-11 17:47 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Ways to copy FIT image from the flash to RAM
  2020-09-11 17:47 Ways to copy FIT image from the flash to RAM Andrii Voloshyn
@ 2020-09-17 20:26 ` Sean Anderson
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Anderson @ 2020-09-17 20:26 UTC (permalink / raw)
  To: u-boot


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-17 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 17:47 Ways to copy FIT image from the flash to RAM Andrii Voloshyn
2020-09-17 20:26 ` Sean Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.