Skip to contentSkip to conversation

config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd

PATCH Pascal Zimmermann 1 participant 1 message Nov 27, 2024

lore
Share & tools
lore
#0 lore raw

Hello Simon,

Quoted 20 lines · Simon Glass

Hi Pascal,

Quoted 6 lines · Pascal Zimmermann

Make it possible to substitute the 'part list' command inside 'scan_dev_for_boot_part' with a custom board specific implementation.

For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.

Quoted 8 lines

---
Cc: Tom Rini <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: [email protected]

---
 include/config_distro_bootcmd.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Quoted 1 line

Have you looked at converting the board to standard boot?

We are at internal discussion about the switch to standard boot for our boards, but this will take some time.

Quoted 25 lines
Quoted 25 lines
(quoted diff) +0 -0

b/include/config_distro_bootcmd.h index 0a4e4b8ff8..df0dc8cfde 100644

include/config_distro_bootcmd.h +6 -1
@@ -194,6 +194,11 @@
 #define SCAN_DEV_FOR_EFI
 #endif
 
+#ifndef SCAN_DEV_FOR_BOOT_PARTS
+#define SCAN_DEV_FOR_BOOT_PARTS \
+       "part list ${devtype} ${devnum} -bootable devplist; "
+#endif
+
 #ifdef CONFIG_SATA
 #define BOOTENV_SHARED_SATA    BOOTENV_SHARED_BLKDEV(sata)
 #define BOOTENV_DEV_SATA       BOOTENV_DEV_BLKDEV
@@ -538,7 +543,7 @@
                "\0"                                                      \
        \
        "scan_dev_for_boot_part="                                         \
-               "part list ${devtype} ${devnum} -bootable devplist; "     \
+               SCAN_DEV_FOR_BOOT_PARTS                                   \
                "env exists devplist || setenv devplist 1; "              \
Quoted 8 lines
Quoted 5 lines
include/config_distro_bootcmd.h +0 -1
                "for distro_bootpart in ${devplist}; do "                 \
                        "if fstype ${devtype} "                           \
--

2.30.2

Regards,
Simon

Best regards,
Pascal