[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: uboot-envtools parameter file for Marvel OpenRD "ultimate"



On Aug 12, 2012, at 3:35 PM, shawn wrote:
#my commandline:
# cat /proc/cmdline
console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw
mtdparts=orion_nand:0x100000@0x0(u-boot),0x400000@0x100000(uImage), 0x1fb00000@0x500000(rootfs) rw

man proc -> type "//proc/cmdline" -> hit [enter]

      /proc/cmdline
             Arguments passed to the Linux kernel at boot time.  Often
done  via  a  boot
             manager such as lilo(8) or grub(8).
the mtdparts= is how you specify the partitioning of NAND flash via the
kernel command line.

On Aug 12, 2012, at 3:43 PM, Eric Cooper wrote:
The mtdparts kernel parameter is currently documented only in the
kernel source code (in drivers/mtd/cmdlinepart.c):

* The format for the command line is as follows:
*
* mtdparts=<mtddef>[;<mtddef]
* <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
*              where <mtd-id> is the name from the "cat /proc/mtd"
* command
* <partdef> := <size>[@offset][<name>][ro][lk]
* <mtd-id>  := unique name used in mapping driver/device (mtd->name)
* <size>    := standard linux memsize OR "-" to denote all remaining
* space
* <name>    := '(' NAME ')'
*
* Examples:
*
* 1 NOR Flash, with 1 single writable partition:
* edb7312-nor:-
*
* 1 NOR Flash with 2 partitions, 1 NAND with one
* edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)


Thanks Shawn and Eric! That helps me figure out which parts are which and gives some clue to what it means.

Nevertheless, I still have a couple of larger questions that maybe somebody can answer...

*) I assume that we need an mtd partition starting at zero because that's were the 0xa0000 is relative to? and 0xa0000 is the location of the area containing the uboot environment variables?

*) Why didn't the folks at Marvell make the partition starting at zero visible to Linux? Lazy? or they didn't want to clutter up the interface? or something else?

*) Presumably making the mtd partition starting at zero visible to Linux will alter the names of the other mtd partitions. Is this going to cause any problems down the line? like, with the programs that write the kernel and initrd to flash during an upgrade? will they have names like "mtd0" hard coded? or do they somehow find their targets adaptively?

Thanks!

Rick


Reply to: