[U-Boot-Users] NAND boot from file

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
(reboot)
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-2.6.17.11 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
(reboot)
Read uImage Uboot> setenv mtdids nand0=atx-0 Uboot> setenv mtdparts mtdparts=atx-0:16M@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.
Charles

In message A590D28B5042C041BCC880094CB6172E33DF3C@mail1irv.inside.istor.com you wrote:
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
(reboot)
Read uImage Uboot> setenv mtdids nand0=atx-0 Uboot> setenv mtdparts mtdparts=atx-0:16M@0M(boot)
OK.
Uboot> <commandToDetermineImageOffset> <uImageOffset> Uboot> nboot <uImageOffset>
Um... if this is JFFS2, then why not simply "fsload" + "bootm" ?
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.
JFFS2 is a supported file system, so use file system code to read the files.
Best regards,
Wolfgang Denk
participants (2)
-
Charles Krinke
-
Wolfgang Denk