From ede3354d41a97de08bfa8ce009f0e9370047fe01 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Sun, 15 Jan 2023 11:48:45 -0800 Subject: libxil: Move from require to include Due to the change of the machine.conf where LIBXIL_CONFIG is set to the multiconfig, some non-baremetal configurations may not generate a config file. Using include will prevent this from being an early parse error, while the python function will disble libxil when no configuration file is present. Signed-off-by: Mark Hatle --- .../recipes-libraries/libxil_git.bb | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb index 04e5e81a..2ec1d6cd 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb @@ -1,8 +1,25 @@ inherit esw python3native features_check LIBXIL_CONFIG ??= "" +include ${LIBXIL_CONFIG} -require ${LIBXIL_CONFIG} +# The python code allows us to use an include above, instead of require +# as it enforces that the file will be available for inclusion. It also +# gives the user feedback if something isn't configured properly. +python () { + libxil_cfg = d.getVar("LIBXIL_CONFIG") + if libxil_cfg: + bbpath = d.getVar('BBPATH') + libxil_path = bb.utils.which(bbpath, libxil_cfg) + if libxil_path: + return + else: + d.setVar('BB_DONT_CACHE', '1') + bb.parse.SkipRecipe("LIBXIL_CONFIG (%s) was not found." % libxil_cfg) + else: + d.setVar('BB_DONT_CACHE', '1') + raise bb.parse.SkipRecipe("No LIBXIL_CONFIG set.") +} ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" ESW_COMPONENT_NAME = "libxil.a" -- cgit v1.2.3-54-g00ecf