From fdc5757955249461f81b2cb9e77fcd9dde3f50ce Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Wed, 14 Apr 2021 14:58:39 -0300 Subject: imx-base.inc: Provide a default value for SPL_BINARY This fixes the build case when machine does not use SPL and does not set it. We couldn't use dynamic expansion or we trigger a recursive expansion so we opted to use an utility function to do the proper logic. Fixes: f98059fe ("imx-base.inc: Allow use of SPL_BINARY variable inside wic images") Signed-off-by: Otavio Salvador --- conf/machine/include/utilities.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'conf/machine/include/utilities.inc') diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc index e9695bde..f11b588b 100644 --- a/conf/machine/include/utilities.inc +++ b/conf/machine/include/utilities.inc @@ -20,3 +20,9 @@ def make_dtb_boot_files(d): return os.path.basename(dtb) return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) + +def get_spl_binary(d): + imx_default_bootloader = d.get('IMX_DEFAULT_BOOTLOADER') + spl_binary = d.getVar("SPL_BINARY_pn-%s" % imx_default_bootloader) + + return spl_binary or "" -- cgit v1.2.3-54-g00ecf