summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb')
-rw-r--r--meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb b/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb
new file mode 100644
index 00000000..2eb08307
--- /dev/null
+++ b/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.1.bb
@@ -0,0 +1,55 @@
1inherit esw python3native features_check
2
3LIBXIL_CONFIG ??= ""
4include ${LIBXIL_CONFIG}
5
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}
23
24ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/"
25ESW_COMPONENT_NAME = "libxil.a"
26
27DEPENDS += "xilstandalone "
28MACHINE_FEATURES:remove = "aiengine dfeccf dfeequ dfemix dfeprach rfdc dfeofdm"
29REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}"
30PACKAGECONFIG ?= "${MACHINE_FEATURES}"
31
32do_compile() {
33 # Combines the .a archives produced by all of the dependent items
34 cd ${RECIPE_SYSROOT}/usr/lib/
35 echo create libxil.a > libxil.mri
36 for each in ${REQUIRED_MACHINE_FEATURES}; do
37 each=$(echo $each | sed 's/-/_/g')
38 if [ -e lib$each.a ]; then
39 echo addlib lib$each.a >> libxil.mri
40 fi
41 done
42 echo “save” >> libxil.mri
43 echo “end” >> libxil.mri
44 ${AR} -M <libxil.mri
45 cp libxil.a ${B}
46}
47
48do_install() {
49 install -d ${D}${libdir}
50 install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir}
51
52 # Install Spec files for consumers of BSP
53 install -d ${D}${includedir}
54 cp -rf ${SPECFILE_PATH} ${D}${includedir}
55}