diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2023-01-15 11:48:45 -0800 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-01-16 07:26:08 -0800 |
| commit | ede3354d41a97de08bfa8ce009f0e9370047fe01 (patch) | |
| tree | 1b9aac38242335e98a7ad89594a01b818cb9c173 /meta-xilinx-standalone-experimental | |
| parent | 9ed40146d79d0aea004cedd61f0a7673f123c940 (diff) | |
| download | meta-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>
Diffstat (limited to 'meta-xilinx-standalone-experimental')
| -rw-r--r-- | meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb | 19 |
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 @@ | |||
| 1 | inherit esw python3native features_check | 1 | inherit esw python3native features_check |
| 2 | 2 | ||
| 3 | LIBXIL_CONFIG ??= "" | 3 | LIBXIL_CONFIG ??= "" |
| 4 | include ${LIBXIL_CONFIG} | ||
| 4 | 5 | ||
| 5 | require ${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. | ||
| 9 | python () { | ||
| 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 | ||
| 7 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" | 24 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" |
| 8 | ESW_COMPONENT_NAME = "libxil.a" | 25 | ESW_COMPONENT_NAME = "libxil.a" |
