Merge tag 'driver-core-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / Documentation / block / cmdline-partition.txt
CommitLineData
080506ad 1Embedded device command line partition parsing
bab55417
CZ
2=====================================================================
3
f6dbf65b
RD
4The "blkdevparts" command line option adds support for reading the
5block device partition table from the kernel command line.
6
080506ad
PG
7It is typically used for fixed block (eMMC) embedded devices.
8It has no MBR, so saves storage space. Bootloader can be easily accessed
bab55417
CZ
9by 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>
f6dbf65b
RD
19 block device disk name. Embedded device uses fixed block device.
20 Its disk name is also fixed, such as: mmcblk0, mmcblk1, mmcblk0boot0.
bab55417
CZ
21
22<size>
23 partition size, in bytes, such as: 512, 1m, 1G.
f6dbf65b
RD
24 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.
bab55417
CZ
27
28<offset>
29 partition start address, in bytes.
f6dbf65b
RD
30 offset may contain an optional suffix of (upper or lower case):
31 K, M, G, T, P, E.
bab55417
CZ
32
33(part-name)
f6dbf65b
RD
34 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.
bab55417
CZ
37
38Example:
f6dbf65b 39 eMMC disk names are "mmcblk0" and "mmcblk0boot0".
bab55417
CZ
40
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)