summaryrefslogtreecommitdiff
path: root/cmd/Kconfig
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-12-23 15:55:15 +0300
committerTom Rini <trini@konsulko.com>2021-01-16 00:00:32 +0300
commit750c543ca74a80da4b67882deb967c80fe790c3f (patch)
treeb8d1c05256b6f160a598656e797071081bd1f61e /cmd/Kconfig
parent20bd5ac6e43124a7632a03cf8e47dba684fa2fc4 (diff)
downloadu-boot-750c543ca74a80da4b67882deb967c80fe790c3f.tar.xz
cmd: Add MBR partition layout control utility
Add a 'mbr' command to let users create or verify MBR partition layout based on the provided text description. The partition layout is alternatively read from the 'mbr_parts' environment variable. This can be used in scripts to help system image flashing tools to ensure proper partition layout. The syntax of the text description of the partition list is similar to the one used by the 'gpt' command. Supported parameters are: name (currently ignored), start (partition start offset in bytes), size (in bytes or '-' to expand it to the whole free area), bootable (boolean flag) and id (MBR partition type). If one wants to create more than 4 partitions, an 'Extended' primary partition (with 0x05 ID) has to be explicitely provided as a one of the first 4 entries. Here is an example how to create a 6 partitions (3 on the 'extended volume'), some of the predefined sizes: > setenv mbr_parts 'name=boot,start=4M,size=128M,bootable,id=0x0e; name=rootfs,size=3072M,id=0x83; name=system-data,size=512M,id=0x83; name=[ext],size=-,id=0x05; name=user,size=-,id=0x83; name=modules,size=100M,id=0x83; name=ramdisk,size=8M,id=0x83' > mbr write mmc 0 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'cmd/Kconfig')
-rw-r--r--cmd/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index da86a940ce..0107c0fa3e 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1034,6 +1034,14 @@ config CMD_LSBLK
Print list of available block device drivers, and for each, the list
of known block devices.
+config CMD_MBR
+ bool "MBR (Master Boot Record) command"
+ select DOS_PARTITION
+ select HAVE_BLOCK_DEVICE
+ help
+ Enable the 'mbr' command to ready and write MBR (Master Boot Record)
+ style partition tables.
+
config CMD_MISC
bool "misc"
depends on MISC