summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch45
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.0.0.bb20
2 files changed, 59 insertions, 6 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch
new file mode 100644
index 00000000..6bc54335
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch
@@ -0,0 +1,45 @@
1From 450a1ba74eb5a6cf3946d8ae84b7de5bc97ccb35 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 13 Jun 2023 12:34:08 +0800
4Subject: [PATCH] protobuf: allow target protoc to be built
5
6We can run target binaries using a qemu wrapper so allow these to be
7built and run.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 cmake/developer_package/frontends/frontends.cmake | 2 +-
14 thirdparty/protobuf/CMakeLists.txt | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake
18index 897e6f8e3a6..32b136fcea9 100644
19--- a/cmake/developer_package/frontends/frontends.cmake
20+++ b/cmake/developer_package/frontends/frontends.cmake
21@@ -146,7 +146,7 @@ macro(ov_add_frontend)
22 set(GENERATED_PROTO ${INFILE})
23 add_custom_command(
24 OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
25- COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
26+ COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
27 DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO}
28 COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}"
29 VERBATIM
30diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt
31index 79e69a47b09..087f9e838c2 100644
32--- a/thirdparty/protobuf/CMakeLists.txt
33+++ b/thirdparty/protobuf/CMakeLists.txt
34@@ -27,7 +27,7 @@ set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE)
35 if(CMAKE_CROSSCOMPILING OR
36 (APPLE AND (HOST_X86_64 AND AARCH64)) OR
37 (MSVC AND (HOST_X86_64 AND (AARCH64 OR ARM))))
38- set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build protoc binaries" FORCE)
39+ set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
40 else()
41 set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
42 endif()
43--
442.37.3
45
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.0.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.0.0.bb
index 193e33a1..0882f424 100644
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.0.0.bb
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.0.0.bb
@@ -10,11 +10,13 @@ SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=r
10 git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak;branch=master \ 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 \ 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 \ 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 \
13 file://fix-build.patch \ 14 file://fix-build.patch \
14 file://cython-cmake.patch \ 15 file://cython-cmake.patch \
15 file://7cecc9138b89e1946e3e515727bb69b2ab119806.patch;patchdir=thirdparty/ade \ 16 file://7cecc9138b89e1946e3e515727bb69b2ab119806.patch;patchdir=thirdparty/ade \
16 file://fix-build-with-gcc13.patch \ 17 file://fix-build-with-gcc13.patch \
17 file://onednn-fix-build-with-gcc13.patch;patchdir=src/plugins/intel_gpu/thirdparty/onednn_gpu \ 18 file://onednn-fix-build-with-gcc13.patch;patchdir=src/plugins/intel_gpu/thirdparty/onednn_gpu \
19 file://0001-protobuf-allow-target-protoc-to-be-built.patch \
18 " 20 "
19 21
20SRCREV = "b4452d5630442e91cf84db5acd3d991f3d1f34c2" 22SRCREV = "b4452d5630442e91cf84db5acd3d991f3d1f34c2"
@@ -23,6 +25,7 @@ SRCREV_onednn = "f27dedbfc093f51032a4580198bb80579440dc15"
23SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2" 25SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2"
24SRCREV_json = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" 26SRCREV_json = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d"
25SRCREV_ade = "58b2595a1a95cc807be8bf6222f266a9a1f393a9" 27SRCREV_ade = "58b2595a1a95cc807be8bf6222f266a9a1f393a9"
28SRCREV_protobuf = "fe271ab76f2ad2b2b28c10443865d2af21e27e0e"
26 29
27LICENSE = "Apache-2.0 & MIT & BSD-3-Clause" 30LICENSE = "Apache-2.0 & MIT & BSD-3-Clause"
28LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ 31LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
@@ -34,10 +37,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
34 file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ 37 file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \
35" 38"
36 39
37inherit cmake python3native pkgconfig 40inherit cmake python3native pkgconfig qemu
38 41
39S = "${WORKDIR}/git" 42S = "${WORKDIR}/git"
40EXTRA_OECMAKE += " \ 43EXTRA_OECMAKE += " \
44 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
41 -DENABLE_OPENCV=OFF \ 45 -DENABLE_OPENCV=OFF \
42 -DENABLE_INTEL_GNA=OFF \ 46 -DENABLE_INTEL_GNA=OFF \
43 -DENABLE_SYSTEM_TBB=ON \ 47 -DENABLE_SYSTEM_TBB=ON \
@@ -47,7 +51,6 @@ EXTRA_OECMAKE += " \
47 -DTREAT_WARNING_AS_ERROR=FALSE \ 51 -DTREAT_WARNING_AS_ERROR=FALSE \
48 -DENABLE_DATA=FALSE \ 52 -DENABLE_DATA=FALSE \
49 -DENABLE_SYSTEM_PUGIXML=TRUE \ 53 -DENABLE_SYSTEM_PUGIXML=TRUE \
50 -DENABLE_SYSTEM_PROTOBUF=TRUE \
51 -DENABLE_OV_ONNX_FRONTEND=FALSE \ 54 -DENABLE_OV_ONNX_FRONTEND=FALSE \
52 -DUSE_BUILD_TYPE_SUBFOLDER=OFF \ 55 -DUSE_BUILD_TYPE_SUBFOLDER=OFF \
53 -DENABLE_FUZZING=OFF \ 56 -DENABLE_FUZZING=OFF \
@@ -57,15 +60,12 @@ EXTRA_OECMAKE += " \
57 -DENABLE_SYSTEM_SNAPPY=ON \ 60 -DENABLE_SYSTEM_SNAPPY=ON \
58 " 61 "
59 62
60
61DEPENDS += "\ 63DEPENDS += "\
62 flatbuffers-native \ 64 flatbuffers-native \
63 gflags \ 65 gflags \
64 protobuf \
65 protobuf-native \
66 protobuf-c \
67 pugixml \ 66 pugixml \
68 python3-pybind11 \ 67 python3-pybind11 \
68 qemu-native \
69 snappy \ 69 snappy \
70 tbb \ 70 tbb \
71 zlib \ 71 zlib \
@@ -83,6 +83,14 @@ PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
83do_configure:prepend() { 83do_configure:prepend() {
84 # Dont set PROJECT_ROOT_DIR 84 # Dont set PROJECT_ROOT_DIR
85 sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt 85 sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt
86
87 # qemu wrapper that can be used by cmake to run target binaries.
88 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
89 cat > ${WORKDIR}/qemuwrapper << EOF
90#!/bin/sh
91$qemu_binary "\$@"
92EOF
93 chmod +x ${WORKDIR}/qemuwrapper
86} 94}
87 95
88do_install:append() { 96do_install:append() {