2015年6月22日 星期一

Linux kernel mtdparts


Documentation/kernel-parameters.txt
drivers/mtd/cmdlinepart.c

 * mtdparts=[; *   := :[,]
 * := [@][][ro][lk]
CN5700 EVB, openwrt image https://downloads.openwrt.org/snapshots/trunk/octeon/generic/, Linux 3.18.14.
For Cavium Octeon, mtd-id is phy_mapped_flash:
[   33.269307] phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank. Manufacturer ID 0x000001 Chip ID 0x001001
This works for me:
mtdparts=phys_mapped_flash:2176k(U-Boot)ro,6008k(rootfs),8k(u-boot-env)ro

Managing flash storage with Linux
http://free-electrons.com/blog/managing-flash-storage-with-linux/
mtdparts=omap2-nand.0:128k(X-Loader)ro,256k(U-Boot)ro,128k(Environment),4m(Kernel)ro,32m(RootFS)ro,-(Data)

沒有留言: