1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-28 05:51:17 +02:00

bootstd: support scanning a single partition

The "bootflow" command currently doesn't support scanning a single
partition. This is inconvenient in setups with multiple bootable
partitions within a single disk, but only one is desired.

Support scanning a single disk partition. Specifically, support the
syntax:
	bootflow scan mmc1:4
which scans only mmc device 1, partition 4.

Signed-off-by: Nam Cao <namcao@linutronix.de>
This commit is contained in:
Nam Cao
2024-02-21 13:41:44 +01:00
committed by Tom Rini
parent c15d73d189
commit 1132471405
4 changed files with 43 additions and 2 deletions

View File

@@ -133,6 +133,8 @@ struct bootflow {
* this uclass (used with things like "mmc")
* @BOOTFLOWIF_SINGLE_MEDIA: (internal) Scan one media device in the uclass (used
* with things like "mmc1")
* @BOOTFLOWIF_SINGLE_PARTITION: (internal) Scan one partition in media device
* (used with things like "mmc1:3")
*/
enum bootflow_iter_flags_t {
BOOTFLOWIF_FIXED = 1 << 0,
@@ -148,6 +150,7 @@ enum bootflow_iter_flags_t {
BOOTFLOWIF_SKIP_GLOBAL = 1 << 17,
BOOTFLOWIF_SINGLE_UCLASS = 1 << 18,
BOOTFLOWIF_SINGLE_MEDIA = 1 << 19,
BOOTFLOWIF_SINGLE_PARTITION = 1 << 20,
};
/**