diff options
-rw-r--r-- | rules.mk | 1 | ||||
-rw-r--r-- | target/imagebuilder/Makefile | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -70,6 +70,7 @@ TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX)) BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX)) SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) BUILD_SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) +NPROC:=$(shell sysctl -n hw.ncpu 2>/dev/null || nproc) export SHELL:=/usr/bin/env bash IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 05c7cf3318..b463feb456 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -86,7 +86,7 @@ endif (cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \ $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host) STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/ - $(TAR) -cf - -C $(BUILD_DIR) $(IB_NAME) | xz -zc -7e > $@ + $(TAR) -cf - -C $(BUILD_DIR) $(IB_NAME) | xz -T$(if $(filter 1,$(NPROC)),2,0) -zc -7e > $@ download: prepare: |