Skip to content

Commit

Permalink
Merge pull request #70 from chrisdimich/master
Browse files Browse the repository at this point in the history
Update/Add various recipes as per NXP release 6.1.1-1.0.0
  • Loading branch information
otavio authored Jun 2, 2023
2 parents 085d29a + 26473ce commit 320468f
Show file tree
Hide file tree
Showing 33 changed files with 445 additions and 252 deletions.
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "meta-freescale-ml"
BBFILE_PATTERN_meta-freescale-ml := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-freescale-ml = "8"
LAYERSERIES_COMPAT_meta-freescale-ml = "kirkstone"
LAYERSERIES_COMPAT_meta-freescale-ml = "kirkstone langdale mickledore"
LAYERDEPENDS_meta-freescale-ml = "freescale-layer meta-python"
71 changes: 0 additions & 71 deletions recipes-devtools/armnn-swig/armnn-swig.inc

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions recipes-devtools/armnn-swig/armnn-swig_4.0.2.bb

This file was deleted.

34 changes: 34 additions & 0 deletions recipes-devtools/flatbuffers/flatbuffers_2.0.7.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
SUMMARY = "Memory Efficient Serialization Library"
HOMEPAGE = "https://github.com/google/flatbuffers"
SECTION = "console/tools"
LICENSE = "Apache-2.0"

PACKAGE_BEFORE_PN = "${PN}-compiler"
DEPENDS = "flatbuffers-native"

RDEPENDS:${PN}-compiler = "${PN}"
RDEPENDS:${PN}-${PYTHON_PN} = "${PN}"
RDEPENDS:${PN}-dev += "${PN}-compiler"

LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "8367664f15c3ea2ee58c67dacf9d630b49466de5"

SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https"

CVE_CHECK_IGNORE += "CVE-2020-35864"

EXTRA_OECMAKE += "\
-DFLATBUFFERS_BUILD_TESTS=OFF \
-DFLATBUFFERS_BUILD_SHAREDLIB=ON \
"

EXTRA_OECMAKE:append:class-target = " -DFLATBUFFERS_FLATC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/flatc"

inherit cmake python3native

S = "${WORKDIR}/git"

FILES:${PN}-compiler = "${bindir}"

BBCLASSEXTEND = "native nativesdk"
15 changes: 15 additions & 0 deletions recipes-devtools/flatbuffers/python3-flatbuffers_2.0.7.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SUMMARY = "Memory Efficient Serialization Library - Python3 Modules"
HOMEPAGE = "https://github.com/google/flatbuffers"
SECTION = "console/tools"
LICENSE = "Apache-2.0"

LIC_FILES_CHKSUM = "file://../LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "8367664f15c3ea2ee58c67dacf9d630b49466de5"
SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https"
S = "${WORKDIR}/git/python"

RDEPENDS:${PN} = "flatbuffers"

inherit setuptools3

58 changes: 49 additions & 9 deletions recipes-fsl/packagegroups/packagegroup-fsl-ml.bb
Original file line number Diff line number Diff line change
@@ -1,35 +1,75 @@
# Copyright 2019-2021 NXP
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "Add packages for AI/ML build"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PACKAGE_ARCH = "${MACHINE_SOCARCH}"
PACKAGE_ARCH = "${TUNE_PKGARCH}"

inherit packagegroup

ML_NNSTREAMER_PKGS_LIST = " \
nnstreamer \
nnstreamer-deepview-rt \
nnstreamer-protobuf \
nnstreamer-python3 \
nnstreamer-query \
nnstreamer-tensorflow-lite \
"

ML_NNSTREAMER_PKGS = ""
ML_NNSTREAMER_PKGS:mx8-nxp-bsp:imxgpu = "${ML_NNSTREAMER_PKGS_LIST}"
ML_NNSTREAMER_PKGS:mx8mp-nxp-bsp = "${ML_NNSTREAMER_PKGS_LIST} nnstreamer-tvm nnstreamer-unittest"
ML_NNSTREAMER_PKGS:mx9-nxp-bsp = "${ML_NNSTREAMER_PKGS_LIST}"

ML_PKGS ?= ""
# i.MX8MP uses nnshark - other i.MX8/9 use raw gstshark
ML_GST_PROFILER = ""
#ML_GST_PROFILER:mx8-nxp-bsp = "gst-shark"
#ML_GST_PROFILER:mx8mp-nxp-bsp = "nnshark"
#ML_GST_PROFILER:mx9-nxp-bsp = "gst-shark"

# These packages don't require any acceleration
ML_PKGS = ""
ML_PKGS:mx8-nxp-bsp = " \
onnxruntime \
pytorch \
deepview-rt-examples \
onnxruntime-tests \
tensorflow-lite \
torchvision \
"
ML_PKGS:mx8mq-nxp-bsp = " \
deepview-rt \
tvm \
ML_PKGS:mx9-nxp-bsp = " \
deepview-rt-examples \
onnxruntime-tests \
tensorflow-lite \
torchvision \
"
ML_PKGS:mx8mp-nxp-bsp = " \
deepview-rt \
# These packages require acceleration, which currently maps to
# all SOCs with GPU except for 8M Mini
ML_ACCELERATED_PKGS = ""
ML_ACCELERATED_PKGS:mx8-nxp-bsp:imxgpu = " \
tensorflow-lite-vx-delegate \
"
ML_ACCELERATED_PKGS:mx8mp-nxp-bsp = " \
tensorflow-lite-vx-delegate \
tvm \
"
ML_ACCELERATED_PKGS:mx8mm-nxp-bsp = ""


