[U-Boot] Flashing images bigger than ram

Kyungmin Park kmpark at infradead.org
Wed Sep 16 01:30:22 CEST 2009


Hi,

On Wed, Sep 16, 2009 at 6:39 AM, Ben Goska <goskab at onid.oregonstate.edu> wrote:
> Is there a standard way to have U-Boot flash really large images? I
> want to setup rootfs flashing from U-Boot but this requires flashing
> an image that is bigger than the ram of my system. I thought about
> breaking the image into chunks, but when flashing to NAND with bad
> blocks it is difficult to handle skipping the bad blocks.
>
> I know I could make this happen with a custom command added to U-Boot
> but I was wondering if someone else had solved the problem already.
>
> My hardware: OMAP3530, 128MB Ram, 256MB NAND.
> Trying to flash from MMC (fat, or ext2) to NAND.
>

Please see the common/cmd_onenand.c

First it got the 32MiB data from USB or others. and then write it's
data to OneNAND.
Of course if it meets the bad blocks, just skip it and write again. I
called it skip write method.
Next time it adjust the start offset. of course upper layer don't know
it. Upper layer assume it write it exactly it sent.

In read side it's similar.
If it encounters the bad block. it also skip and read again. (skip read).

With this method. we can program flash even though we can't enough memory.

you can see the code. it's better to understand.

Thank you,
Kyungmin Park


More information about the U-Boot mailing list