From e824d0d0c219bc6da767f13f90c5b00eefe929f0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 23 Sep 2023 14:50:15 -0600 Subject: bootstd: Scan all bootdevs in a boot_targets entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the boot_targets environment variable is used with the distro-boot scripts, each device is included individually. For example, if there are three mmc devices, then we will have something like: boot_targets="mmc0 mmc1 mmc2" In contrast, standard boot supports specifying just the uclass, i.e.: boot_targets="mmc" The intention is that this should scan all MMC devices, but in fact it currently only scans the first. Update the logic to handle this case, without required BOOTSTD_FULL to be enabled. I believe at least three people reported this, but I found two. Signed-off-by: Simon Glass Reported-by: Date Huang Reported-by: Vincent Stehlé --- boot/bootdev-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'boot/bootdev-uclass.c') diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 974ddee5d2f..44ae98a9269 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -469,10 +469,11 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, * if no sequence number was provided, we must scan all * bootdevs for this media uclass */ - if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && seq == -1) + if (seq == -1) method_flags |= BOOTFLOW_METHF_SINGLE_UCLASS; if (method_flagsp) *method_flagsp = method_flags; + log_debug("method flags %x\n", method_flags); return 0; } log_debug("- no device in %s\n", media->name); -- cgit v1.2.3