diff --git a/classes/extlinuxconf-stm32mp.bbclass b/classes/extlinuxconf-stm32mp.bbclass index 024bdd4..9e79393 100644 --- a/classes/extlinuxconf-stm32mp.bbclass +++ b/classes/extlinuxconf-stm32mp.bbclass @@ -98,9 +98,9 @@ def create_extlinux_file(cfile, labels, data): if len(labels.split()) > 1: cfgfile.write('menu title Select the boot mode\n') - splashscreen_name = localdata.getVar('UBOOT_SPLASH_IMAGE') + splashscreen_name = localdata.getVar('UBOOT_EXTLINUX_SPLASH') if not splashscreen_name: - bb.warn('UBOOT_SPLASH_IMAGE not defined') + bb.warn('UBOOT_EXTLINUX_SPLASH not defined') else: cfgfile.write('MENU BACKGROUND /%s.bmp\n' % (splashscreen_name)) @@ -262,6 +262,15 @@ python do_create_multiextlinux_config() { break # Manage new config file creation if extra_extlinuxlabels != "": + socname_list = d.getVar('STM32MP_SOC_NAME') + if socname_list and len(socname_list.split()) > 0: + for soc in socname_list.split(): + if config.find(soc) > -1: + if d.getVar('UBOOT_EXTLINUX_SPLASH_%s' % soc): + splash = d.getVar('UBOOT_EXTLINUX_SPLASH_%s' % soc) + bb.note(">>> Specific configuration for SPLASH Screen detected with configuration: %s" % config) + bb.note(">>> Set UBOOT_EXTLINUX_SPLASH to %s" % splash) + d.setVar('UBOOT_EXTLINUX_SPLASH', splash) bb.note(">>> Create %s/%s_extlinux.conf file for %s labels" % (subdir, config, extra_extlinuxlabels)) create_extlinux_file(extra_cfile, extra_extlinuxlabels, d) } diff --git a/conf/machine/include/st-machine-common-stm32mp.inc b/conf/machine/include/st-machine-common-stm32mp.inc index 9b20591..a80df1f 100644 --- a/conf/machine/include/st-machine-common-stm32mp.inc +++ b/conf/machine/include/st-machine-common-stm32mp.inc @@ -529,7 +529,8 @@ UBOOT_CONFIG[trusted_stm32mp15] = "stm32mp15_trusted_defconfig,,${BINARY_NAME}" UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}" # Define U-boot splashscreen file naming -UBOOT_SPLASH_IMAGE = "splash" +UBOOT_SPLASH_PORTRAIT_IMAGE = "splash_portrait" +UBOOT_SPLASH_LANDSCAPE_IMAGE = "splash_landscape" # Enable MTDPART check for UBOOT_CONFIG UBOOT_MTDPART_CHECK_ENABLE ?= "${@bb.utils.contains_any('BOOTSCHEME_LABELS', 'optee trusted', d.getVarFlag('UBOOT_CONFIG', 'trusted_stm32mp15').split(',')[0], '', d)}" diff --git a/conf/machine/include/st-machine-extlinux-config-stm32mp.inc b/conf/machine/include/st-machine-extlinux-config-stm32mp.inc index 910d313..b28cc0d 100644 --- a/conf/machine/include/st-machine-extlinux-config-stm32mp.inc +++ b/conf/machine/include/st-machine-extlinux-config-stm32mp.inc @@ -11,6 +11,9 @@ UBOOT_EXTLINUX_DEFAULT_LABEL ?= "OpenSTLinux" # Define default INITRD for all configs INITRD_IMAGE ??= "" UBOOT_EXTLINUX_INITRD ?= "${@bb.utils.contains('COMBINED_FEATURES', 'initrd', '/${INITRD_IMAGE}', '', d)}" +# Define default SPLASH SCREEN +UBOOT_EXTLINUX_SPLASH ?= "${UBOOT_SPLASH_LANDSCAPE_IMAGE}" +UBOOT_EXTLINUX_SPLASH_stm32mp15 ?= "${UBOOT_SPLASH_PORTRAIT_IMAGE}" UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw" UBOOT_EXTLINUX_KERNEL_ARGS_append += " ${@bb.utils.contains('ST_DEBUG_TRACE', '1', '', '${ST_CMD_LINE_DEBUG_TRACE}', d)} "