aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/imagebuilder/Makefile12
-rw-r--r--target/sdk/Makefile4
2 files changed, 12 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 > $@
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index de77d1a31a..c1eca736b0 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -76,6 +76,10 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean
$(SDK_DIRS) $(KERNEL_FILES) | \
$(TAR) -xf - -C $(SDK_BUILD_DIR)
+ (cd $(SDK_BUILD_DIR); find $(STAGING_SUBDIR_HOST)/bin $(STAGING_SUBDIR_HOST)/usr/bin \
+ $(STAGING_SUBDIR_TOOLCHAIN)/bin $(STAGING_SUBDIR_TOOLCHAIN)/*/bin $(STAGING_SUBDIR_TOOLCHAIN)/libexec \
+ -type f | $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST))
+
@-( \
find \
$(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST)/bin \