Author: glen
Date: Wed Nov  9 08:42:48 2011
New Revision: 12410

Modified:
   geninitrd/trunk/geninitrd
Log:
let $STRIP be internally path to strip, add --strip=PATH/strip and --strip 
PATH/strip args

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Wed Nov  9 08:42:48 2011
@@ -18,7 +18,7 @@
 # list of geninitrd modules which need setup routine after commandline args 
parsing
 GENINITRD_MODS=""
 COMPRESS=yes
-STRIP=yes
+STRIP=strip
 target=""
 kernel=""
 force=""
@@ -48,7 +48,7 @@
        echo "Usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload 
<module>]"
        echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] 
[--nocompress]"
        echo "       [--compress=yes|xz|lzma|bzip2|gzip|lzo]"
-       echo "       [--nostrip ]"
+       echo "       [--nostrip ] [--strip PATH/strip] [--strip=PATH/strip]"
        echo "       [--initrdfs=rom|initramfs|ext2|cram] 
[--modules-conf=<modules.conf>]"
        echo "       [--with-bootsplash] [--without-bootsplash]"
        echo "       [--with-fbsplash] [--without-fbsplash]"
@@ -632,8 +632,8 @@
                inst_d "/lib/modules/$kernel/$MODULEDIR"
                cp -a "/lib/modules/$kernel/$mod" 
"$DESTDIR/lib/modules/$kernel/$mod"
                gunzip "$DESTDIR/lib/modules/$kernel/$mod" 2> /dev/null
-               if [ -x /usr/bin/strip ] && is_yes "$STRIP"; then
-                       /usr/bin/strip --strip-unneeded 
--remove-section=.comment --remove-section=.note.GNU-stack 
"$DESTDIR/lib/modules/$kernel/$mod"
+               if [ "$STRIP" ] ; then
+                       $STRIP --strip-unneeded --remove-section=.comment 
--remove-section=.note.GNU-stack "$DESTDIR/lib/modules/$kernel/$mod"
                fi
        done
 }
@@ -1023,7 +1023,14 @@
                COMPRESS=no
                ;;
        --nostrip)
-               STRIP=no
+               STRIP=
+               ;;
+       --strip=*)
+               STRIP="${1#--strip=}"
+               ;;
+       --strip)
+               STRIP=$2
+               shift
                ;;
        --ifneeded)
                ifneeded=1
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to