* [meta-processor-sdk][PATCH v2] HACK: demo-glow: Fix environment setup and add install option
@ 2019-06-28 15:00 Djordje Senicic
0 siblings, 0 replies; only message in thread
From: Djordje Senicic @ 2019-06-28 15:00 UTC (permalink / raw)
To: meta-arago; +Cc: Djordje Senicic
- Add make install for demo-glow in example-applications
- Workaournd issue with dynamic library path for glow executable
Signed-off-by: Djordje Senicic <x0157990@ti.com>
---
recipes-apps/demo-glow/demo-glow.bb | 2 +-
recipes-apps/demo-glow/files/Makefile.build | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/recipes-apps/demo-glow/demo-glow.bb b/recipes-apps/demo-glow/demo-glow.bb
index c742294..21d6bdf 100644
--- a/recipes-apps/demo-glow/demo-glow.bb
+++ b/recipes-apps/demo-glow/demo-glow.bb
@@ -25,7 +25,7 @@ S = "${WORKDIR}/src"
do_compile() {
install -d ${WORKDIR}/build
- ${STAGING_DIR_NATIVE}/usr/share/glow/bin/image-classifier ${STAGING_DIR_NATIVE}/usr/share/glow/tests/images/mnist/1_1008.png -m=mnist.onnx -image-mode=0to1 -model-input-name=data_0 -emit-bundle ${WORKDIR}/build/ -cpu -target armv7l-unknown-linux-gnueabihf -network-name="lenet_mnist"
+ LD_LIBRARY_PATH=${STAGING_DIR_NATIVE}/usr/lib ${STAGING_DIR_NATIVE}/usr/share/glow/bin/image-classifier ${STAGING_DIR_NATIVE}/usr/share/glow/tests/images/mnist/1_1008.png -m=mnist.onnx -image-mode=0to1 -model-input-name=data_0 -emit-bundle ${WORKDIR}/build/ -cpu -target armv7l-unknown-linux-gnueabihf -network-name="lenet_mnist"
${CXX} ${S}/main.cpp ${WORKDIR}/build/lenet_mnist.o -lm -lpng -fpack-struct=8 -fpermissive -o ${WORKDIR}/build/infer_mnist
}
diff --git a/recipes-apps/demo-glow/files/Makefile.build b/recipes-apps/demo-glow/files/Makefile.build
index 399cc3c..044bbf9 100644
--- a/recipes-apps/demo-glow/files/Makefile.build
+++ b/recipes-apps/demo-glow/files/Makefile.build
@@ -6,7 +6,7 @@ DESTDIR ?=
all: release
lenet_mnist:
- ${SDK_PATH_NATIVE}/usr/share/glow/bin/image-classifier ${SDK_PATH_NATIVE}/usr/share/glow/tests/images/mnist/1_1008.png -m=mnist.onnx -image-mode=0to1 -model-input-name=data_0 -emit-bundle ./ -cpu -target armv7l-unknown-linux-gnueabihf -network-name="lenet_mnist"
+ LD_LIBRARY_PATH=${SDK_PATH_NATIVE}/usr/lib ${SDK_PATH_NATIVE}/usr/share/glow/bin/image-classifier ${SDK_PATH_NATIVE}/usr/share/glow/tests/images/mnist/1_1008.png -m=mnist.onnx -image-mode=0to1 -model-input-name=data_0 -emit-bundle ./ -cpu -target armv7l-unknown-linux-gnueabihf -network-name="lenet_mnist"
release: lenet_mnist
@. ${ENV_SETUP}; \
@@ -16,3 +16,17 @@ clean:
@. ${ENV_SETUP}; \
make clean
rm lenet_mnist.*
+
+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/glow/infer
+ cp -Prf --preserve=mode,timestamps makefile ${DESTDIR}/usr/share/glow/infer
+ cp -Prf --preserve=mode,timestamps main.cpp ${DESTDIR}/usr/share/glow/infer
+ cp -Prf --preserve=mode,timestamps *.weights ${DESTDIR}/usr/share//glow/infer
+ cp -Prf --preserve=mode,timestamps lenet_mnist.o ${DESTDIR}/usr/share/glow/infer
+ cp -Prf --preserve=mode,timestamps infer_mnist ${DESTDIR}/usr/share/glow/infer
+
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-28 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 15:00 [meta-processor-sdk][PATCH v2] HACK: demo-glow: Fix environment setup and add install option Djordje Senicic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.