[ELDK] u-boot vs jffs2 partition

Cote, Sylvain Sylvain.Cote at verint.com
Mon Nov 24 21:37:31 CET 2008


Hi,

 

I want to try to boot from a formatted jffs2 (on NAND) partition.  Current supported command (cmd_nand.c u-boot 1.3.4) support:

 

"nand    - NAND sub-system\n",

"info                  - show available NAND devices\n"

"nand device [dev]     - show or set current device\n"

"nand read[.jffs2]     - addr off|partition size\n"

"nand write[.jffs2]    - addr off|partition size - read/write `size' bytes starting\n"

"    at offset `off' to/from memory address `addr'\n"

"nand erase [clean] [off size] - erase `size' bytes from\n"

"    offset `off' (entire device if not specified)\n"

"nand bad - show bad blocks\n"

"nand dump[.oob] off - dump page\n"

"nand scrub - really clean NAND erasing bad blocks (UNSAFE)\n"

"nand markbad off - mark bad block at offset (UNSAFE)\n"

"nand biterr off - make a bit error at offset (UNSAFE)\n"

"nand lock [tight] [status] - bring nand to lock state or display locked pages\n"

"nand unlock [offset] [size] - unlock section\n");

 

Currently I use : nand_nfs=run nfsargs addip addtty;nboot.jffs2 200000 0 0x180000;bootm

 

This read at offset 0x180000 in nand my uImage and load it in RAM at 200000.  Kernel is then started from there.

 

My partitioning looks like:

 

(NOR)

dev:    size   erasesize  name

mtd0: 00200000 00020000 "kernel"

mtd1: 00200000 00020000 "root"

mtd2: 03b60000 00020000 "user"

mtd3: 00040000 00020000 "env"

mtd4: 00060000 00020000 "u-boot"

 

(NAND)

mtd5: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"

mtd6: 00180000 00020000 "u-boot"

mtd7: 00700000 00020000 "Kernel"

mtd8: 00700000 00020000 "Kernel Backup"

mtd9: 00100000 00020000 "Empty"

mtd10: 00300000 00020000 "Config"

mtd11: 06c80000 00020000 "content"

 

To format my kernel partition, I have done (using linux 2.6.24 with mtd util):

 

flash_eraseall -j /dev/mtd7

nandwrite -a -p /dev/mtd7 /tmp/uImage

 

doing that I can do run nand_nfs with nand_nfs=run nfsargs addip addtty;nboot.jffs2 200000 0 0x180000;bootm

 

but cannot do run nand_nfs with nand_nfs=run nfsargs addip addtty;nboot.jffs2 Kernel;bootm

 

in that case I have: 

 

** No boot device **

Wrong Image Format for bootm command

ERROR: can't get kernel image!

 

I have also set:

 

mtdparts=physmap-flash.0:2M(linux),20M(ramdisk),4M(jffs2),38272k(user),256k(env),384k(uboot);NAND 128MiB 3,3V 8-bit:1536k(u-boot),7M(Kernel),7M(Kernel Backup),1M(Empty),3M(Config),111104k(content)

 

mtdids=nor0=physmap-flash.0,nand0=NAND 128MiB 3,3V 8-bit

 

So, my questions are:

 

Can we boot from a jffs2 partition in NAND using a partion name?

 

Can we have in the same partition two files let say uImage and a Initrd and in that case be able via u-boot to load the kernel uImage and the InitRD for ramdisk?

 

 

 

Thanks

 

Sylvain Côté

Wireless Technical Leader

Verint Video Solutions 

Phone (450) 686-9000 x 206 

Fax (450) 686-0198 

<www.verint.com>

 



More information about the eldk mailing list