summaryrefslogtreecommitdiffstats
path: root/target/imagebuilder
diff options
context:
space:
mode:
authora-gave <agave@dracaena.it>2024-01-11 11:33:21 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2024-01-15 16:49:12 +0100
commit84ec8c41e7acc0bfc320d8562330ea14c704f93c (patch)
tree913916aca3abe942ea648cccfaf3768218df98d3 /target/imagebuilder
parent0b23d3608c1f01f9dc4d042b0217ee0291c0fd70 (diff)
downloadopenwrt-84ec8c41e7acc0bfc320d8562330ea14c704f93c.tar.gz
openwrt-84ec8c41e7acc0bfc320d8562330ea14c704f93c.tar.bz2
openwrt-84ec8c41e7acc0bfc320d8562330ea14c704f93c.zip
imagebuilder: copy from buildroot only target/linux/generic and target/linux/<target> to reduce the size
This reduces the size of a single imagebuilder by about 40MB In example for the target ath79 it would be the sum of generic and <target> directories, so about 16MB, instead of the whole size of the target directory, about 53MB: 11M target/linux/generic/ 3.9M target/linux/ath79/ Signed-off-by: a-gave <agave@dracaena.it>
Diffstat (limited to 'target/imagebuilder')
-rw-r--r--target/imagebuilder/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 3bbadc7204..c3b6c9c10c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -27,7 +27,7 @@ all: compile
$(BIN_DIR)/$(IB_NAME).tar.xz: clean
rm -rf $(PKG_BUILD_DIR)
mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
- $(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
+ $(PKG_BUILD_DIR)/target/linux $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
$(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
$(SED) 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
@@ -78,7 +78,9 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
endif
- $(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
+ $(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux
+ $(CP) -L $(TOPDIR)/target/linux/generic $(PKG_BUILD_DIR)/target/linux
+ $(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux
if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
fi