[U-Boot-Users] NAND boot from file

Charles Krinke ckrinke at istor.com
Mon Dec 18 16:34:14 CET 2006

I have been able to perform a nand boot with nand read and write.jffs2
like this:

Write uImage
Uboot> tftp 0x1000000 uImage 
Uboot> nand write.jffs2 0x1000000 0 0x100000


Read uImage & boot from it
Uboot> nand read 0x1000000 0 0x100000
Uboot> bootm 0x1000000

This works fine, but I am trying to understand how to boot from a uImage
previously written on a formatted jffs2 flash by Linux- or if
it is possible. 

I see some hints that this may be possible with mtdids, mtdparts, fsinfo
and ls and would like to do something like

Write uImage with Linux using 'cp uImage /mnt/flash'
# flash_eraseall -j /dev/mtd0
# mount -t jffs2 /dev/mtdblock0 /mnt/flash0
# cp uImage /mnt/flash0


Read uImage
Uboot> setenv mtdids nand0=atx-0
Uboot> setenv mtdparts mtdparts=atx-0:16M at 0M(boot)
Uboot> <commandToDetermineImageOffset> <uImageOffset>
Uboot> nboot <uImageOffset>

There are a few issues. One is that I don't know the offset of the
uImage as written by Linux. Another is I don't know if this is the right
recipe or whether I am going in the right direction.

Could you offer a couple of suggestions.


More information about the U-Boot mailing list