meta-digi/meta-digi-dey/dynamic-layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-dele...

62 lines
1.6 KiB
BlitzBasic

# Copyright 2020-2023 NXP
DESCRIPTION = "TensorFlow Lite Ethos-u Delegate"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
DEPENDS = "tensorflow-lite ethos-u-driver-stack"
require tensorflow-lite-${PV}.inc
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"
SRCREV_ethosu = "4bd28d3e64d26f4d5b5ee358036b2d06f3322a57"
SRCREV_FORMAT = "ethosu_tf"
SRC_URI = "${TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC};branch=${SRCBRANCH_ethosu};name=ethosu \
${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf;destsuffix=tfgit \
"
S = "${WORKDIR}/git"
inherit python3native cmake
EXTRA_OECMAKE = "-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR}"
EXTRA_OECMAKE += " \
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
-DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \
-DTFLITE_LIB_LOC=${STAGING_DIR_HOST}/usr/lib/libtensorflow-lite.so \
${S} \
"
CXXFLAGS += "-fPIC"
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}
# There is no Fortran compiler in the toolchain, but bitbake sets this variable anyway
# with unavailable binary.
export FC=""
}
do_install() {
# install libraries
install -d ${D}${libdir}
for lib in ${B}/lib*.so*
do
cp --no-preserve=ownership -d $lib ${D}${libdir}
done
}
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
# Output library is unversioned
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"