uboot-extlinux-config.bbclass: Add menu title configuration

Add new UBOOT_EXTLINUX_MENU_TITLE variable that allows configuring
the "MENU TITLE" entry.

If set to empty, "MENU TITLE" will not be added to the output file.

(From OE-Core rev: 23026911142585fde9290e21b07934fc583b6540)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Daniel Semkowicz
2023-10-02 15:36:15 +02:00
committed by Richard Purdie
parent 8676ca858b
commit 056fe7fad4

View File

@@ -23,6 +23,8 @@
# Measured in 1/10 of a second.
# 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
# will not be added to the output file.
# UBOOT_EXTLINUX_CONFIG - Output file.
#
# If there's only one label system will boot automatically and menu won't be
@@ -68,6 +70,7 @@ UBOOT_EXTLINUX_FDTDIR ??= "../"
UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}"
UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw"
UBOOT_EXTLINUX_MENU_DESCRIPTION:linux ??= "${DISTRO_NAME}"
UBOOT_EXTLINUX_MENU_TITLE ??= "Select the boot mode"
UBOOT_EXTLINUX_CONFIG = "${B}/extlinux.conf"
@@ -95,8 +98,9 @@ python do_create_extlinux_config() {
with open(cfile, 'w') as cfgfile:
cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n')
if len(labels.split()) > 1:
cfgfile.write('MENU TITLE Select the boot mode\n')
menu_title = localdata.getVar('UBOOT_EXTLINUX_MENU_TITLE')
if len(labels.split()) > 1 and menu_title:
cfgfile.write('MENU TITLE %s\n' % (menu_title))
timeout = localdata.getVar('UBOOT_EXTLINUX_TIMEOUT')
if timeout: