Paul Gortmaker | 080506a | 2013-09-30 13:45:19 -0700 | [diff] [blame] | 1 | Embedded device command line partition parsing |
Cai Zhiyong | bab5541 | 2013-09-11 14:20:09 -0700 | [diff] [blame] | 2 | ===================================================================== |
| 3 | |
Paul Gortmaker | 080506a | 2013-09-30 13:45:19 -0700 | [diff] [blame] | 4 | Support for reading the block device partition table from the command line. |
| 5 | It is typically used for fixed block (eMMC) embedded devices. |
| 6 | It has no MBR, so saves storage space. Bootloader can be easily accessed |
Cai Zhiyong | bab5541 | 2013-09-11 14:20:09 -0700 | [diff] [blame] | 7 | by absolute address of data on the block device. |
| 8 | Users can easily change the partition. |
| 9 | |
| 10 | The format for the command line is just like mtdparts: |
| 11 | |
| 12 | blkdevparts=<blkdev-def>[;<blkdev-def>] |
| 13 | <blkdev-def> := <blkdev-id>:<partdef>[,<partdef>] |
| 14 | <partdef> := <size>[@<offset>](part-name) |
| 15 | |
| 16 | <blkdev-id> |
| 17 | block device disk name, embedded device used fixed block device, |
| 18 | it's disk name also fixed. such as: mmcblk0, mmcblk1, mmcblk0boot0. |
| 19 | |
| 20 | <size> |
| 21 | partition size, in bytes, such as: 512, 1m, 1G. |
| 22 | |
| 23 | <offset> |
| 24 | partition start address, in bytes. |
| 25 | |
| 26 | (part-name) |
| 27 | partition name, kernel send uevent with "PARTNAME". application can create |
| 28 | a link to block device partition with the name "PARTNAME". |
| 29 | user space application can access partition by partition name. |
| 30 | |
| 31 | Example: |
| 32 | eMMC disk name is "mmcblk0" and "mmcblk0boot0" |
| 33 | |
| 34 | bootargs: |
| 35 | 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)' |
| 36 | |
| 37 | dmesg: |
| 38 | mmcblk0: p1(data0) p2(data1) p3() |
| 39 | mmcblk0boot0: p1(boot) p2(kernel) |