summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHugo Villeneuve <[email protected]>2026-03-27 11:16:07 -0400
committerTom Rini <[email protected]>2026-04-13 17:34:48 -0600
commitf7bef8f81f4f1b97b071b14a8c1f61df6285fc63 (patch)
treed02c82fbce60799bdf06c95f67e304897163e62d /include
parent163d939b2839e156e58c234f07bf987228b91137 (diff)
config_distro_bootcmd: do not scan boot partitions if distro_bootpart is defined
For some projects, designing the active bootable partition is done by setting distro_bootpart in the environment instead of changing the bootable flag on the active partition. This patch makes it possible to support both models by scanning boot partitions only if distro_bootpart is not defined in the environment. Signed-off-by: Hugo Villeneuve <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 7b6ac6eed9d..8d6f80a0ce5 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -543,8 +543,12 @@
"\0" \
\
"scan_dev_for_boot_part=" \
- SCAN_DEV_FOR_BOOT_PARTS \
- "env exists devplist || setenv devplist 1; " \
+ "if env exists distro_bootpart; then " \
+ "setenv devplist ${distro_bootpart}; " \
+ "else " \
+ SCAN_DEV_FOR_BOOT_PARTS \
+ "env exists devplist || setenv devplist 1; " \
+ "fi; " \
"for distro_bootpart in ${devplist}; do " \
"if fstype ${devtype} " \
"${devnum}:${distro_bootpart} " \