Boot from NAND

59 views
Skip to first unread message

Jason Kridner

unread,
May 27, 2008, 6:45:50 PM5/27/08
to Beagle Board
Does anyone have a working version of x-loader that boots from NAND?

Syed Mohammed, Khasim

unread,
May 27, 2008, 10:08:27 PM5/27/08
to beagl...@googlegroups.com

 

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
MLO
u-boot.bin

sakoman

unread,
May 28, 2008, 9:14:20 AM5/28/08
to Beagle Board
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

On May 27, 7:08 pm, "Syed Mohammed, Khasim " <sm.kha...@gmail.com>
wrote:
> 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
>
> On 5/28/08, Jason Kridner <jkrid...@gmail.com> wrote:
>
>
>
> > Does anyone have a working version of x-loader that boots from NAND?
>
>
>
> x-load.bin.ift
> 12KDownload
>
> MLO
> 22KDownload
>
> u-boot.bin
> 947KDownload

sakoman

unread,
May 28, 2008, 4:10:46 PM5/28/08
to Beagle Board
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

On May 27, 7:08 pm, "Syed Mohammed, Khasim " <sm.kha...@gmail.com>
wrote:
> 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
>
> On 5/28/08, Jason Kridner <jkrid...@gmail.com> wrote:
>
>
>
> > Does anyone have a working version of x-loader that boots from NAND?
>
>
>

Syed Mohammed, Khasim

unread,
May 29, 2008, 1:57:53 AM5/29/08
to beagl...@googlegroups.com
Hi Steve,

On 5/29/08, sakoman <sak...@gmail.com> wrote:

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?
 
Yes, I have code for handling bad blocks in u-boot developed for EVM, need to add the same for Beagle.
 
I was hanging with USB host all this time, now I think I can spend some considerable time on Kernel, uboot and mainly Demos on Beagle. Will keep you all updated.
 
Regards,
Khasim

den...@gmail.com

unread,
May 30, 2008, 4:50:49 PM5/30/08
to Beagle Board
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.
Reply all
Reply to author
Forward
0 new messages