diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-15 13:52:16 -0800 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-22 08:19:01 -0800 |
| commit | 322e23dc213d51a12345ca705b3776f189dc413f (patch) | |
| tree | e257ca97fa6d3eef83c845b67d711b2d8ecba5ba /meta-xilinx-core/recipes-xrt | |
| parent | dd95dde009dc7968f6e6e4c0609e7b443c55c627 (diff) | |
| download | meta-xilinx-322e23dc213d51a12345ca705b3776f189dc413f.tar.gz | |
Initial restructure/split of meta-xilinx-bsp
Create a new meta-xilinx-core, move core functionality to the core, keeping
board specific files in the bsp layer.
zynqmp-generic changed from require <board> to include, so if meta-xilinx-bsp
is not available it will not fail.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-core/recipes-xrt')
| -rw-r--r-- | meta-xilinx-core/recipes-xrt/xrt/xrt.inc | 10 | ||||
| -rw-r--r-- | meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb | 51 | ||||
| -rw-r--r-- | meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb | 20 |
3 files changed, 81 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc new file mode 100644 index 00000000..bcf869d8 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" | ||
| 2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
| 3 | SRC_URI = "${REPO};${BRANCHARG}" | ||
| 4 | |||
| 5 | BRANCH= "master" | ||
| 6 | SRCREV= "5e14f7c0e07cd0ae895b424a1a3f0a8e58b5523b" | ||
| 7 | PV = "202120.2.13.0" | ||
| 8 | |||
| 9 | |||
| 10 | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb new file mode 100644 index 00000000..0d0d71aa --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
| 2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
| 3 | |||
| 4 | require xrt.inc | ||
| 5 | |||
| 6 | LICENSE = "GPLv2 & Apache-2.0" | ||
| 7 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \ | ||
| 8 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
| 9 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 10 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
| 11 | file://runtime_src/core/pcie/tools/xbutil/LICENSE;md5=d273d63619c9aeaf15cdaf76422c4f87 \ | ||
| 12 | file://runtime_src/core/edge/tools/xbutil/LICENSE;md5=d273d63619c9aeaf15cdaf76422c4f87 " | ||
| 13 | |||
| 14 | S = "${WORKDIR}/git/src" | ||
| 15 | |||
| 16 | inherit cmake | ||
| 17 | |||
| 18 | BBCLASSEXTEND = "native nativesdk" | ||
| 19 | |||
| 20 | # util-linux is for libuuid-dev. | ||
| 21 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi" | ||
| 22 | #RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl" | ||
| 23 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem" | ||
| 24 | |||
| 25 | EXTRA_OECMAKE += " \ | ||
| 26 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 27 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | ||
| 28 | " | ||
| 29 | |||
| 30 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
| 31 | EXTRA_OECMAKE:append:versal-ai-core += "-DXRT_AIE_BUILD=true" | ||
| 32 | TARGET_CXXFLAGS:append:versal-ai-core += "-DXRT_ENABLE_AIE" | ||
| 33 | DEPENDS:append:versal-ai-core += " libmetal libxaiengine aiefal" | ||
| 34 | RDEPENDS:${PN}:append:versal-ai-core += " libxaiengine aiefal" | ||
| 35 | |||
| 36 | FILES_SOLIBSDEV = "" | ||
| 37 | FILES:${PN} += "\ | ||
| 38 | ${libdir}/lib*.so \ | ||
| 39 | ${libdir}/lib*.so.* \ | ||
| 40 | /lib/*.so* " | ||
| 41 | INSANE_SKIP:${PN} += "dev-so" | ||
| 42 | |||
| 43 | pkg_postinst_ontarget:${PN}() { | ||
| 44 | #!/bin/sh | ||
| 45 | if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then | ||
| 46 | echo "INFO: Creating ICD entry for Xilinx Platform" | ||
| 47 | mkdir -p /etc/OpenCL/vendors | ||
| 48 | echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd | ||
| 49 | chmod -R 755 /etc/OpenCL | ||
| 50 | fi | ||
| 51 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb new file mode 100644 index 00000000..40578aa2 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
| 2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
| 3 | |||
| 4 | |||
| 5 | require recipes-xrt/xrt/xrt.inc | ||
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
| 8 | LICENSE = "GPLv2 & Apache-2.0" | ||
| 9 | |||
| 10 | S = "${WORKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
| 11 | |||
| 12 | inherit module | ||
| 13 | |||
| 14 | pkg_postinst_ontarget:${PN}() { | ||
| 15 | #!/bin/sh | ||
| 16 | echo "Unloading old XRT Linux kernel modules" | ||
| 17 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
| 18 | echo "Loading new XRT Linux kernel modules" | ||
| 19 | modprobe zocl | ||
| 20 | } | ||
