blob: 760a3f7c3ed4ef6d2cc9bdbac01a3709e328e9e5 [file] [log] [blame]
Paul Gortmaker080506a2013-09-30 13:45:19 -07001Embedded device command line partition parsing
Cai Zhiyongbab55412013-09-11 14:20:09 -07002=====================================================================
3
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -07004The "blkdevparts" command line option adds support for reading the
5block device partition table from the kernel command line.
6
Paul Gortmaker080506a2013-09-30 13:45:19 -07007It is typically used for fixed block (eMMC) embedded devices.
8It has no MBR, so saves storage space. Bootloader can be easily accessed
Cai Zhiyongbab55412013-09-11 14:20:09 -07009by absolute address of data on the block device.
10Users can easily change the partition.
11
12The format for the command line is just like mtdparts:
13
14blkdevparts=<blkdev-def>[;<blkdev-def>]
15 <blkdev-def> := <blkdev-id>:<partdef>[,<partdef>]
16 <partdef> := <size>[@<offset>](part-name)
17
18<blkdev-id>
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -070019 block device disk name. Embedded device uses fixed block device.
20 Its disk name is also fixed, such as: mmcblk0, mmcblk1, mmcblk0boot0.
Cai Zhiyongbab55412013-09-11 14:20:09 -070021
22<size>
23 partition size, in bytes, such as: 512, 1m, 1G.
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -070024 size may contain an optional suffix of (upper or lower case):
25 K, M, G, T, P, E.
26 "-" is used to denote all remaining space.
Cai Zhiyongbab55412013-09-11 14:20:09 -070027
28<offset>
29 partition start address, in bytes.
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -070030 offset may contain an optional suffix of (upper or lower case):
31 K, M, G, T, P, E.
Cai Zhiyongbab55412013-09-11 14:20:09 -070032
33(part-name)
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -070034 partition name. Kernel sends uevent with "PARTNAME". Application can
35 create a link to block device partition with the name "PARTNAME".
36 User space application can access partition by partition name.
Cai Zhiyongbab55412013-09-11 14:20:09 -070037
38Example:
Randy Dunlapf6dbf65b2018-05-06 11:50:29 -070039 eMMC disk names are "mmcblk0" and "mmcblk0boot0".
Cai Zhiyongbab55412013-09-11 14:20:09 -070040
41 bootargs:
42 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
43
44 dmesg:
45 mmcblk0: p1(data0) p2(data1) p3()
46 mmcblk0boot0: p1(boot) p2(kernel)