summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMike Frysinger2010-11-18 00:55:43 +0100
committerPeter Korsgaard2010-11-24 22:02:40 +0100
commit8101c9a357d110d7b9055fc13e77f9775ea1b1e6 (patch)
tree8460d182911677b9493626d2fb15e5b1c5e770c0 /Makefile
parentzlib: don't point libdir/includedir at staging (diff)
downloadbuildroot-8101c9a357d110d7b9055fc13e77f9775ea1b1e6.tar.gz
buildroot-8101c9a357d110d7b9055fc13e77f9775ea1b1e6.tar.xz
buildroot-8101c9a357d110d7b9055fc13e77f9775ea1b1e6.zip
linux: strip installed modules
The installed kernel modules should have useless build cruft stripped out of them. On my system, a default build went from a very unreasonable 30MB to a normal 3MB (on disk) and from 14MB to 3MB when compressed due to the info stored in the kernel modules alone. [Peter: don't hardcode binutils strip specific options] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ef130de8a..cfaa316a8 100644
--- a/Makefile
+++ b/Makefile
@@ -418,6 +418,9 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
endif
find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
+ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
+ xargs -r $(STRIPCMD) -R .comment -R .note -g --strip-unneeded
+
mkdir -p $(TARGET_DIR)/etc
# Mandatory configuration file and auxilliary cache directory
# for recent versions of ldconfig