From 93e988bc0db321780c25b1f388fd7892d419df97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 22 Mar 2018 14:12:24 +0900 Subject: [PATCH] Separate ACL build target (#142) * Separate ACL build target This will separate ACL build to a target in the Makefile - ACL mostly will be reused after a single build - Only dependency check in scons takses several seconds - This will speed up for arm cross build * use lib --- Makefile | 21 +++++++++------------ README.md | 8 ++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f0676b9..189ea05 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,6 @@ ifneq (,$(findstring arm,$(TARGET_ARCH_BASE))) ROOTFS_ARM=$(ROOTFS_DIR) export ROOTFS_ARM endif - ifeq ($(HOST_OS),linux) - BUILD_ACL=1 - endif endif # Todo: we may set CROSS_BUILD=1 when ROOTFS_DIR is given # the toolchain file, only for cross build @@ -70,6 +67,8 @@ install: $(TIMESTAMP_INSTALL) clean: rm -rf $(WORKDIR) +acl: internal_acl + ### ### Command (internal) ### @@ -83,26 +82,24 @@ configure_internal: touch $(TIMESTAMP_CONFIGURE) build_internal: $(BUILD_ROOT) -ifeq ($(BUILD_ACL),1) - cd $(ACL_FOLDER) && $(ACL_COMMAND) -endif cd $(BUILD_ROOT) && make -j $(NPROCS) all rm -rf $(BUILD_ALIAS) ln -s $(BUILD_FOLDER) $(BUILD_ALIAS) touch $(TIMESTAMP_BUILD) install_internal: -ifeq ($(BUILD_ACL),1) - @mkdir -vp $(INSTALL_PATH)/bin - @cp -v $(ACL_FOLDER)/build/libarm_compute_core.so $(INSTALL_PATH)/bin/. - @cp -v $(ACL_FOLDER)/build/libarm_compute_graph.so $(INSTALL_PATH)/bin/. - @cp -v $(ACL_FOLDER)/build/libarm_compute.so $(INSTALL_PATH)/bin/. -endif cd $(BUILD_ROOT) && make install rm -rf $(INSTALL_ALIAS) ln -s $(INSTALL_FOLDER) $(INSTALL_ALIAS) touch $(TIMESTAMP_INSTALL) +internal_acl: + cd $(ACL_FOLDER) && $(ACL_COMMAND) + @mkdir -vp $(INSTALL_PATH)/lib + @cp -v $(ACL_FOLDER)/build/libarm_compute_core.so $(INSTALL_PATH)/lib/. + @cp -v $(ACL_FOLDER)/build/libarm_compute_graph.so $(INSTALL_PATH)/lib/. + @cp -v $(ACL_FOLDER)/build/libarm_compute.so $(INSTALL_PATH)/lib/. + ### ### Timestamps ### diff --git a/README.md b/README.md index c788ebd..a08cf31 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,14 @@ sudo ./tools/cross/build_rootfs.sh arm --skipproxy ## Cross build for ARM +Build and install ARM Compute Library +``` +TARGET_ARCH=armv7l make acl +``` +Mostly you only need once of ACL build. This will build and install to +`Product/(target_arch-os)/out/bin` folder. +- this is required for ARM on Ubuntu + Give `TARGET_ARCH` variable to set the target architecture ``` CROSS_BUILD=1 TARGET_ARCH=armv7l make -- 2.7.4