2019-04-18 22:45:00 +00:00
|
|
|
==============================================
|
2013-09-30 20:45:19 +00:00
|
|
|
Embedded device command line partition parsing
|
2019-04-18 22:45:00 +00:00
|
|
|
==============================================
|
2013-09-11 21:20:09 +00:00
|
|
|
|
2018-05-06 18:50:29 +00:00
|
|
|
The "blkdevparts" command line option adds support for reading the
|
|
|
|
block device partition table from the kernel command line.
|
|
|
|
|
2013-09-30 20:45:19 +00:00
|
|
|
It is typically used for fixed block (eMMC) embedded devices.
|
|
|
|
It has no MBR, so saves storage space. Bootloader can be easily accessed
|
2013-09-11 21:20:09 +00:00
|
|
|
by absolute address of data on the block device.
|
|
|
|
Users can easily change the partition.
|
|
|
|
|
|
|
|
The format for the command line is just like mtdparts:
|
|
|
|
|
|
|
|
blkdevparts=<blkdev-def>[;<blkdev-def>]
|
|
|
|
<blkdev-def> := <blkdev-id>:<partdef>[,<partdef>]
|
|
|
|
<partdef> := <size>[@<offset>](part-name)
|
|
|
|
|
|
|
|
<blkdev-id>
|
2018-05-06 18:50:29 +00:00
|
|
|
block device disk name. Embedded device uses fixed block device.
|
|
|
|
Its disk name is also fixed, such as: mmcblk0, mmcblk1, mmcblk0boot0.
|
2013-09-11 21:20:09 +00:00
|
|
|
|
|
|
|
<size>
|
|
|
|
partition size, in bytes, such as: 512, 1m, 1G.
|
2018-05-06 18:50:29 +00:00
|
|
|
size may contain an optional suffix of (upper or lower case):
|
2019-04-18 22:45:00 +00:00
|
|
|
|
2018-05-06 18:50:29 +00:00
|
|
|
K, M, G, T, P, E.
|
2019-04-18 22:45:00 +00:00
|
|
|
|
2018-05-06 18:50:29 +00:00
|
|
|
"-" is used to denote all remaining space.
|
2013-09-11 21:20:09 +00:00
|
|
|
|
|
|
|
<offset>
|
|
|
|
partition start address, in bytes.
|
2018-05-06 18:50:29 +00:00
|
|
|
offset may contain an optional suffix of (upper or lower case):
|
2019-04-18 22:45:00 +00:00
|
|
|
|
2018-05-06 18:50:29 +00:00
|
|
|
K, M, G, T, P, E.
|
2013-09-11 21:20:09 +00:00
|
|
|
|
|
|
|
(part-name)
|
2018-05-06 18:50:29 +00:00
|
|
|
partition name. Kernel sends uevent with "PARTNAME". Application can
|
|
|
|
create a link to block device partition with the name "PARTNAME".
|
|
|
|
User space application can access partition by partition name.
|
2013-09-11 21:20:09 +00:00
|
|
|
|
|
|
|
Example:
|
2019-04-18 22:45:00 +00:00
|
|
|
|
2018-05-06 18:50:29 +00:00
|
|
|
eMMC disk names are "mmcblk0" and "mmcblk0boot0".
|
2013-09-11 21:20:09 +00:00
|
|
|
|
2019-04-18 22:45:00 +00:00
|
|
|
bootargs::
|
|
|
|
|
2013-09-11 21:20:09 +00:00
|
|
|
'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
|
|
|
|
|
2019-04-18 22:45:00 +00:00
|
|
|
dmesg::
|
|
|
|
|
2013-09-11 21:20:09 +00:00
|
|
|
mmcblk0: p1(data0) p2(data1) p3()
|
|
|
|
mmcblk0boot0: p1(boot) p2(kernel)
|