- Add make install for demo-glow in example-applications - Workaournd issue with dynamic library path for glow executable
Signed-off-by: Djordje Senicic <[email protected]> --- 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 _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
