[U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
Sergey Kubushyn
ksi at koi8.net
Wed Sep 28 19:17:21 CEST 2016
On Wed, 28 Sep 2016, Jagan Teki wrote:
> On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushyn <ksi at koi8.net> wrote:
>> Here is yet another version, diff made against latest u-boot-imx master.
>>
>> Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some
>> functions renamed. No other changes.
>
>
> <snip>
>
>> return CMD_RET_USAGE;
>> }
>> @@ -766,6 +816,17 @@ static char nand_help_text[] =
>> " 'addr', skipping bad blocks and dropping any pages at the
>> end\n"
>> " of eraseblocks that contain only 0xFF\n"
>> #endif
>> +#ifdef CONFIG_CMD_NAND_BOOTUPDATE
>> + "nand bootupdate - [addr] [size]\n"
>
> What is the addr here the nand offset or the ddr addr? I tried of
> doing the same but unable to boot any help?
It is where the actual U-Boot image is loaded in RAM. If "nand bootupdate"
is done right after reading U-Boot binary into RAM (e.g. with ext4load)
those can be both omitted.
As a matter of fact I'm finishing a bunch of changes to U-Boot, including
that bootupdate command and 2 new boards right now and going to submit all
that either tonight or tomorrow.
NAND bootupdate works like a charm here and we do actually use it in actual
production environment with both Linux and Android; firmware updates do
update U-Boot itself as a part of regular network (or OTA how it is called
in Android) updates.
Will try to write a small README file on that if times permitted.
Please note that it has been only tested on i.MX6 (don't have anything else
here; all our boards are i.MX6D/Q/DL.) We do not use SPL.
As of your case I'm not exactly sure what you are trying to achieve. That
entire NAND boot thing with all FCB/DBBT/whatever only applies to INITIAL
boot off of raw NAND device. It allows to boot either the full U-Boot or
SPL using i.MX6 NAND ROM boot routine that reads that FCB and whatever
else then loads actual binary (either U-Boot or SPL or whatever) according
to information in that FCB and runs it.
If you are booting your SPL off of some other media and then trying to load
second stage U-Boot from raw NAND you don't need all that FCB kabang. The
DCB part (if U-Boot is built as i.MX6 image) is also not needed so it can
be stripped or skipped. However your SPL must properly configure NAND
itself so it would be able to read from it and it should include all stuff
required to actually read data from NAND.
The FCB/DBBT stuff is only needed for initial boot off of raw NAND. If you
are going to boot off of NAND and want to have your U-Boot in NAND (that is
the only logical use of NAND for U-Boot) I can not see any reason for going
SPL road but you might have your own reasons that I don't know.
---
******************************************************************
* KSI at home KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
More information about the U-Boot
mailing list