18c2ecf20Sopenharmony_ci==============================================
28c2ecf20Sopenharmony_ciEmbedded device command line partition parsing
38c2ecf20Sopenharmony_ci==============================================
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciThe "blkdevparts" command line option adds support for reading the
68c2ecf20Sopenharmony_ciblock device partition table from the kernel command line.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciIt is typically used for fixed block (eMMC) embedded devices.
98c2ecf20Sopenharmony_ciIt has no MBR, so saves storage space. Bootloader can be easily accessed
108c2ecf20Sopenharmony_ciby absolute address of data on the block device.
118c2ecf20Sopenharmony_ciUsers can easily change the partition.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciThe format for the command line is just like mtdparts:
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciblkdevparts=<blkdev-def>[;<blkdev-def>]
168c2ecf20Sopenharmony_ci  <blkdev-def> := <blkdev-id>:<partdef>[,<partdef>]
178c2ecf20Sopenharmony_ci    <partdef> := <size>[@<offset>](part-name)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci<blkdev-id>
208c2ecf20Sopenharmony_ci    block device disk name. Embedded device uses fixed block device.
218c2ecf20Sopenharmony_ci    Its disk name is also fixed, such as: mmcblk0, mmcblk1, mmcblk0boot0.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci<size>
248c2ecf20Sopenharmony_ci    partition size, in bytes, such as: 512, 1m, 1G.
258c2ecf20Sopenharmony_ci    size may contain an optional suffix of (upper or lower case):
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci      K, M, G, T, P, E.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci    "-" is used to denote all remaining space.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci<offset>
328c2ecf20Sopenharmony_ci    partition start address, in bytes.
338c2ecf20Sopenharmony_ci    offset may contain an optional suffix of (upper or lower case):
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci      K, M, G, T, P, E.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci(part-name)
388c2ecf20Sopenharmony_ci    partition name. Kernel sends uevent with "PARTNAME". Application can
398c2ecf20Sopenharmony_ci    create a link to block device partition with the name "PARTNAME".
408c2ecf20Sopenharmony_ci    User space application can access partition by partition name.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciExample:
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci    eMMC disk names are "mmcblk0" and "mmcblk0boot0".
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci  bootargs::
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci    'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci  dmesg::
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci    mmcblk0: p1(data0) p2(data1) p3()
538c2ecf20Sopenharmony_ci    mmcblk0boot0: p1(boot) p2(kernel)
54