diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2023-02-23 14:19:09 -0600 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-02-24 08:04:20 -0600 |
| commit | b6568c72cd44a40570e6f216e683705606b75b47 (patch) | |
| tree | 4d283edec970a0ce269c8eef2a9a5dd1cf416dd9 | |
| parent | 0231f165e1fa7f9e118d1231ee2af60831e17b51 (diff) | |
| download | meta-xilinx-b6568c72cd44a40570e6f216e683705606b75b47.tar.gz | |
ai-engine: Moved from meta-xilinx-tools
Moves from meta-xilinx-tools as of commit 91c18d664dedc5c8e66f0744ec85a4d3c8bc300a.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
3 files changed, 91 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.2.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.2.bb new file mode 100644 index 00000000..8bb9a1aa --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.2.bb | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | SUMMARY = "Xilinx AI Engine runtime" | ||
| 2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | ||
| 3 | |||
| 4 | require aie-rt.inc | ||
| 5 | |||
| 6 | SECTION = "libs" | ||
| 7 | |||
| 8 | AIEDIR ?= "${S}/driver" | ||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | I = "${AIEDIR}/include" | ||
| 11 | |||
| 12 | COMPATIBLE_MACHINE = "^$" | ||
| 13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
| 14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
| 15 | PV = "3.2" | ||
| 16 | |||
| 17 | IOBACKENDS ?= "Linux" | ||
| 18 | |||
| 19 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
| 20 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
| 21 | |||
| 22 | PROVIDES = "libxaiengine" | ||
| 23 | RPROVIDES:${PN} = "libxaiengine" | ||
| 24 | |||
| 25 | # The makefile isn't ready for parallel execution at the moment | ||
| 26 | PARALLEL_MAKE = "-j 1" | ||
| 27 | |||
| 28 | CFLAGS += "-Wall -Wextra" | ||
| 29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
| 30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
| 31 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
| 32 | |||
| 33 | |||
| 34 | do_compile(){ | ||
| 35 | oe_runmake | ||
| 36 | } | ||
| 37 | |||
| 38 | do_install(){ | ||
| 39 | install -d ${D}${includedir} | ||
| 40 | install ${I}/*.h ${D}${includedir}/ | ||
| 41 | install -d ${D}${includedir}/xaiengine | ||
| 42 | install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/ | ||
| 43 | install -d ${D}${libdir} | ||
| 44 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | ||
| 45 | } | ||
| 46 | |||
| 47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc new file mode 100644 index 00000000..230ae220 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | SECTION = "libs" | ||
| 2 | |||
| 3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
| 4 | |||
| 5 | BRANCH ?= "main-aie" | ||
| 6 | SRCREV ?= "dc6aa58756fcd831eaba1f2e0236c1501012f220" | ||
| 7 | |||
| 8 | LICENSE = "BSD-3-Clause" | ||
| 9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=b81abf1f508952331dd7d2ab36408f5b" | ||
| 10 | |||
| 11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.0.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.0.bb new file mode 100644 index 00000000..641c39a9 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.0.bb | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | ||
| 2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | ||
| 3 | |||
| 4 | require aie-rt.inc | ||
| 5 | |||
| 6 | SECTION = "devel" | ||
| 7 | |||
| 8 | XAIEFAL_DIR ?= "fal" | ||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | |||
| 11 | COMPATIBLE_MACHINE = "^$" | ||
| 12 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
| 13 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
| 14 | |||
| 15 | IOBACKENDS ?= "Linux" | ||
| 16 | |||
| 17 | PROVIDES = "aiefal" | ||
| 18 | ALLOW_EMPTY:${PN} = "1" | ||
| 19 | |||
| 20 | inherit pkgconfig cmake | ||
| 21 | |||
| 22 | DEPENDS = "libxaiengine" | ||
| 23 | |||
| 24 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
| 25 | |||
| 26 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF " | ||
| 27 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
| 28 | |||
| 29 | FILES:${PN}-demos = " \ | ||
| 30 | ${bindir}/* \ | ||
| 31 | " | ||
| 32 | |||
| 33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
