ccimx93: update ML package for NXP release 6.1.36-2.1.0

As part of the integration of the new ML package, also update the
ethos-u-firmware binary built from Stash:

Repo: emp/ethos_u_firmware.git
Revision: a0352b0cf7267c896b55980dedd08daddc780733
Source: NXP's MCUXpresso SDK_2.14.0_MIMX9352xxxxK

And, drop deepview-rt support for ccimx93, as NXP has done the same in
6.1.36-2.1.0 release.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2023-11-28 15:51:38 +01:00
parent 8552421e55
commit 3cfce77c0f
17 changed files with 276 additions and 51 deletions

View File

@ -278,14 +278,15 @@ PREFERRED_VERSION_optee-client:mx9-nxp-bsp ??= "3.21.0.imx"
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx" PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "3.21.0.imx" PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "3.21.0.imx"
# Machine learning backports from NXP's lf-6.1.1_1.0.0 release # Machine learning backports from NXP's lf-6.1.36-2.1.0 release
PREFERRED_VERSION_deepview-rt:ccimx93 = "2.4.46.1-aarch64" PREFERRED_VERSION_ethos-u-vela:ccimx93 = "3.8.0"
PREFERRED_VERSION_ethos-u-vela:ccimx93 = "3.6.0"
PREFERRED_VERSION_flatbuffers:ccimx93 = "2.0.7" PREFERRED_VERSION_flatbuffers:ccimx93 = "2.0.7"
PREFERRED_VERSION_flatbuffers-native:ccimx93 = "2.0.7" PREFERRED_VERSION_flatbuffers-native:ccimx93 = "2.0.7"
PREFERRED_VERSION_tensorflow-lite:ccimx93 = "2.10.0" PREFERRED_VERSION_onnxruntime:ccimx93 = "1.13.1"
PREFERRED_VERSION_tensorflow-lite-host-tools:ccimx93 = "2.10.0" PREFERRED_VERSION_onnxruntime-native:ccimx93 = "1.13.1"
PREFERRED_VERSION_tensorflow-lite-host-tools-native:ccimx93 = "2.10.0" PREFERRED_VERSION_tensorflow-lite:ccimx93 = "2.11.1"
PREFERRED_VERSION_tensorflow-lite-host-tools:ccimx93 = "2.11.1"
PREFERRED_VERSION_tensorflow-lite-host-tools-native:ccimx93 = "2.11.1"
# Optee runtime packages to install # Optee runtime packages to install
OPTEE_PKGS ??= "optee-client optee-os" OPTEE_PKGS ??= "optee-client optee-os"

View File

@ -1,5 +1,10 @@
# Copyright 2023 Digi International Inc. # Copyright 2023 Digi International Inc.
ML_NNSTREAMER_PKGS_LIST:remove = "nnstreamer-deepview-rt"
ML_PKGS:mx9-nxp-bsp:remove = "deepview-rt-examples"
ML_PKGS:mx9-nxp-bsp:append = " modelrunner"
# ARM ethos-u package # ARM ethos-u package
ETHOS_U_PKGS:append:mx93-nxp-bsp = " \ ETHOS_U_PKGS:append:mx93-nxp-bsp = " \
eiq-examples \ eiq-examples \

View File

@ -1,5 +1,6 @@
# Copyright 2023 Digi International Inc. # Copyright 2023 Digi International Inc.
# The package's SConscript doesn't recognize the MAXLINELENGTH variable SRCBRANCH = "lf-6.1.36_2.1.0"
# injected by scons.bbclass, so remove it SRCREV = "b956e65221fca7dadfd8bdfd13279beacce17bc9"
EXTRA_OESCONS:remove = "${SCONS_MAXLINELENGTH}"
SCONS_MAXLINELENGTH = ""

View File

@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "${EIQ_EXAMPLES_SRC};branch=${SRCBRANCH}" SRC_URI = "${EIQ_EXAMPLES_SRC};branch=${SRCBRANCH}"
EIQ_EXAMPLES_SRC ?= "git://github.com/nxp-imx/eiq-example.git;protocol=https" EIQ_EXAMPLES_SRC ?= "git://github.com/nxp-imx/eiq-example.git;protocol=https"
SRCBRANCH = "lf-6.1.1_1.0.0" SRCBRANCH = "lf-6.1.36_2.1.0"
SRCREV = "798519ee033fb7a5aef989a793afe16f400d6479" SRCREV = "47da4f9c4d568704f8835dde62cfc61f16e89ba6"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -2,5 +2,5 @@
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRCBRANCH = "lf-6.1.1_1.0.0" SRCBRANCH = "lf-6.1.36_2.1.0"
SRCREV = "ca1a424bcd00758e0b50043ac7f8a3ff214e9ed8" SRCREV = "98759f579297726474d6b32927694502c66ce15a"

