Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
SUMMARY = "The Linux driver stack for Arm(R) Ethos(TM)-U NPU"
|
||||
DESCRIPTION = "The Linux driver stack for Arm(R) Ethos(TM)-U provides \
|
||||
an example of how a rich operating system like Linux can dispatch \
|
||||
inferences to an Arm Cortex(R)-M subsystem, consisting of an Arm \
|
||||
Cortex-M of choice and an Arm Ethos-U NPU."
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
|
||||
DEPENDS = "flatbuffers python3-pybind11 python3-pybind11-native"
|
||||
|
||||
SRC_URI = "${ETHOS_U_SRC};branch=${SRCBRANCH}"
|
||||
ETHOS_U_SRC ?= "git://github.com/nxp-imx/ethos-u-driver-stack-imx.git;protocol=https"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "2acb7e2626fe3ff8764019e385829105a6e210bb"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake setuptools3
|
||||
|
||||
SETUPTOOLS_BUILD_ARGS = "build_ext --library-dirs ${B}/driver_library"
|
||||
|
||||
do_configure() {
|
||||
cmake_do_configure
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
cmake_do_compile
|
||||
setuptools3_do_compile
|
||||
}
|
||||
|
||||
do_install () {
|
||||
cmake_do_install
|
||||
setuptools3_do_install
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "flatbuffers python3-numpy python3-pillow"
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
# this depends on machine specific firmware
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
# This must be ELF,
|
||||
# rename and copy to /lib/firmware/ethosu_firmware
|
||||
# name is currently compiled fix into the driver
|
||||
ETHOS_U_FIRMWARE:tqma93xx = "ethosu_apps_rpmsg.elf"
|
||||
|
||||
# appending to SRC_URI and overwriting do_install keeps license handling intact
|
||||
SRC_URI:append:tqma93xx = " file://${ETHOS_U_FIRMWARE}"
|
||||
|
||||
do_install:tqma93xx () {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware
|
||||
install -m 0644 ${WORKDIR}/${ETHOS_U_FIRMWARE} ${D}${nonarch_base_libdir}/firmware/ethosu_firmware
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
SUMMARY = "The firmware of Cortex(R)-M33 for Arm(R) Ethos(TM)-U NPU"
|
||||
DESCRIPTION = "The firmware of Cortex(R)-M33 for Arm(R) Ethos(TM)-U NPU"
|
||||
LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e \
|
||||
file://LICENSE-GPL-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://LICENSE-BSD-3.txt;md5=0858ec9c7a80c4a2cf16e4f825a2cc91 \
|
||||
"
|
||||
|
||||
SRC_URI = "${ETHOS_U_FIRMWARE_SRC};branch=${SRCBRANCH}"
|
||||
ETHOS_U_FIRMWARE_SRC ?= "git://github.com/nxp-imx/ethos-u-firmware.git;protocol=https"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "bd12be9d5e61a12641fe284d323ff964c9c7a080"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
ETHOS_U_FIRMWARE = "ethosu_firmware"
|
||||
ETHOS_U_FIRMWARE:imx93-9x9-lpddr4-qsb = "ethosu_firmware_9x9"
|
||||
ETHOS_U_FIRMWARE:imx93-11x11-lpddr4x-evk = "ethosu_firmware_11x11"
|
||||
ETHOS_U_FIRMWARE:imx93-14x14-lpddr4x-evk = "ethosu_firmware_14x14"
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware
|
||||
install -m 0644 ${S}/${ETHOS_U_FIRMWARE} ${D}${nonarch_base_libdir}/firmware/ethosu_firmware
|
||||
}
|
||||
|
||||
FILES:${PN} = "${nonarch_base_libdir}/firmware/*"
|
||||
INSANE_SKIP:${PN} = "arch"
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright 2023 NXP
|
||||
DESCRIPTION = "The vela tool is used to compile a TensorFlow Lite for \
|
||||
Microcontrollers neural network model into an optimised version that \
|
||||
can run on an embedded system containing an Arm Ethos-U NPU"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy python3-lxml python3-numpy-native python3-setuptools-scm-native"
|
||||
|
||||
SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}"
|
||||
VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "507e8d46751227c7fd6f456774838a70e3c6d7a0"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit setuptools3
|
||||
|
||||
do_compile[network] = "1"
|
||||
do_compile:prepend() {
|
||||
export HTTP_PROXY=${http_proxy}
|
||||
export HTTPS_PROXY=${https_proxy}
|
||||
export http_proxy=${http_proxy}
|
||||
export https_proxy=${https_proxy}
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} += "python3-flatbuffers python3-numpy python3-lxml python3-pkg-resources"
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"
|
||||
@@ -0,0 +1,5 @@
|
||||
# Copyright 2020-2021 NXP
|
||||
|
||||
TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https"
|
||||
SRCBRANCH_tf = "lf-6.6.23_2.0.0"
|
||||
SRCREV_tf = "37cb38a251f92cf6041f18607e61c115e976a7f7"
|
||||
@@ -0,0 +1,61 @@
|
||||
# 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.6.23_2.0.0"
|
||||
SRCREV_ethosu = "f6db8f70f531684265aa7e085a8ae01f33d85cbe"
|
||||
|
||||
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}${libdir}/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)"
|
||||
@@ -0,0 +1,29 @@
|
||||
# Copyright 2022 NXP
|
||||
DESCRIPTION = "Host tools required for build of TensorFlow Lite C++ Library unit tests and Evaluation Tools"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=4158a261ca7f2525513e31ba9c50ae98"
|
||||
|
||||
require tensorflow-lite-${PV}.inc
|
||||
SRC_URI = "${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf"
|
||||
|
||||
inherit cmake
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
OECMAKE_SOURCEPATH = "${S}/tensorflow/lite/tools/cmake/native_tools"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
|
||||
-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \
|
||||
"
|
||||
|
||||
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}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
# Copyright 2023-2024 NXP
|
||||
DESCRIPTION = "TensorFlow Lite Neutron Delegate"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
DEPENDS = "tensorflow-lite neutron"
|
||||
|
||||
require tensorflow-lite-${PV}.inc
|
||||
|
||||
NEUTRON_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-neutron-delegate.git;protocol=https"
|
||||
SRCBRANCH_neutron = "lf-6.6.23_2.0.0"
|
||||
SRCREV_neutron = "0b4e06df64d39add24c1f1eef219f3cbc9ac6f2f"
|
||||
|
||||
SRCREV_FORMAT = "neutron_tf"
|
||||
|
||||
SRC_URI = "${NEUTRON_DELEGATE_SRC};branch=${SRCBRANCH_neutron};name=neutron \
|
||||
${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}${libdir}/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 = "(mx95-nxp-bsp)"
|
||||
@@ -0,0 +1,26 @@
|
||||
From 1ba241438dcc14852017757451521f5e27690290 Mon Sep 17 00:00:00 2001
|
||||
From: Cristinel Panfir <cristinel.panfir@nxp.com>
|
||||
Date: Mon, 2 May 2022 15:18:46 +0000
|
||||
Subject: [PATCH] Findtim-vx.cmake: Fix LIBDIR for multilib environment
|
||||
|
||||
Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
|
||||
---
|
||||
cmake/modules/Findtim-vx.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/Findtim-vx.cmake b/cmake/modules/Findtim-vx.cmake
|
||||
index d0240e8..8a69d02 100644
|
||||
--- a/cmake/modules/Findtim-vx.cmake
|
||||
+++ b/cmake/modules/Findtim-vx.cmake
|
||||
@@ -53,7 +53,7 @@ if((NOT DEFINED TIM_VX_INSTALL))
|
||||
else()
|
||||
message("=== Building with TIM_VX_LIBRIRIES from ${TIM_VX_INSTALL} ===")
|
||||
include_directories(${TIM_VX_INSTALL}/include)
|
||||
- set(LIBDIR lib)
|
||||
+ set(LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
list(APPEND VX_DELEGATE_DEPENDENCIES ${TIM_VX_INSTALL}/${LIBDIR}/libtim-vx.so)
|
||||
if(${TIM_VX_ENABLE_NODE_TRACE})
|
||||
list(APPEND VX_DELEGATE_DEPENDENCIES ${TIM_VX_INSTALL}/${LIBDIR}/libjsoncpp.so)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
# Copyright 2020-2021 NXP
|
||||
DESCRIPTION = "TensorFlow Lite VX Delegate"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7d6260e4f3f6f85de05af9c8f87e6fb5"
|
||||
|
||||
DEPENDS = "tensorflow-lite tim-vx"
|
||||
|
||||
require tensorflow-lite-${PV}.inc
|
||||
|
||||
TENSORFLOW_LITE_VX_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-vx-delegate-imx.git;protocol=https"
|
||||
SRCBRANCH_vx = "lf-6.6.23_2.0.0"
|
||||
SRCREV_vx = "9ae63a7d915f339ba5504710211e4e31a0dfd0e2"
|
||||
|
||||
SRCREV_FORMAT = "vx_tf"
|
||||
|
||||
SRC_URI = "${TENSORFLOW_LITE_VX_DELEGATE_SRC};branch=${SRCBRANCH_vx};name=vx \
|
||||
${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf;destsuffix=tfgit \
|
||||
file://0001-Findtim-vx.cmake-Fix-LIBDIR-for-multilib-environment.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit python3native cmake
|
||||
|
||||
EXTRA_OECMAKE = "-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR}"
|
||||
EXTRA_OECMAKE += " \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
|
||||
-DTIM_VX_INSTALL=${STAGING_DIR_HOST}/usr \
|
||||
-DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \
|
||||
-DTFLITE_LIB_LOC=${STAGING_DIR_HOST}${libdir}/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
|
||||
|
||||
# install header files
|
||||
install -d ${D}${includedir}/tensorflow-lite-vx-delegate
|
||||
cd ${S}
|
||||
cp --parents \
|
||||
$(find . -name "*.h*") \
|
||||
${D}${includedir}/tensorflow-lite-vx-delegate
|
||||
|
||||
}
|
||||
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
# Output library is unversioned
|
||||
SOLIBS = ".so"
|
||||
FILES_SOLIBSDEV = ""
|
||||
|
||||
COMPATIBLE_MACHINE = "(^$)"
|
||||
COMPATIBLE_MACHINE:imxgpu3d = "(mx8-nxp-bsp)"
|
||||
COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)"
|
||||
@@ -0,0 +1,6 @@
|
||||
Name: tensorflow lite
|
||||
Description: tensorflow lite static library
|
||||
Version: @version@
|
||||
Requires:
|
||||
Libs: -L@libdir@ -ltensorflow-lite -lrt
|
||||
Cflags: -I@includedir@
|
||||
@@ -0,0 +1,12 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append = " file://tensorflow-lite.pc.in"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${libdir}/pkgconfig
|
||||
install -m 0644 ${WORKDIR}/tensorflow-lite.pc.in ${D}${libdir}/pkgconfig/tensorflow2-lite.pc
|
||||
|
||||
sed -i 's:@version@:${PV}:g
|
||||
s:@libdir@:${libdir}:g
|
||||
s:@includedir@:${includedir}:g' ${D}${libdir}/pkgconfig/tensorflow2-lite.pc
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
# Copyright 2020-2021 NXP
|
||||
DESCRIPTION = "TensorFlow Lite C++ Library"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=4158a261ca7f2525513e31ba9c50ae98"
|
||||
|
||||
|
||||
DEPENDS = "flatbuffers python3-numpy-native python3-pip-native python3-pybind11-native python3-wheel-native unzip-native \
|
||||
python3 jpeg zlib ${BPN}-host-tools-native"
|
||||
|
||||
require tensorflow-lite-${PV}.inc
|
||||
SRC_URI = "${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf"
|
||||
|
||||
SRC_URI += "https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz;name=model-mobv1"
|
||||
SRC_URI[model-mobv1.md5sum] = "36af340c00e60291931cb30ce32d4e86"
|
||||
SRC_URI[model-mobv1.sha256sum] = "d32432d28673a936b2d6281ab0600c71cf7226dfe4cdcef3012555f691744166"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit python3native cmake
|
||||
|
||||
TFLITE_ENABLE_GPU = "off"
|
||||
TFLITE_ENABLE_GPU:mx95-nxp-bsp = "on"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
|
||||
-DTFLITE_EVAL_TOOLS=on \
|
||||
-DTFLITE_HOST_TOOLS_DIR=${STAGING_BINDIR_NATIVE} \
|
||||
-DTFLITE_BUILD_SHARED_LIB=on \
|
||||
-DTFLITE_ENABLE_NNAPI=off \
|
||||
-DTFLITE_ENABLE_NNAPI_VERBOSE_VALIDATION=on \
|
||||
-DTFLITE_ENABLE_RUY=on \
|
||||
-DTFLITE_ENABLE_XNNPACK=on \
|
||||
-DTFLITE_PYTHON_WRAPPER_BUILD_CMAKE2=on \
|
||||
-DTFLITE_ENABLE_EXTERNAL_DELEGATE=on \
|
||||
-DTFLITE_ENABLE_GPU=${TFLITE_ENABLE_GPU} \
|
||||
${S}/tensorflow/lite/ \
|
||||
"
|
||||
EXTRA_OECMAKE_BUILD = "benchmark_model label_image"
|
||||
|
||||
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_compile:append () {
|
||||
# build pip package
|
||||
cd ${B}
|
||||
CI_BUILD_PYTHON=${PYTHON} BUILD_NUM_JOBS=8 ${S}/tensorflow/lite/tools/pip_package/build_pip_package_with_cmake2.sh ${TARGET_ARCH}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
# install libraries
|
||||
install -d ${D}${libdir}
|
||||
for lib in ${B}/lib*.so*
|
||||
do
|
||||
cp --no-preserve=ownership -d $lib ${D}${libdir}
|
||||
done
|
||||
|
||||
# install header files
|
||||
install -d ${D}${includedir}/tensorflow/lite
|
||||
cd ${S}/tensorflow/lite
|
||||
cp --parents \
|
||||
$(find . -name "*.h*") \
|
||||
${D}${includedir}/tensorflow/lite
|
||||
|
||||
# install version.h from core
|
||||
install -d ${D}${includedir}/tensorflow/core/public
|
||||
cp ${S}/tensorflow/core/public/version.h ${D}${includedir}/tensorflow/core/public
|
||||
|
||||
# install ctstring_internal.h from core
|
||||
install -d ${D}${includedir}/tensorflow/core/platform
|
||||
cp ${S}/tensorflow/core/platform/ctstring_internal.h ${D}${includedir}/tensorflow/core/platform
|
||||
|
||||
# install ctstring_internal.h from tsl
|
||||
install -d ${D}${includedir}/tsl/platform
|
||||
cp ${S}/third_party/xla/third_party/tsl/tsl/platform/ctstring_internal.h ${D}${includedir}/tsl/platform
|
||||
|
||||
# install examples
|
||||
install -d ${D}${bindir}/${PN}-${PV}/examples
|
||||
install -m 0555 ${B}/examples/label_image/label_image ${D}${bindir}/${PN}-${PV}/examples
|
||||
install -m 0555 ${B}/tools/benchmark/benchmark_model ${D}${bindir}/${PN}-${PV}/examples
|
||||
install -m 0555 ${B}/tools/evaluation/coco_object_detection_run_eval ${D}${bindir}/${PN}-${PV}/examples
|
||||
install -m 0555 ${B}/tools/evaluation/imagenet_image_classification_run_eval ${D}${bindir}/${PN}-${PV}/examples
|
||||
install -m 0555 ${B}/tools/evaluation/inference_diff_run_eval ${D}${bindir}/${PN}-${PV}/examples
|
||||
|
||||
# install label_image data
|
||||
cp ${S}/tensorflow/lite/examples/label_image/testdata/grace_hopper.bmp ${D}${bindir}/${PN}-${PV}/examples
|
||||
cp ${S}/tensorflow/lite/java/ovic/src/testdata/labels.txt ${D}${bindir}/${PN}-${PV}/examples
|
||||
|
||||
|
||||
# Install python example
|
||||
cp ${S}/tensorflow/lite/examples/python/label_image.py ${D}${bindir}/${PN}-${PV}/examples
|
||||
|
||||
# Install mobilenet tflite file
|
||||
cp ${WORKDIR}/mobilenet_*.tflite ${D}${bindir}/${PN}-${PV}/examples
|
||||
|
||||
# Install pip package
|
||||
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
|
||||
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -vvv --platform linux_${TARGET_ARCH} \
|
||||
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
|
||||
${B}/tflite_pip/dist/tflite_runtime-*.whl
|
||||
}
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
|
||||
|
||||
RDEPENDS:${PN} = " \
|
||||
python3 \
|
||||
python3-numpy \
|
||||
"
|
||||
|
||||
# TensorFlow and TensorFlow Lite both exports few files, suppress the error
|
||||
# SSTATE_ALLOW_OVERLAP_FILES = "${D}${includedir}"
|
||||
SSTATE_ALLOW_OVERLAP_FILES = "/"
|
||||
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
INSANE_SKIP:${PN} += " \
|
||||
already-stripped \
|
||||
staticdev \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${libdir}/python*"
|
||||
@@ -0,0 +1,32 @@
|
||||
SUMMARY = "Tensor Interface Module for OpenVX"
|
||||
DESCRIPTION = "TIM-VX is a software integration module provided by VeriSilicon \
|
||||
to facilitate deployment of Neural-Networks on OpenVX enabled ML accelerators. It serves as \
|
||||
the backend binding for runtime frameworks such as Android NN, Tensorflow-Lite, MLIR, TVM and more."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a223f028c6a73fd2bd9223b79a38dcf6"
|
||||
|
||||
DEPENDS = "imx-gpu-viv"
|
||||
|
||||
SRC_URI = "${TIM_VX_SRC};branch=${SRCBRANCH}"
|
||||
TIM_VX_SRC ?= "git://github.com/nxp-imx/tim-vx-imx.git;protocol=https"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "37be6a7229db9a8261f873f68c407323c072d9c2"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCONFIG=YOCTO \
|
||||
-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \
|
||||
-DTIM_VX_ENABLE_TEST=off \
|
||||
-DTIM_VX_USE_EXTERNAL_OVXLIB=off \
|
||||
"
|
||||
|
||||
# Output library is unversioned
|
||||
SOLIBS = ".so"
|
||||
FILES_SOLIBSDEV = ""
|
||||
|
||||
COMPATIBLE_MACHINE = "(^$)"
|
||||
COMPATIBLE_MACHINE:imxgpu3d = "(mx8-nxp-bsp)"
|
||||
COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)"
|
||||
Reference in New Issue
Block a user