aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'target/imagebuilder/Makefile')
-rw-r--r--target/imagebuilder/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index b43662b6ac..8a7c2093b9 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -66,16 +66,20 @@ endif
$(PKG_BUILD_DIR)/target/linux/*/patches{,-*}
-cp $(KERNEL_BUILD_DIR)/* $(IB_KDIR)/ # don't copy subdirectories here
-cp $(LINUX_DIR)/.config $(IB_LDIR)/
- -$(SCRIPT_DIR)/bundle-libraries.sh $(IB_LDIR)/scripts/dtc \
- $(LINUX_DIR)/scripts/dtc/dtc
+ if [ -x $(LINUX_DIR)/scripts/dtc/dtc ]; then \
+ $(INSTALL_DIR) $(IB_LDIR)/scripts/dtc; \
+ $(INSTALL_BIN) $(LINUX_DIR)/scripts/dtc/dtc $(IB_LDIR)/scripts/dtc/dtc; \
+ fi
if [ -d $(LINUX_DIR)/arch/$(ARCH)/boot/dts ]; then \
$(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/* $(IB_DTSDIR); \
fi
$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk
find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \
| $(XARGS) rm -rf
- find $(STAGING_DIR_HOST)/bin -maxdepth 1 -type f -perm -u=x \
- | $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin
+ $(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
+ (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 > $@