Show how to build a neo-ai-dlr application by extracting this demo out of the neo-ai-dlr sources.
Signed-off-by: Jacob Stiffler <j-stiff...@ti.com> --- .../neo-ai-dlr/neo-ai-dlr-demo/Makefile.build | 24 +++++++++++++ .../neo-ai-dlr/neo-ai-dlr-demo/makefile | 11 ++++++ recipes-support/neo-ai-dlr/neo-ai-dlr-demo_git.bb | 42 ++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 recipes-support/neo-ai-dlr/neo-ai-dlr-demo/Makefile.build create mode 100644 recipes-support/neo-ai-dlr/neo-ai-dlr-demo/makefile create mode 100644 recipes-support/neo-ai-dlr/neo-ai-dlr-demo_git.bb diff --git a/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/Makefile.build b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/Makefile.build new file mode 100644 index 0000000..1a9c19e --- /dev/null +++ b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/Makefile.build @@ -0,0 +1,24 @@ +-include ../../Rules.make + +ENV_SETUP ?= ../../linux-devkit/environment-setup +DESTDIR ?= + +all: release + +release: + @. ${ENV_SETUP}; \ + make + +clean: + @. ${ENV_SETUP}; \ + make clean + +install: + @if [ ! -d $(DESTDIR) ] ; then \ + echo "The extracted target filesystem directory doesn't exist."; \ + echo "Please run setup.sh in the SDK's root directory and then try again."; \ + exit 1; \ + fi + @install -d ${DESTDIR}/usr/share/dlr/demos + @cp -Prf ${DESTDIR}/usr/share/dlr/demos/run_mobilenet_cv_mt ${DESTDIR}/usr/share/dlr/demos/run_mobilenet_cv_mt.dyn + @echo "Dynamically linked run_mobilenet_cv_mt.dyn installed." diff --git a/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/makefile b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/makefile new file mode 100644 index 0000000..84461b3 --- /dev/null +++ b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo/makefile @@ -0,0 +1,11 @@ +PHONY: all +CXXFLAGS =-funroll-loops -O3 -DNDEBUG +all: neo-ai-dlr-demo +LIBS = -ldlr -lpthread -lopencv_highgui -lopencv_imgcodecs -lopencv_videoio -lopencv_imgproc -lopencv_core -lrt -ldl + +neo-ai-dlr-demo: run_mobilenet_cv_mt.cc + $(CXX) $(CXXFLAGS) run_mobilenet_cv_mt.cc -o run_mobilenet_cv_mt.dyn $(LIBS) + +clean: + rm -rf run_mobilenet_cv_mt.dyn + diff --git a/recipes-support/neo-ai-dlr/neo-ai-dlr-demo_git.bb b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo_git.bb new file mode 100644 index 0000000..4cccf0e --- /dev/null +++ b/recipes-support/neo-ai-dlr/neo-ai-dlr-demo_git.bb @@ -0,0 +1,42 @@ +SUMMARY = "Predictive maintenance demo for anomaly detection using Recurrent Neural Network (RNN)" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://../git/LICENSE;md5=34400b68072d710fecd0a2940a0d1658" + +PV = "1.0" +PR = "r1" + +BRANCH-NEO-AI-DLR = "dev" +SRC_URI = "git://github.com/TexasInstruments/neo-ai-dlr;protocol=https;branch=${BRANCH-NEO-AI-DLR};name=neo-ai-dlr \ + file://makefile;subdir=demosrc \ + file://Makefile.build;subdir=demosrc \ + " + +SRCREV_neo-ai-dlr = "40394be2e39eaa6248f9bf0a1143692083c0e3d2" + +S = "${WORKDIR}/demosrc" + +DEPENDS += " opencv neo-ai-dlr " + +do_patch_extra() { + install -m 644 ${WORKDIR}/git/demo/cv/run_mobilenet_cv_mt.cc ${S}/. + install -m 644 ${WORKDIR}/git/LICENSE ${S}/. +} +addtask patch_extra after do_patch before do_create_srcipk + +do_compile() { + cd ${S} + make +} + +do_install() { + install -d ${D}${datadir}/dlr/demos + install -m 644 ${S}/run_mobilenet_cv_mt.cc ${D}${datadir}/dlr/demos/. + install -m 644 ${S}/makefile ${D}${datadir}/dlr/demos/. + install -m 644 ${S}/Makefile.build ${D}${datadir}/dlr/demos/. + install -m 755 ${S}/run_mobilenet_cv_mt.dyn ${D}${datadir}/dlr/demos/. +} + +CREATE_SRCIPK = "1" +SRCIPK_INSTALL_DIR = "example-applications/${PN}-${PV}" + +FILES_${PN} += " ${datadir}/dlr/demos " -- 2.7.4 _______________________________________________ meta-arago mailing list meta-arago@arago-project.org http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago