I need to proof out some concepts (e.g. UBI/UBIFS, storing multiple images in flash, etc) and I would like to utilize the NAND flash chip on my LS1046A-FRWY board for testing. I have been building via LLDP and the current image shows the following at boot. My understanding is the cmdline is actually setting up this MTD partitioning scheme here and I've verified that (I believe) by looking at /proc/cmdline.
[ 3.992285] Creating 3 MTD partitions on "7e800000.flash":
[ 3.997774] 0x000000000000-0x000001000000 : "nand_uboot"
[ 4.003679] 0x000001000000-0x000004000000 : "nand_kernel"
[ 4.009641] 0x000004000000-0x000020000000 : "nand_free"
[ 4.035931] Creating 3 MTD partitions on "1550000.spi":
[ 4.041158] 0x000000000000-0x000000100000 : "rcw"
[ 4.046398] 0x000000100000-0x000001000000 : "u-boot"
[ 4.051891] 0x000001000000-0x000004000000 : "kernel.itb"
...
root@ls1046afrwy:~# cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00020000 "nand_uboot"
mtd1: 03000000 00020000 "nand_kernel"
mtd2: 1c000000 00020000 "nand_free"
mtd3: 00100000 00010000 "rcw"
mtd4: 00f00000 00010000 "u-boot"
mtd5: 03000000 00010000 "kernel.itb"
root@ls1046afrwy:~# cat /proc/cmdline
console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.spi:1m(rcw),15m(u-boot),48m(kernel.itb);7e800000.flash:16m(nand_uboot),4
8m(nand_kernel),448m(nand_free)
I have a couple questions I need help answering whether that be a direct reply or referring me to a thorough resource.
U-Boot is patching the device tree with the info from the env variable mtdparts.
config FDT_FIXUP_PARTITIONS
overwrite MTD partitions in DTS through defined in ‘mtdparts’
Allow overwriting defined partitions in the device tree blob using partition info defined in the ‘mtdparts’ environment variable.