diff mbox series

No option to disable PROMPT when booting with extlinux

Message ID SA1PR18MB5926F18056B88BB45AB2F91DB1E62@SA1PR18MB5926.namprd18.prod.outlook.com
State New
Headers show
Series No option to disable PROMPT when booting with extlinux | expand

Commit Message

Stephen Szabo June 15, 2026, 8:58 p.m. UTC
Hello,

I believe we've found a bug in the `uboot-extlinux-config.bbclass` class and was hoping for confirmation. Please feel free to point me in the right direction if this isn't the appropriate mailing list.

A few years ago U-boot was patched to properly parse the PROMPT value in extlinux.conf files and restore the default menu behavior to prompt for a label unless explicitly disabled.
- See this bug report: https://groups.google.com/g/linux.debian.bugs.dist/c/wI_3vFvErTc
- Which was upstreamed here: https://github.com/u-boot/u-boot/commit/739e8361f3fe78038251216df6096a32bc2d5839

After updating our yocto build to a newer branch on Scarthgap, we started seeing these prompts for extlinux labels from U-boot. The boot prompt that gets displayed is interruptible via <CTRL-C>, which is a potential security vulnerability, so we would like to disable the extlinux boot prompt altogether. However, there exists no option in `uboot-extlinux-config.bbclass` for explicitly setting the PROMPT option.

I've generated a small fix that would allow developers to explicitly set the PROMPT value similarly to any other (E.G. TIMEOUT). Could someone confirm whether or not the missing PROMPT variable in `uboot-extlinux-config.bbclass` is intentional? If not, I can generate a proper patch to submit for review as necessary.

```
```


Additionally, despite the documentation stating that no prompt shall be displayed when only one boot label exists, we are still seeing prompting behavior with only one extlinux boot label. Would someone be able to confirm that this is not limited to just our platform?

-          https://github.com/openembedded/openembedded-core/blob/master/meta/classes-recipe/uboot-extlinux-config.bbclass#L31

Please let me know how best to proceed.

Thank you,
Stephen
diff mbox series

Patch

diff --git a/meta/classes-recipe/uboot-extlinux-config.bbclass b/meta/classes-recipe/uboot-extlinux-config.bbclass
index 0413e760bd..659560c675 100644
--- a/meta/classes-recipe/uboot-extlinux-config.bbclass
+++ b/meta/classes-recipe/uboot-extlinux-config.bbclass
@@ -21,6 +21,7 @@ 
# UBOOT_EXTLINUX_ROOT              - Root kernel cmdline.
# UBOOT_EXTLINUX_TIMEOUT           - Timeout before DEFAULT selection is made.
#                                    Measured in 1/10 of a second.
+# UBOOT_EXTLINUX_PROMPT            - Enable/disable prompting for a boot label.
# UBOOT_EXTLINUX_DEFAULT_LABEL     - Target to be selected by default after
#                                    the timeout period.
# UBOOT_EXTLINUX_MENU_TITLE        - Menu title. If empty, MENU TITLE entry
@@ -106,6 +107,10 @@  python do_create_extlinux_config() {
             if timeout:
                 cfgfile.write('TIMEOUT %s\n' % (timeout))

+            prompt = localdata.getVar('UBOOT_EXTLINUX_PROMPT')
+            if prompt:
+                cfgfile.write('PROMPT %s\n' % (prompt))
+
             if len(labels.split()) > 1:
                 default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
                 if default: