diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb new file mode 100644 index 00000000..94edd1b8 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb | |||
@@ -0,0 +1,143 @@ | |||
1 | SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit" | ||
2 | HOMEPAGE = "https://github.com/opencv/dldt" | ||
3 | DESCRIPTION = "This toolkit allows developers to deploy pre-trained \ | ||
4 | deep learning models through a high-level C++ Inference Engine API \ | ||
5 | integrated with application logic." | ||
6 | |||
7 | SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;name=openvino;branch=releases/2024/0;lfs=0 \ | ||
8 | git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/onednn;name=mkl;nobranch=1 \ | ||
9 | git://github.com/oneapi-src/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_gpu/thirdparty/onednn_gpu;name=onednn;nobranch=1 \ | ||
10 | git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak;branch=master \ | ||
11 | git://github.com/nlohmann/json.git;protocol=https;destsuffix=git/thirdparty/json/nlohmann_json;name=json;branch=develop \ | ||
12 | git://github.com/opencv/ade.git;protocol=https;destsuffix=git/thirdparty/ade;name=ade;nobranch=1 \ | ||
13 | git://github.com/protocolbuffers/protobuf.git;protocol=https;destsuffix=git/thirdparty/protobuf/protobuf;name=protobuf;branch=3.20.x \ | ||
14 | git://github.com/gflags/gflags.git;protocol=https;destsuffix=git/thirdparty/gflags/gflags;name=gflags;nobranch=1 \ | ||
15 | git://github.com/madler/zlib.git;protocol=https;destsuffix=git/thirdparty/zlib/zlib;name=zlib;nobranch=1 \ | ||
16 | git://github.com/openvinotoolkit/mlas.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/mlas;name=mlas;nobranch=1 \ | ||
17 | git://github.com/nodejs/node-api-headers.git;protocol=https;destsuffix=git/node-api-headers-src;name=node-api-headers;nobranch=1 \ | ||
18 | git://github.com/nodejs/node-addon-api.git;protocol=https;destsuffix=git/node-addon-api-src;name=node-addon-api;nobranch=1 \ | ||
19 | file://0001-cmake-yocto-specific-tweaks-to-the-build-process.patch \ | ||
20 | file://0003-cmake-Fix-overloaded-virtual-error.patch \ | ||
21 | file://0004-protobuf-allow-target-protoc-to-be-built.patch \ | ||
22 | file://0001-cmake-fix-build-when-using-sysroot.patch \ | ||
23 | file://0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch \ | ||
24 | " | ||
25 | |||
26 | SRCREV_openvino = "34caeefd07800b59065345d651949efbe8ab6649" | ||
27 | SRCREV_mkl = "f82148befdbdc9576ec721c9d500155ee4de8060" | ||
28 | SRCREV_onednn = "494af5f9921bdae98f1a0e2955fa7d76ff386c4f" | ||
29 | SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2" | ||
30 | SRCREV_json = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" | ||
31 | SRCREV_ade = "0e8a2ccdd34f29dba55894f5f3c5179809888b9e" | ||
32 | SRCREV_protobuf = "fe271ab76f2ad2b2b28c10443865d2af21e27e0e" | ||
33 | SRCREV_gflags = "e171aa2d15ed9eb17054558e0b3a6a413bb01067" | ||
34 | SRCREV_zlib = "09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851" | ||
35 | SRCREV_mlas = "d1bc25ec4660cddd87804fcf03b2411b5dfb2e94" | ||
36 | SRCREV_node-api-headers = "186e04b5e40e54d7fd1655bc67081cc483f12488" | ||
37 | SRCREV_node-addon-api = "39a25bf27788ff7a7ea5c64978c4dcd1e7b9d80d" | ||
38 | SRCREV_FORMAT = "openvino_mkl_onednn_xbyak_json_ade_protobuf_gflags_zlib_node-api-headers_node-addon-api_mlas" | ||
39 | |||
40 | LICENSE = "Apache-2.0 & MIT & BSD-3-Clause & Zlib" | ||
41 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
42 | file://thirdparty/xbyak/COPYRIGHT;md5=3c98edfaa50a86eeaef4c6109e803f16 \ | ||
43 | file://thirdparty/cnpy/LICENSE;md5=689f10b06d1ca2d4b1057e67b16cd580 \ | ||
44 | file://thirdparty/json/nlohmann_json/LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588 \ | ||
45 | file://thirdparty/ade/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
46 | file://thirdparty/gflags/gflags/COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df \ | ||
47 | file://thirdparty/zlib/zlib/LICENSE;md5=b51a40671bc46e961c0498897742c0b8 \ | ||
48 | file://src/plugins/intel_cpu/thirdparty/mlas/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
49 | file://src/plugins/intel_cpu/thirdparty/onednn/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
50 | file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
51 | file://node-api-headers-src/LICENSE;md5=6adb2909701d4605b4b2ae1a9b25d8bd \ | ||
52 | file://node-addon-api-src/LICENSE.md;md5=0492ef29a9d558a3e9660e7accc9ca6a \ | ||
53 | " | ||
54 | |||
55 | inherit cmake python3native pkgconfig qemu | ||
56 | |||
57 | S = "${WORKDIR}/git" | ||
58 | EXTRA_OECMAKE += " \ | ||
59 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
60 | -DENABLE_OPENCV=OFF \ | ||
61 | -DENABLE_INTEL_GNA=OFF \ | ||
62 | -DENABLE_SYSTEM_TBB=ON \ | ||
63 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
64 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
65 | -DTHREADING=TBB -DTBB_DIR="${STAGING_LIBDIR}/cmake/TBB" \ | ||
66 | -DTREAT_WARNING_AS_ERROR=FALSE \ | ||
67 | -DENABLE_DATA=FALSE \ | ||
68 | -DENABLE_SYSTEM_PUGIXML=TRUE \ | ||
69 | -DENABLE_OV_ONNX_FRONTEND=FALSE \ | ||
70 | -DUSE_BUILD_TYPE_SUBFOLDER=OFF \ | ||
71 | -DENABLE_FUZZING=OFF \ | ||
72 | -DENABLE_TBBBIND_2_5=OFF \ | ||
73 | -DCPACK_GENERATOR=RPM \ | ||
74 | -DENABLE_SYSTEM_FLATBUFFERS=ON \ | ||
75 | -DENABLE_SYSTEM_SNAPPY=ON \ | ||
76 | -DFETCHCONTENT_BASE_DIR="${S}" \ | ||
77 | " | ||
78 | |||
79 | DEPENDS += "\ | ||
80 | flatbuffers-native \ | ||
81 | pugixml \ | ||
82 | python3-pybind11 \ | ||
83 | python3-pybind11-native \ | ||
84 | qemu-native \ | ||
85 | snappy \ | ||
86 | tbb \ | ||
87 | " | ||
88 | |||
89 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
90 | COMPATIBLE_HOST:libc-musl = "null" | ||
91 | |||
92 | PACKAGECONFIG ?= "opencl samples" | ||
93 | PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE, -DENABLE_INTEL_GPU=FALSE, virtual/opencl-icd opencl-headers opencl-clhpp," | ||
94 | PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} -DENABLE_PYTHON_PACKAGING=ON, -DENABLE_PYTHON=OFF, patchelf-native, python3 python3-numpy python3-progress" | ||
95 | PACKAGECONFIG[samples] = "-DENABLE_SAMPLES=ON -DENABLE_COMPILE_TOOL=ON, -DENABLE_SAMPLES=OFF -DENABLE_COMPILE_TOOL=OFF, opencv" | ||
96 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
97 | |||
98 | do_configure:prepend() { | ||
99 | # Dont set PROJECT_ROOT_DIR | ||
100 | sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt | ||
101 | |||
102 | # qemu wrapper that can be used by cmake to run target binaries. | ||
103 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
104 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
105 | #!/bin/sh | ||
106 | $qemu_binary "\$@" | ||
107 | EOF | ||
108 | chmod +x ${WORKDIR}/qemuwrapper | ||
109 | } | ||
110 | |||
111 | do_install:append() { | ||
112 | rm -rf ${D}${prefix}/install_dependencies | ||
113 | rm -rf ${D}${prefix}/setupvars.sh | ||
114 | |||
115 | find ${B}/src/plugins/intel_cpu/cross-compiled/ -type f -name *_disp.cpp -exec sed -i -e 's%'"${S}"'%'"${TARGET_DBGSRC_DIR}"'%g' {} + | ||
116 | } | ||
117 | |||
118 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | ||
119 | # instead of RSS | ||
120 | SSTATE_SCAN_FILES:append = " *.cmake" | ||
121 | |||
122 | FILES:${PN} += "\ | ||
123 | ${libdir}/openvino-${PV}/lib*${SOLIBSDEV} \ | ||
124 | ${libdir}/openvino-${PV}/plugins.xml \ | ||
125 | ${libdir}/openvino-${PV}/cache.json \ | ||
126 | " | ||
127 | |||
128 | # Move inference engine samples into a separate package | ||
129 | PACKAGES =+ "${PN}-samples" | ||
130 | |||
131 | FILES:${PN}-samples = "${datadir}/openvino \ | ||
132 | ${bindir} \ | ||
133 | ${libdir}/libformat_reader.a \ | ||
134 | ${libdir}/libopencv_c_wrapper.a \ | ||
135 | " | ||
136 | RDEPENDS:${PN}-samples += "python3-core" | ||
137 | |||
138 | # Package for inference engine python API | ||
139 | PACKAGES =+ "${PN}-python3" | ||
140 | |||
141 | FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" | ||
142 | |||
143 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+\.\d+\.\d+))$" | ||