View File

@ -2,9 +2,14 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
# Use our custom ethosu_firmware without debug port; keep the commented info for traceability LIC_FILES_CHKSUM = "\
#SRCBRANCH = "lf-6.1.1_1.0.0" file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e \
#SRCREV = "c80a413664f650c366fc4721474a3fe1d1503eb5" file://LICENSE-GPL-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE-BSD-3.txt;md5=0858ec9c7a80c4a2cf16e4f825a2cc91 \
"
SRCBRANCH = "lf-6.1.36_2.1.0"
SRCREV = "5fff874731d02bb232159108ccfa6833e92b6942"
SRC_URI:append:ccimx93 = " file://ethosu_firmware" SRC_URI:append:ccimx93 = " file://ethosu_firmware"
do_install:append:ccimx93 () { do_install:append:ccimx93 () {

View File

@ -1,15 +1,15 @@
# Copyright 2022 NXP # Copyright 2023 NXP
DESCRIPTION = "The vela tool is used to compile a TensorFlow Lite for \ DESCRIPTION = "The vela tool is used to compile a TensorFlow Lite for \
Microcontrollers neural network model into an optimised version that \ Microcontrollers neural network model into an optimised version that \
can run on an embedded system containing an Arm Ethos-U NPU" can run on an embedded system containing an Arm Ethos-U NPU"
LICENSE = "Apache-2.0" LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy python3-lxml" DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy python3-lxml python3-numpy-native"
SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}" SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}"
VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https" VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https"
SRCBRANCH = "lf-6.1.1_1.0.0" SRCBRANCH = "lf-6.1.36_2.1.0"
SRCREV = "8b138a2e6880e31bd199764db9c5177c46bd5579" SRCREV = "2647a977643907b2cf2249b917549133302aaa8e"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@ -23,6 +23,6 @@ do_compile:prepend() {
export https_proxy=${https_proxy} export https_proxy=${https_proxy}
} }
RDEPENDS:${PN} += "flatbuffers python3-numpy python3-lxml" RDEPENDS:${PN} += "python3-flatbuffers python3-numpy python3-lxml"
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"

View File

