Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux: strip installed modules
@ 2010-11-16 14:59 Mike Frysinger
  2010-11-17 20:51 ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2010-11-16 14:59 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 linux/linux.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 4a6025c..69cab9f 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -135,6 +135,8 @@ $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled
 	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then 	\
 		$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) 		\
 			INSTALL_MOD_PATH=$(TARGET_DIR) modules_install ;		\
+		find $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED) -type f -name "*o" | \
+			xargs -r $(TARGET_CROSS)strip -R .comment -R .note -g --strip-unneeded ; \
 		rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build ;	\
 		rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source ;	\
 	fi
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-24 21:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 14:59 [Buildroot] [PATCH] linux: strip installed modules Mike Frysinger
2010-11-17 20:51 ` Peter Korsgaard
2010-11-17 23:55   ` [Buildroot] [PATCH v2] " Mike Frysinger
2010-11-24 21:04     ` Peter Korsgaard
2010-11-24 21:20       ` Mike Frysinger
2010-11-24 21:36         ` Peter Korsgaard
2010-11-24 21:47           ` Mike Frysinger
2010-11-18  7:37   ` [Buildroot] [PATCH] " Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox