Back to home page

OSCL-LXR

 
 

    


0001 ==============================================
0002 Embedded device command line partition parsing
0003 ==============================================
0004 
0005 The "blkdevparts" command line option adds support for reading the
0006 block device partition table from the kernel command line.
0007 
0008 It is typically used for fixed block (eMMC) embedded devices.
0009 It has no MBR, so saves storage space. Bootloader can be easily accessed
0010 by absolute address of data on the block device.
0011 Users can easily change the partition.
0012 
0013 The format for the command line is just like mtdparts:
0014 
0015 blkdevparts=<blkdev-def>[;<blkdev-def>]
0016   <blkdev-def> := <blkdev-id>:<partdef>[,<partdef>]
0017     <partdef> := <size>[@<offset>](part-name)
0018 
0019 <blkdev-id>
0020     block device disk name. Embedded device uses fixed block device.
0021     Its disk name is also fixed, such as: mmcblk0, mmcblk1, mmcblk0boot0.
0022 
0023 <size>
0024     partition size, in bytes, such as: 512, 1m, 1G.
0025     size may contain an optional suffix of (upper or lower case):
0026 
0027       K, M, G, T, P, E.
0028 
0029     "-" is used to denote all remaining space.
0030 
0031 <offset>
0032     partition start address, in bytes.
0033     offset may contain an optional suffix of (upper or lower case):
0034 
0035       K, M, G, T, P, E.
0036 
0037 (part-name)
0038     partition name. Kernel sends uevent with "PARTNAME". Application can
0039     create a link to block device partition with the name "PARTNAME".
0040     User space application can access partition by partition name.
0041 
0042 Example:
0043 
0044     eMMC disk names are "mmcblk0" and "mmcblk0boot0".
0045 
0046   bootargs::
0047 
0048     'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
0049 
0050   dmesg::
0051 
0052     mmcblk0: p1(data0) p2(data1) p3()
0053     mmcblk0boot0: p1(boot) p2(kernel)