Confused how to identify the NAND flash on my LS1046A-FRWY board (MTD)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Confused how to identify the NAND flash on my LS1046A-FRWY board (MTD)

212 Views
devnull0
Contributor II

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.

  1. Why is the cmdline (in U-boot) setup to make three partitions like this on the NAND chip for my FRWY board? Somebody somewhere obviously had a reason for doing this, what was that reason? RCW/TFA/UBoot that's all off the NOR now so I'm just fuddled as to what these MTD partitions are doing here? Maybe NXP thought a user might want to boot from NAND and thus they thought it was a good idea to just partition it like this in advance for the user? 

  2. Are there any consequences to setting up my own partitioning here on NAND for my proof of concept work? I mean, changing the MTD partitioning here shouldn't doing any bad right? It's just setting up multiple mtd character devices. I just want to make sure NXP isn't storing some hard coded thing (e.g. RCW) here and that by changing the partitioning setup I severely mess something up. 
0 Kudos
1 Reply

121 Views
yipingwang
NXP TechSupport
NXP TechSupport

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.

0 Kudos