aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-15 21:38:47 -0600
committerBin Meng <bmeng@tinylab.org>2023-07-17 17:12:06 +0800
commit125194e6a136f2a3ef49d443f139b44a04e1bb9e (patch)
tree3c8948421454cfa9b2f1bfae919aa78fdc02ddfd /doc
parentb279f5170a807a87a5726bcbeb0bc98937102eee (diff)
downloadu-boot-125194e6a136f2a3ef49d443f139b44a04e1bb9e.zip
u-boot-125194e6a136f2a3ef49d443f139b44a04e1bb9e.tar.gz
u-boot-125194e6a136f2a3ef49d443f139b44a04e1bb9e.tar.bz2
part: Allow setting the partition-table type
Some devices have multiple partition types available on the same media. It is sometimes useful to see these to check that everything is working correctly. Provide a way to manually set the partition-table type, avoiding the auto-detection process. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/cmd/part.rst74
1 files changed, 74 insertions, 0 deletions
diff --git a/doc/usage/cmd/part.rst b/doc/usage/cmd/part.rst
index 8d2a280..8a594aa 100644
--- a/doc/usage/cmd/part.rst
+++ b/doc/usage/cmd/part.rst
@@ -13,6 +13,7 @@ Synopis
part start <interface> <dev> <part> <varname>
part size <interface> <dev> <part> <varname>
part number <interface> <dev> <part> <varname>
+ part set <interface> <dev> <part> <type>
part type <interface> <dev>:<part> [varname]
part types
@@ -82,6 +83,18 @@ part must be specified as partition name.
varname
a variable to store the current partition number value into
+The 'part set' command sets the type of a partition. This is useful when
+autodetection fails or does not do the correct thing:
+
+ interface
+ interface for accessing the block device (mmc, sata, scsi, usb, ....)
+ dev
+ device number
+ part
+ partition number
+ type
+ partition type to use (see 'part types') to check available types
+
The 'part type' command prints or sets an environment variable to the partition type UUID.
interface
@@ -147,6 +160,67 @@ Examples
=> part types
Supported partition tables: EFI, AMIGA, DOS, ISO, MAC
+This shows looking at a device with multiple partition tables::
+
+ => virtio scan
+ => part list virtio 0
+
+ Partition Map for VirtIO device 0 -- Partition Type: EFI
+
+ Part Start LBA End LBA Name
+ Attributes
+ Type GUID
+ Partition GUID
+ 1 0x00000040 0x0092b093 "ISO9660"
+ attrs: 0x1000000000000001
+ type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+ guid: a0891d7e-b930-4513-94d8-f629dbd637b2
+ 2 0x0092b094 0x0092d7e7 "Appended2"
+ attrs: 0x0000000000000000
+ type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
+ guid: a0891d7e-b930-4513-94db-f629dbd637b2
+ 3 0x0092d7e8 0x0092da3f "Gap1"
+ attrs: 0x1000000000000001
+ type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+ guid: a0891d7e-b930-4513-94da-f629dbd637b2
+ => ls virtio 0:3
+ => part types
+ Supported partition tables: EFI, DOS, ISO
+ => part set virtio 0 dos
+
+ Partition Map for VirtIO device 0 -- Partition Type: DOS
+
+ Part Start Sector Num Sectors UUID Type
+ 1 1 9624191 00000000-01 ee
+ => part set virtio 0 iso
+
+ Partition Map for VirtIO device 0 -- Partition Type: ISO
+
+ Part Start Sect x Size Type
+ 1 3020 4 512 U-Boot
+ 2 9613460 10068 512 U-Boot
+ => part set virtio 0 efi
+
+ Partition Map for VirtIO device 0 -- Partition Type: EFI
+
+ Part Start LBA End LBA Name
+ Attributes
+ Type GUID
+ Partition GUID
+ 1 0x00000040 0x0092b093 "ISO9660"
+ attrs: 0x1000000000000001
+ type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+ guid: a0891d7e-b930-4513-94d8-f629dbd637b2
+ 2 0x0092b094 0x0092d7e7 "Appended2"
+ attrs: 0x0000000000000000
+ type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
+ guid: a0891d7e-b930-4513-94db-f629dbd637b2
+ 3 0x0092d7e8 0x0092da3f "Gap1"
+ attrs: 0x1000000000000001
+ type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+ guid: a0891d7e-b930-4513-94da-f629dbd637b2
+ =>
+
Return value
------------