@ -1,12 +1,10 @@
DESCRIPTION = "This package includes the updated and experimental ModelRunner for TensorFlow Lite and ARM NN. Also in this repository is a pre-release of DeepViewRT with support for the OpenVX backend." DESCRIPTION = "This package includes the updated and experimental ModelRunner for TensorFlow Lite and ARM NN"
LICENSE = "Proprietary" LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479" LIC_FILES_CHKSUM = "file://COPYING;md5=db4762b09b6bda63da103963e6e081de"
DEPENDS = "python3 python3-pip-native"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "a4782e44df2254d30f7c6b0a45c4102e" SRC_URI[md5sum] = "c1e293af3bcb44925bff11fbd63cb1bd"
SRC_URI[sha256sum] = "40d6c12bbe5fc29a257a1717684ec650bd390eb1565c5bca82ec56e3ffbcf918" SRC_URI[sha256sum] = "a7008d3d3ecd09fe2450ef8ed721ecde07ebf04dfff714f59424625a3cb5ba0d"
S = "${WORKDIR}/${BPN}-${PV}" S = "${WORKDIR}/${BPN}-${PV}"
inherit fsl-eula-unpack python3native inherit fsl-eula-unpack python3native
@ -24,20 +22,9 @@ PACKAGECONFIG[openvx] = ",,,libopenvx-imx"
do_install () { do_install () {
install -d ${D}${bindir} install -d ${D}${bindir}
install -d ${D}${libdir} install -d ${D}${libdir}
install -d ${D}${includedir}
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
cp -r ${S}/modelrunner/bin/* ${D}${bindir} cp -r ${S}/modelrunner/bin/* ${D}${bindir}
cp -rP ${S}/modelrunner/lib/* ${D}${libdir} cp -rP ${S}/modelrunner/lib/* ${D}${libdir}
cp -rP ${S}/${BPN}/lib/* ${D}${libdir}
cp -r ${S}/${BPN}/include/* ${D}${includedir}
if ${@bb.utils.contains('PACKAGECONFIG', 'openvx', 'false', 'true', d)} ; then
rm ${D}${libdir}/deepview-rt-openvx.so
fi
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/whl/deepview_rt-*.whl
chown -R root:root "${D}" chown -R root:root "${D}"
} }

View File

@ -0,0 +1,34 @@
# Copyright 2023 NXP
DESCRIPTION = "Parts of ONNX Runtime that needs to be compiled for native system"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
# For ONNX Runtime v0.3.0 we need only 'protoc' to be compiled for native system
# 3.18.3
GIT_protobuf = "git://github.com/google/protobuf.git;nobranch=1;name=protobuf;protocol=https"
SRCREV_protobuf = "a902b39270841beafc307dfa709610aa1cac2f06"
SRC_URI = "\
${GIT_protobuf} \
"
SRCREV_FORMAT = "protobuf"
S = "${WORKDIR}/git"
inherit cmake
inherit native
OECMAKE_SOURCEPATH = "${S}/cmake"
EXTRA_OECMAKE += "\
-Dprotobuf_BUILD_TESTS=OFF \
-Dprotobuf_BUILD_EXAMPLES=OFF \
-Dprotobuf_BUILD_SHARED_LIBS=OFF \
"
do_install() {
install -d ${D}/${bindir}/${PN}
install -m 0755 ${B}/protoc ${D}/${bindir}/${PN}
}

View File

@ -1,8 +0,0 @@
# Copyright (C) 2023 Digi International
SRCBRANCH_runtime:ccimx93 = "lf-6.1.1_1.0.0"
SRCREV_runtime:ccimx93 = "66e3e9a93840ed1e55dc2d7e894c0ae26fb0e51e"
# Updated flatbuffers recipe for ccimx93, renamed the runtime python package
PYTHON_RDEPENDS:remove:ccimx93 = "flatbuffers-${PYTHON_PN}"
PYTHON_RDEPENDS:append:ccimx93 = " ${PYTHON_PN}-flatbuffers"

View File

@ -0,0 +1,197 @@
# Copyright 2020-2023 NXP
DESCRIPTION = "cross-platform, high performance scoring engine for ML models"
SECTION = "devel"
LICENSE = "MIT & Apache-2.0"
LIC_FILES_CHKSUM_runtime = "file://LICENSE;md5=0f7e3b1308cb5c00b372a6e78835732d"
LIC_FILES_CHKSUM_model = "file://${S}/example-models/squeezenet/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
LIC_FILES_CHKSUM = "${LIC_FILES_CHKSUM_runtime} ${LIC_FILES_CHKSUM_model}"
DEPENDS = "libpng zlib ${BPN}-native"
inherit setuptools3
ONNXRUNTIME_SRC ?= "gitsm://github.com/nxp-imx/onnxruntime-imx.git;protocol=https"
SRCBRANCH_runtime = "lf-6.1.36_2.1.0"
SRC_URI = "${ONNXRUNTIME_SRC};branch=${SRCBRANCH_runtime};name=runtime"
SRCREV_runtime = "0f642b5e71e6e9c9681b90b2844176ab7eacf6eb"
SRCREV_FORMAT = "runtime_model"
S = "${WORKDIR}/git"
inherit cmake python3native
OECMAKE_SOURCEPATH = "${S}/cmake"
OECMAKE_GENERATOR = "Unix Makefiles"
# Notes:
# Protobuff/Protoc:
# - protobuf is essetially built twice for native and target system
# - DONNX_CUSTOM_PROTOC_EXECUTABLE - use native protoc
# - onnxruntime_USE_PREBUILT_PB=OFF - we still need protobuf compiled from target system; although we already have native version
# Eigen:
# - the git operation within CMake fails, so we treat it as 'pre-installed' although it's fetched during fetch phase
# - the eigen_SOURCE_PATH needs to match 'destsuffix' in SRC_URI for eigen
# Abseil:
# - FETCHCONTENT_FULLY_DISCONNECTED=OFF and do_configure:prepend() added to allow
# abseil build process (the issue was related to CMake not fetching sources)
EXTRA_OECMAKE += "\
-DONNX_CUSTOM_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/${PN}-native/protoc \
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Donnxruntime_BUILD_UNIT_TESTS=ON \
"
PYTHON_DEPENDS = "\
${PYTHON_PN} \
${PYTHON_PN}-pip-native \
${PYTHON_PN}-numpy-native \
${PYTHON_PN}-packaging-native\
${PYTHON_PN}-pybind11\
${PYTHON_PN}-pybind11-native\
"
PYTHON_RDEPENDS = "\
${PYTHON_PN} \
${PYTHON_PN}-numpy \
${PYTHON_PN}-protobuf \
${PYTHON_PN}-coloredlogs \
${PYTHON_PN}-flatbuffers \
${PYTHON_PN}-sympy \
"
PACKAGECONFIG ?= "crosscompiling sharedlib nnapi python"
PACKAGECONFIG[nsync] = "-Donnxruntime_USE_NSYNC=ON, -Donnxruntime_USE_NSYNC=OFF"
PACKAGECONFIG[prebuilt] = "-Donnxruntime_USE_PREBUILT_PB=ON, -Donnxruntime_USE_PREBUILT_PB=OFF"
PACKAGECONFIG[openmp] = "-Donnxruntime_USE_OPENMP=ON, -Donnxruntime_USE_OPENMP=OFF"
PACKAGECONFIG[trt] = "-Donnxruntime_USE_TRT=ON, -Donnxruntime_USE_TRT=OFF"
PACKAGECONFIG[nuphar] = "-Donnxruntime_USE_NUPHAR=ON, -Donnxruntime_USE_NUPHAR=OFF"
PACKAGECONFIG[brainslice] = "-Donnxruntime_USE_BRAINSLICE=ON, -Donnxruntime_USE_BRAINSLICE=OFF"
PACKAGECONFIG[python] = "-Donnxruntime_ENABLE_PYTHON=ON, -Donnxruntime_ENABLE_PYTHON=OFF, ${PYTHON_DEPENDS}, ${PYTHON_RDEPENDS}"
PACKAGECONFIG[sharedlib] = "-Donnxruntime_BUILD_SHARED_LIB=ON, -Donnxruntime_BUILD_SHARED_LIB=OFF"
PACKAGECONFIG[eigenblas] = "-Donnxruntime_USE_EIGEN_FOR_BLAS=ON, -Donnxruntime_USE_EIGEN_FOR_BLAS=OFF"
PACKAGECONFIG[openblas] = "-Donnxruntime_USE_OPENBLAS=ON, -Donnxruntime_USE_OPENBLAS=OFF"
PACKAGECONFIG[dnnl] = "-Donnxruntime_USE_DNNL=ON, -Donnxruntime_USE_DNNL=OFF"
PACKAGECONFIG[mklml] = "-Donnxruntime_USE_MKLML=ON, -Donnxruntime_USE_MKLML=OFF"
PACKAGECONFIG[gemmlowp] = "-Donnxruntime_USE_GEMMLOWP=ON, -Donnxruntime_USE_GEMMLOWP=OFF"
PACKAGECONFIG[ngraph] = "-Donnxruntime_USE_NGRAPH=ON, -Donnxruntime_USE_NGRAPH=OFF"
PACKAGECONFIG[openvino] = "-Donnxruntime_USE_OPENVINO=ON, -Donnxruntime_USE_OPENVINO=OFF"
PACKAGECONFIG[interop] = "-Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=ON, -Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF"
PACKAGECONFIG[dml] = "-Donnxruntime_USE_DML=ON, -Donnxruntime_USE_DML=OFF"
PACKAGECONFIG[telemetry] = "-Donnxruntime_USE_TELEMETRY=ON, -Donnxruntime_USE_TELEMETRY=OFF"
PACKAGECONFIG[armnn-relu] = "-Donnxruntime_ARMNN_RELU_USE_CPU=ON, -Donnxruntime_ARMNN_RELU_USE_CPU=OFF"
PACKAGECONFIG[armnn-bn] = "-Donnxruntime_ARMNN_BN_USE_CPU=ON, -Donnxruntime_ARMNN_BN_USE_CPU=OFF"
PACKAGECONFIG[opschema] = "-Donnxruntime_PYBIND_EXPORT_OPSCHEMA=ON, -Donnxruntime_PYBIND_EXPORT_OPSCHEMA=OFF"
PACKAGECONFIG[nnapi] = "-Donnxruntime_USE_NNAPI_BUILTIN=ON, -Donnxruntime_USE_NNAPI_BUILTIN=OFF"
PACKAGECONFIG[tvm] = "-Donnxruntime_USE_TVM=ON, -Donnxruntime_USE_TVM=OFF"
PACKAGECONFIG[llvm] = "-Donnxruntime_USE_LLVM=ON, -Donnxruntime_USE_LLVM=OFF"
PACKAGECONFIG[microsoft] = "-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=ON, -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF"
PACKAGECONFIG[eigenthreadpool] = "-Donnxruntime_USE_EIGEN_THREADPOOL=ON, -Donnxruntime_USE_EIGEN_THREADPOOL=OFF"
PACKAGECONFIG[tensorrt] = "-Donnxruntime_USE_TENSORRT=ON, -Donnxruntime_USE_TENSORRT=OFF"
PACKAGECONFIG[crosscompiling] = "-Donnxruntime_CROSS_COMPILING=ON, -Donnxruntime_CROSS_COMPILING=OFF "
PACKAGECONFIG[server] = "-Donnxruntime_BUILD_SERVER=ON, -Donnxruntime_BUILD_SERVER=OFF"
PACKAGECONFIG[x86] = "-Donnxruntime_BUILD:x86=ON, -Donnxruntime_BUILD:x86=OFF"
PACKAGECONFIG[fullprotobuf] = "-Donnxruntime_USE_FULL_PROTOBUF=ON, -Donnxruntime_USE_FULL_PROTOBUF=OFF"
PACKAGECONFIG[ops] = "-Donnxruntime_DISABLE_CONTRIB_OPS=ON, -Donnxruntime_DISABLE_CONTRIB_OPS=OFF"
PACKAGECONFIG[staticruntime] = "-Donnxruntime_MSVC_STATIC_RUNTIME=ON, -Donnxruntime_MSVC_STATIC_RUNTIME=OFF"
PACKAGECONFIG[runtests] = "-Donnxruntime_RUN_ONNX_TESTS=ON, -Donnxruntime_RUN_ONNX_TESTS=OFF"
PACKAGECONFIG[reports] = "-Donnxruntime_GENERATE_TEST_REPORTS=ON, -Donnxruntime_GENERATE_TEST_REPORTS=OFF"
PACKAGECONFIG[devmode] = "-Donnxruntime_DEV_MODE=ON, -Donnxruntime_DEV_MODE=OFF"
PACKAGECONFIG[cuda] = "-Donnxruntime_USE_CUDA=ON, -Donnxruntime_USE_CUDA=OFF"
PACKAGECONFIG[automl] = "-Donnxruntime_USE_AUTOML=ON, -Donnxruntime_USE_AUTOML=OFF"
PACKAGECONFIG[jemalloc] = "-Donnxruntime_USE_JEMALLOC=ON, -Donnxruntime_USE_JEMALLOC=OFF"
PACKAGECONFIG[mimalloc] = "-Donnxruntime_USE_MIMALLOC=ON, -Donnxruntime_USE_MIMALLOC=OFF"
PACKAGECONFIG[csharp] = "-Donnxruntime_BUILD_CSHARP=ON, -Donnxruntime_BUILD_CSHARP=OFF"
PACKAGECONFIG[java] = "-Donnxruntime_BUILD_JAVA=ON, -Donnxruntime_BUILD_JAVA=OFF"
do_configure[network] = "1"
do_configure:prepend() {
export HTTP_PROXY=${http_proxy}
export HTTPS_PROXY=${https_proxy}
export http_proxy=${http_proxy}
export https_proxy=${https_proxy}
}
do_compile[network] = "1"
do_compile:prepend() {
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
# required to pull pybind11
export HTTP_PROXY=${http_proxy}
export HTTPS_PROXY=${https_proxy}
export http_proxy=${http_proxy}
export https_proxy=${https_proxy}
fi
}
SETUPTOOLS_SETUP_PATH = "${B}"
do_compile:append() {
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
# Copy 'setup.py' to build dir
cp ${S}/setup.py ${B}
# Copy path file with path 'docs/python/README.rst' to build dir
mkdir -p ${B}/docs/python && cp ${S}/docs/python/README.rst ${B}/docs/python
setuptools3_do_compile
git config --global --add safe.directory ${WORKDIR}/build/pybind11/src/pybind11
fi
}
do_install:append() {
CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
# Ensure target dir exists
install -d ${D}${bindir}/${BP}
# Copy squeezenet updated model from imx-onnxruntime repo
if [ -d ${S}/example-models/ ]; then
cp $CP_ARGS ${S}/example-models/squeezenet ${D}${bindir}/${BP}/
fi
# If cmake installs 'onnx_test_runner' at bindir level, move to package
if [ -f ${D}${bindir}/onnx_test_runner ]; then
mv ${D}${bindir}/onnx_test_runner ${D}${bindir}/${BP}/
fi
# Install onnxruntime_perf_test in main package
install -m 0755 ${B}/onnxruntime_perf_test ${D}${bindir}/${BP}
# Install test binaries and data in test package
install -d ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/libcustom_op_library.so ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/onnxruntime_api_tests_without_env ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/onnxruntime_global_thread_pools_test ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/onnxruntime_mlas_test ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/onnxruntime_shared_lib_test ${D}${bindir}/${BP}/tests
install -m 0744 ${B}/onnxruntime_test_all ${D}${bindir}/${BP}/tests
cp $CP_ARGS ${B}/testdata ${D}${bindir}/${BP}/tests
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
setuptools3_do_install
find ${D}/${PYTHON_SITEPACKAGES_DIR} -type d -name "__pycache__" -exec rm -Rf {} +
git config --global --unset-all safe.directory ${TMPDIR}/.*/${PN}/.*/build/pybind11/src/pybind11
fi
}
# Adjust the Python runtime dependency inherited from setuptools3-base.bbclass
# since Python support for this recipe is conditional
RDEPENDS:${PN}:remove:class-target = " \
${@bb.utils.contains('PACKAGECONFIG', 'python', '', '${PYTHON_PN}-core', d)}"
# libonnxruntime_providers_shared.so is being packaged into -dev which is intended
INSANE_SKIP:${PN}-dev += "dev-elf"
# A separate tests package for the test binaries not appearing in the main package
PACKAGE_BEFORE_PN = "${PN}-tests"
FILES:${PN}-tests = "${bindir}/${BP}/tests/*"
# libcustom_op_library.so is in bindir, which is intended;
# onnxruntime_shared_lib_test requires the shlib to be in the same directory as testdata to run properly
INSANE_SKIP:${PN}-tests += "libdir"
INSANE_SKIP:${PN}-dbg += "libdir"
RDEPENDS:${PN}-tests += "arm-compute-library"

View File

@ -1,5 +1,5 @@
# Copyright 2020-2021 NXP # Copyright 2020-2021 NXP
TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https" TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https"
SRCBRANCH_tf = "lf-6.1.1_1.0.0" SRCBRANCH_tf = "lf-6.1.36_2.1.0"
SRCREV_tf = "6cac366ef5b7e632305c2413875ce2d3b72c03dd" SRCREV_tf = "11e92c028eceff5b5835d15e3666a4d3d7ef1088"

View File

@ -8,8 +8,8 @@ DEPENDS = "tensorflow-lite ethos-u-driver-stack"
require tensorflow-lite-${PV}.inc require tensorflow-lite-${PV}.inc
TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-ethosu-delegate-imx.git;protocol=https" TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-ethosu-delegate-imx.git;protocol=https"
SRCBRANCH_ethosu = "lf-6.1.1_1.0.0" SRCBRANCH_ethosu = "lf-6.1.36_2.1.0"
SRCREV_ethosu = "4bd28d3e64d26f4d5b5ee358036b2d06f3322a57" SRCREV_ethosu = "0f8670a7c25ee2b2022a471ee50d394429ecf716"
SRCREV_FORMAT = "ethosu_tf" SRCREV_FORMAT = "ethosu_tf"
@ -25,7 +25,7 @@ EXTRA_OECMAKE = "-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR}"
EXTRA_OECMAKE += " \ EXTRA_OECMAKE += " \
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
-DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \ -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \
-DTFLITE_LIB_LOC=${STAGING_DIR_HOST}/usr/lib/libtensorflow-lite.so \ -DTFLITE_LIB_LOC=${STAGING_DIR_HOST}${libdir}/libtensorflow-lite.so \
${S} \ ${S} \
" "

View File

@ -0,0 +1,3 @@
# Copyright 2023 Digi International Inc.
PACKAGECONFIG_SOC:mx9-nxp-bsp:remove = "deepview-rt"