wok-6.x rev 12558

linux: compress modules with xz (be kmod compatible)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 28 14:44:50 2012 +0200 (2012-04-28)
parents 4caf2c7f24c8
children b777c584c6f1
files linux/receipt linux/stuff/gztazmod.sh
line diff
     1.1 --- a/linux/receipt	Sat Apr 28 13:25:47 2012 +0200
     1.2 +++ b/linux/receipt	Sat Apr 28 14:44:50 2012 +0200
     1.3 @@ -12,7 +12,7 @@
     1.4  CONFIG_FILES="/lib/modules/$KBASEVER-slitaz/modules.dep"
     1.5  
     1.6  DEPENDS="depmod"
     1.7 -BUILD_DEPENDS="slitaz-toolchain perl git lzma patch uclibc-cross-compiler-x86_64"
     1.8 +BUILD_DEPENDS="slitaz-toolchain perl git xz lzma patch uclibc-cross-compiler-x86_64"
     1.9  [ "$KBASEVER" != "$VERSION" ] && PATCH="http://www.kernel.org/pub/linux/kernel/v3.0/patch-$VERSION.xz"
    1.10  
    1.11  # Rules to configure and make the package.
    1.12 @@ -216,7 +216,7 @@
    1.13      local path
    1.14      cp -a $_pkg/boot $fs
    1.15      # Compress all modules.
    1.16 -    #$stuff/gztazmod.sh $_pkg/lib/modules/$KBASEVER-slitaz
    1.17 +    $stuff/gztazmod.sh $_pkg/lib/modules/$KBASEVER-slitaz
    1.18      path=$fs/lib/modules/$KBASEVER-slitaz/kernel
    1.19      mkdir -p $path
    1.20      cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
     2.1 --- a/linux/stuff/gztazmod.sh	Sat Apr 28 13:25:47 2012 +0200
     2.2 +++ b/linux/stuff/gztazmod.sh	Sat Apr 28 14:44:50 2012 +0200
     2.3 @@ -40,15 +40,15 @@
     2.4  
     2.5  # Find all modules.
     2.6  echo -n "Searching all modules to compress them... "
     2.7 -find . -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null
     2.8 +find . -name "*.ko" -exec xz '{}' \; 2> /dev/null
     2.9  status
    2.10  find . -name "*.ko" -exec rm '{}' \;
    2.11  
    2.12  # Build a new temporary modules.dep.
    2.13  echo -n "Building tmp.dep... "
    2.14 -sed 's/\.ko.gz/.ko/g' modules.dep > tmp.dep
    2.15 -sed -i 's/\.ko.gz/.ko/g' tmp.dep
    2.16 -sed -i 's/\.ko/.ko.gz/g' tmp.dep
    2.17 +sed 's/\.ko.[xg]z/.ko/g' modules.dep > tmp.dep
    2.18 +sed -i 's/\.ko.[xg]z/.ko/g' tmp.dep
    2.19 +sed -i 's/\.ko/.ko.xz/g' tmp.dep
    2.20  status
    2.21  
    2.22  # Destroy original modules.dep