Hello
I'm working with Yocto runing on an IMX6 system (MSC Q7iMX6-Plus), and I'm having problems with u-boot-fw-utils not being able to access the u-boot environment variables.
If I type mtdparts in u-boot I see the following output in the console:
U-Boot > mtdparts
device sflash0 <m25p16>, # parts = 4
#: name size offset mask_flags
0: init 0x00020000 0x00000000 0
1: uboot_data 0x00020000 0x00020000 0
2: uboot 0x00080000 0x00040000 0
3: boot_logo 0x00140000 0x000c0000 0
active partition: sflash0,0 - (init) 0x00020000 @ 0x00000000
defaults:
mtdids : none
mtdparts: none
The environment variable for mtdparts in uboot is:
mtdparts=mtdparts=m25p16:0x0000020000@0x0000000000(init),0x0000020000@0x0000020000(uboot_data),0x0000080000@0x0000040000(uboot),0x0000140000@0x00000c0000(boot_logo)
I have confirmed mtdparts is passed in the command line with cat /proc/cmdline
mtdparts=m25p16:0x0000020000@0x0000000000(init),0x0000020000@0x0000020000(uboot_data),0x0000080000@0x0000040000(uboot),0x0000140000@0x00000c0000(boot_logo)
But when I type cat /proc/mtd I see this:
root@msc-q7-imx6plus:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00008000 00008000 "spi0.0"
mtd1: 00008000 00008000 "spi0.1"
mtd2: 00200000 00010000 "spi3.0"
The above output bears no resembalence to the boot parameters or what is shown in u-boot.
After much research into this I'm aware that the mtd partion is setup either in the boot parameters, device tree or in the source itself. I have checked the source code for the device tree for my board, and also the kernel source for the board I'm working with, but cannot find any referenc to mtd partiion table, let alone what is shown by cat /proc/mtd.
So my question is what determines which parameters are used to define the mtd partition table, ie what decides whether it's the command line parameters, device tree, or embedded in the kernel source itself?
Thanks in advance
Andrew