From 31511498db79201f542aa9b5d0a59edfdaf3c0e2 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 29 Nov 2010 09:11:18 +0100 Subject: [PATCH] config/functions: add function to strip kernel modules Signed-off-by: Stephan Raue --- config/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/functions b/config/functions index 949d768384..63c15fcb25 100644 --- a/config/functions +++ b/config/functions @@ -151,3 +151,8 @@ strip_linker_plugin() { # strip out usage from linker plugin LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-linker-plugin||"` } + +strip_kmod() { + [ -z $1 ] && echo "usage strip_kmod " && exit 1 + find $1 -type f -name '*.ko' | xargs -r $STRIP -R .comment -R .note -g --strip-unneeded +}