[U-Boot] [PATCH 1/1]: add nand_bootupdate for i.MX6 and likes

Sergey Kubushyn ksi at koi8.net
Sat Oct 8 01:16:48 CEST 2016


On Fri, 7 Oct 2016, Scott Wood wrote:

> On Wed, 2016-10-05 at 12:57 -0700, Sergey Kubushyn wrote:
>> This one adds nand_bootupdate command for i.MX6 and similar MCUs. It
>> generates proper NAND boot structures (FCB, DBBT, etc) and writes those
>> along with U-Boot mx image to where they belong so system would be able
>> to boot off of raw NAND.
>
> This seems like a lot of code just to write some images to various places.
>  What are these "NAND boot structures" and do they really need to be generated
> by U-Boot, or can they be generated by a tool to produce an image that U-Boot
> writes to NAND as is?  I do see there are some things to be filled in based on
> NAND parameters, bad blocks, etc. but can this patching up be minimized (and
> the necessary parts explained in the changelog)?

The entire idea is to _REPLACE_ the only existing tool, kobs-ng. It only
works from Linux so one has to get everything up and running before he
could actually write U-Boot in NAND that is catch 22.

It can _NOT_ be generated with an external tool somewhere else because it
is specific to the NAND chip installed on a particular board i.e. it MUST
be generated in-place. Furthermore it is NOT a static info as it can change
as time goes and NAND develops new bad blocks so it MUST be re-generated
each and every time U-Boot is written to a particular board's NAND.

Those NAND boot structures are headers required by i.MX6 and their brethen
Boot ROM to boot off of raw NAND. It won't boot if any of those headers is
missing or incorrect.

There is no other method for putting i.MX6 NAND U-boot for bootup from
raw NAND at present time other than using kobs-ng utility under Linux
_RAN ON THAT PARTICULAR BOARD_ where U-Boot needs to be written to NAND.

>> This is my THIRD attempt to get it into the main U-Boot tree. I do
>> really hope it would get applied before I retire.
>
> It helps to CC relevant people...

Making another patch with proper CCs now so the ritual will be performed
properly.

---
******************************************************************
*  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