General informations
The Linux Kernel configuration itemConfig_mtd_cmdline_partsHas multiple definitions:
Drivers/MTD/kconfig
The configuration item config_mtd_cmdline_parts:
- Prompt: Command Line Partition Table Parsing
- Type: tristate
- Depends on:
Config_mtd_partitions = "Y" & config_mtd = "Y"
- Defined in drivers/MTD/kconfig
- Found in linux kernels: From 2.6.0 release still available on 2.6.39 release
- Module created:
Cmdlinepart
Help text
Allow generic configuration of the MTD partition tables via the kernel command line. Multiple flash resources are supported for hardware where different kinds of flash memory are available.
You will still need the parsing functions to be called by the driver for your particle device. it won't happen automatically. the sa1100 map Driver (config_mtd_sa1100) has an option for this, for example.
The format for the command line is as follows:
Mtdparts = <mtddef> [; <mtddef] <mtddef >:=< MTD-ID >:< partdef> [, <partdef>] <partdef>: = <size> [@ offset] [<Name>] [Ro] <MTD-ID >:= unique ID used in mapping driver/device <size>: = standard Linux memsize or "-" to denote all remaining space <name >:= (name)
Due to the way Linux handles the command line,No spaces are allowed in the partition definition (spaces are not allowed in the middle), Including mtd id's and partition names.
Examples:
1 flash Resource (MTD-ID "sa1100"), with 1 single writable partition: mtdparts = sa1100 :-
Same flash, but 2 named partitions, the first one being read-only: mtdparts = sa1100: 256 K (armboot) Ro,-(Root)
If unsure, say 'n '.
1. uboot $ mtdparts and Linux/dev/MTD *
For example:
Uboot: # setenv mtdparts 'mtdparts = nx_2016: 1408k @ 0 K (BOOT), 128k @ 1408 K (ENV),-(extra); nx_2017: 16 m (k0 ), 16 m (K1),-(nandextra )'
Linux: # Cat/proc/MTD
Dev: Size erasesize name
Mtd0: 00160000 00010000 "Boot"
Mtd1: 00020000 00010000 "env"
Mtd2: 00280000 00010000 "extra"
Mtd3: 00400000 00010000 "nx_2016"
Mtd4: 04000000 00004000 "nx_2017"
Mtd5: 01000000 00004000 "K0"
Mtd6: 01000000 00004000 "K1"
Mtd7: 02000000 00004000 "nandextra"
There are several questions:
1. <MTD-ID >:= unique ID used in mapping driver/Device?