public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: Ways to copy FIT image from the flash to RAM
Date: Thu, 17 Sep 2020 16:26:28 -0400	[thread overview]
Message-ID: <0e7fe69c-2198-a18c-4376-84a60fa36613@gmail.com> (raw)
In-Reply-To: <1747e47f1c0.1284c3b97115802.699746260582076082@d.mobilunity.com>


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

      reply	other threads:[~2020-09-17 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e7fe69c-2198-a18c-4376-84a60fa36613@gmail.com \
    --to=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox