summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2023-01-15 11:48:45 -0800
committerMark Hatle <mark.hatle@amd.com>2023-01-16 07:26:08 -0800
commitede3354d41a97de08bfa8ce009f0e9370047fe01 (patch)
tree1b9aac38242335e98a7ad89594a01b818cb9c173
parent9ed40146d79d0aea004cedd61f0a7673f123c940 (diff)
downloadmeta-xilinx-ede3354d41a97de08bfa8ce009f0e9370047fe01.tar.gz
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 <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb19
1 files changed, 18 insertions, 1 deletions
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 @@
1inherit esw python3native features_check 1inherit esw python3native features_check
2 2
3LIBXIL_CONFIG ??= "" 3LIBXIL_CONFIG ??= ""
4include ${LIBXIL_CONFIG}
4 5
5require ${LIBXIL_CONFIG} 6# The python code allows us to use an include above, instead of require
7# as it enforces that the file will be available for inclusion. It also
8# gives the user feedback if something isn't configured properly.
9python () {
10 libxil_cfg = d.getVar("LIBXIL_CONFIG")
11 if libxil_cfg:
12 bbpath = d.getVar('BBPATH')
13 libxil_path = bb.utils.which(bbpath, libxil_cfg)
14 if libxil_path:
15 return
16 else:
17 d.setVar('BB_DONT_CACHE', '1')
18 bb.parse.SkipRecipe("LIBXIL_CONFIG (%s) was not found." % libxil_cfg)
19 else:
20 d.setVar('BB_DONT_CACHE', '1')
21 raise bb.parse.SkipRecipe("No LIBXIL_CONFIG set.")
22}
6 23
7ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" 24ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/"
8ESW_COMPONENT_NAME = "libxil.a" 25ESW_COMPONENT_NAME = "libxil.a"