# ARM ethos-u package
ETHOS_U_PKGS = ""
ETHOS_U_PKGS:mx93-nxp-bsp = " \
ethos-u-vela \
ethos-u-driver-stack \
tensorflow-lite-ethosu-delegate \
eiq-examples \
"


RDEPENDS:${PN} = " \
${ML_PKGS} \
${ML_ACCELERATED_PKGS} \
${ML_NNSTREAMER_PKGS} \
${ML_GST_PROFILER} \
${ETHOS_U_PKGS} \
"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 NXP
# Copyright 2019-2023 NXP
SUMMARY = "The ARM Computer Vision and Machine Learning library"
DESCRIPTION = "The ARM Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs."
LICENSE = "MIT"
Expand All @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f3c5879801d3cffc4ac2399f2b8e8ec5 \

SRC_URI = "${ARM_COMPUTELIBRARY_SRC};branch=${SRCBRANCH}"
ARM_COMPUTELIBRARY_SRC ?= "git://github.com/nxp-imx/arm-computelibrary-imx.git;protocol=https"
SRCBRANCH = "lf-5.15.71_2.2.0"
SRCREV = "a3f4331dc076f4e7d117fd6a2d4ef6c390fb383e"
SRCBRANCH = "lf-6.1.1_1.0.0"
SRCREV = "e9658b24c2dfac18961b0b098173732f39f4a31b"

S = "${WORKDIR}/git"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
DESCRIPTION = "DeepViewRT examples"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479"

DEPENDS = "deepview-rt"

SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "0057ac72f1091b072f4347a945da03f5"
SRC_URI[sha256sum] = "c24339bd9531bed6c71f3383262317ee23369302ef50084f8edce0467fcc9a5e"
SRC_URI[md5sum] = "540cb3aaa22ef96ee44a59bbedb004b9"
SRC_URI[sha256sum] = "333f145d7e742f2cbe08276e9eb5831973ff6520200353b2fe710b1255e63c01"
S = "${WORKDIR}/${BPN}-${PV}"

inherit fsl-eula-unpack pkgconfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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."
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479"

DEPENDS = "python3 python3-pip-native"

SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "c9693b096ad75852ad82f4e53062edbe"
SRC_URI[sha256sum] = "c2bf31107b288d5cac8e5a17e555f30da07a9b99b4a3547f4dbf35544210995f"
SRC_URI[md5sum] = "a4782e44df2254d30f7c6b0a45c4102e"
SRC_URI[sha256sum] = "40d6c12bbe5fc29a257a1717684ec650bd390eb1565c5bca82ec56e3ffbcf918"
S = "${WORKDIR}/${BPN}-${PV}"

inherit fsl-eula-unpack python3native
Expand All @@ -18,6 +18,7 @@ PACKAGECONFIG_OPENVX:mx8mm-nxp-bsp = ""
# The tensorflow-lite implementation for 8ULP uses CPU, and so doesn't
# support OpenVX
PACKAGECONFIG_OPENVX:mx8ulp-nxp-bsp = ""

PACKAGECONFIG[openvx] = ",,,libopenvx-imx"

do_install () {
Expand Down Expand Up @@ -53,4 +54,4 @@ INSANE_SKIP:${PN} += "dev-so dev-deps ldflags"

BBCLASSEXTEND = "nativesdk"

COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)"
28 changes: 28 additions & 0 deletions recipes-libraries/eiq-examples/eiq-examples_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
SUMMARY = "The eiq examples based on Tf-lite"
DESCRIPTION = "The eiq examples based on Tf-lite"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

SRC_URI = "${EIQ_EXAMPLES_SRC};branch=${SRCBRANCH}"
EIQ_EXAMPLES_SRC ?= "git://github.com/nxp-imx/eiq-example.git;protocol=https"
SRCBRANCH = "lf-6.1.1_1.0.0"
SRCREV = "798519ee033fb7a5aef989a793afe16f400d6479"

S = "${WORKDIR}/git"

do_install () {
# install scripts to /usr/bin
install -d ${D}${bindir}/${PN}-${PV}/
cp ${S}/download_models.py ${D}${bindir}/${PN}-${PV}/
cp -r ${S}/dms ${D}${bindir}/${PN}-${PV}/
cp -r ${S}/face_recognition ${D}${bindir}/${PN}-${PV}/
cp -r ${S}/image_classification ${D}${bindir}/${PN}-${PV}/
cp -r ${S}/object_detection ${D}${bindir}/${PN}-${PV}/
cp -r ${S}/gesture_detection ${D}${bindir}/${PN}-${PV}/
}

RDEPENDS:${PN} = "python3 python3-numpy python3-pillow python3-requests \
python3-opencv python3-pillow tensorflow-lite"

#Only support imx93 currently, will add other plantform support.
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"
Loading

0 comments on commit 320468f

Please sign in to comment.