Boot from NAND

Does anyone have a working version of x-loader that boots from NAND?

Copy attached files (u-boot.bin, MLO and x-load.bin.ift) in MMC card.

Procedure to Flash x-loader and u-boot onto NAND flash on Beagle board

Copy the attached files onto a MMC card. Execute the following commands,

mmcinit

fatload mmc 0 0x80200000 x-load.bin.ift

nand unlock

nand ecc hw

nand erase 0 80000

nand write 0x80200000 0 80000

fatload mmc 0 0x80200000 u-boot.bin

nand unlock

nand ecc sw

nand erase 80000 160000

nand write 0x80200000 80000 160000

To boot from NAND, power cycle the board without holding the user switch, if you hold the user switch then it will boot from MMC.

NOTE: after flashing some content on FLASH, you “should” hold USER switch to boot from MMC

Will update these sources on code.google.com.

The u-boot and x-loader are for 166Mhz DDR, the kernel image might hang if power mods are not done on the board.

Regards,

Khasim

x-load.bin.ift (9.58 KB)

MLO (16.4 KB)

u-boot.bin (701 KB)

Khasim,

Thanks for posting this!

One question -- the old u-boot used to write its environment at nand
offset C0000. Obviously this would be a bad thing given the new-u-
boot's size increase!

Have you updated the u-boot source code to move the environment to
something like 260000?

Regards,

Steve

Khasim,

I've been able to use your procedure to write xload, u-boot, and
uImage to my nand. I am also able to boot using those images.

When I move to the next step, writing a jffs2 root file system, I run
into issues with bad blocks.

The u-boot "nand erase" command fails when it encounters a bad block.

Have you developed a strategy for dealing with bad blocks in nand?

Steve

Hi Steve,

Yes, we have bad block management for Micron NAND in u-boot now for
EVM, but you can work it around in Linux by booting off a ramdisk
filesystem and erasing/writing JFFS filesystem with MTD utils
(nandwrite -j). Bad blocks should be avoided by Linux automatically.