Old regression with MTD devices disappearing from a Kurobox HD/HG

Scott Wood scottwood at freescale.com
Fri Apr 10 08:28:30 AEST 2015


On Thu, 2015-04-09 at 18:54 -0300, Rogério Brito wrote:
> Dear Scott and other people,
> 
> Just for the record, I am passing now the following command line option to
> the kernel:
> 
>     mtdparts=myflash:4096k(allflash),3072k(firmimg),448k at 3072k(bootcode),64k at 3520k(status),512k at 3584k(conf)

What is "myflash"?  You need to match the device name that the kernel
uses.

What is "allflash"?  If the flash is only 4 MiB and you're trying to
make the first partition refer to the entire flash, it won't work.
It'll see that 4 MiB partition and ignore the rest as being beyond the
end of the device.

> which is, according to my best knowledge, how the flash is laid out.
> Unfortunately, it doesn't help: I still have only /dev/mtd0. Here is what
> part of my configuration looks like:
> 
> ,----
> | # uname -r
> | 4.0.0-rc7-00016-g7b43b47
> | # grep -i mtd config-$(uname -r)
> | CONFIG_CMDLINE="netconsole=6666 at 192.168.11.150/, at 192.168.11.149/ rtc-rs5c372.probe=0,0x32 root=/dev/sda1 mtdparts=myflash:4096k(allflash),3072k(firmimg),448k at 3072k(bootcode),64k at 3520k(status),512k at 3584k(conf)"
> | CONFIG_MTD=y
> | # CONFIG_MTD_TESTS is not set
> | # CONFIG_MTD_REDBOOT_PARTS is not set
> | CONFIG_MTD_CMDLINE_PARTS=y
> | CONFIG_MTD_OF_PARTS=y
> | # CONFIG_MTD_AR7_PARTS is not set
> | CONFIG_MTD_BLKDEVS=y
> | CONFIG_MTD_BLOCK=y
> | (...)
> `----
> 
> Do the options CONFIG_MTD_CMDLINE_PARTS and CONFIG_MTD_OF_PARTS somehow
> "conflict" with each other?

No.  CONFIG_MTD_OF_PARTS only matters if you're describing the flash
chip in the device tree, and even then cmdline mtdparts takes precedence
if present.

-Scott




More information about the Linuxppc-dev mailing list