summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental
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-04-10 09:03:22 -0700
commit6b9e839d268136356a6e3b623ce3abb058468c3b (patch)
treef7dd47a79263ca61c07c51221652e66385782710 /meta-xilinx-standalone-experimental
parent78531e845ab5958519766c8bc42f8ef2271eeebc (diff)
downloadmeta-xilinx-6b9e839d268136356a6e3b623ce3abb058468c3b.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>
Diffstat (limited to 'meta-xilinx-standalone-experimental')
-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 75c54837..9d0b697f 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"