wok-next rev 9257
Add: linux-libre 2.6.37-libre (part 1)
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lguest-libre/receipt Tue Mar 15 03:23:44 2011 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="lguest-libre" 1.7 +VERSION="2.6.37-libre" 1.8 +CATEGORY="base-system" 1.9 +SHORT_DESC="The Linux Libre kernel paravirtualization tool." 1.10 +MAINTAINER="gokhlayeh@slitaz.org" 1.11 +PROVIDE="lguest" 1.12 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 1.13 +WANTED="linux-libre" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/sbin 1.19 + cp $src/Documentation/lguest/lguest $fs/usr/sbin 1.20 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/linux-libre-acpi/receipt Tue Mar 15 03:23:44 2011 +0100 2.3 @@ -0,0 +1,50 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="linux-libre-acpi" 2.7 +VERSION="2.6.37-libre" 2.8 +CATEGORY="base-system" 2.9 +SHORT_DESC="The Linux Libre kernel acpi modules." 2.10 +DEPENDS="linux-libre" 2.11 +MAINTAINER="gokhlayeh@slitaz.org" 2.12 +PROVIDE="linux-acpi" 2.13 +WANTED="linux-libre" 2.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 2.15 + 2.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.17 +genpkg_rules() 2.18 +{ 2.19 + local path 2.20 + path=lib/modules/$VERSION-slitaz/kernel 2.21 + mkdir -p $fs/$path 2.22 + export src 2.23 + export _pkg 2.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/acpi drivers/platform/x86/thinkpad_acpi.ko.gz \ 2.25 + drivers/platform/x86/asus-laptop.ko.gz drivers/platform/x86/eeepc-wmi.ko.gz \ 2.26 + drivers/platform/x86/msi-laptop.ko.gz drivers/platform/x86/panasonic-laptop.ko.gz \ 2.27 + drivers/platform/x86/sony-laptop.ko.gz drivers/platform/x86/acer-wmi.ko.gz \ 2.28 + drivers/platform/x86/hp-wmi.ko.gz drivers/platform/x86/wmi.ko.gz \ 2.29 + drivers/platform/x86/classmate-laptop.ko.gz drivers/platform/x86/topstar-laptop.ko.gz | \ 2.30 + while read module; do 2.31 + dir=$path/$(dirname $module) 2.32 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 2.33 + cp -a $_pkg/$path/$module $fs/$dir 2.34 + done 2.35 + 2.36 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 2.37 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 2.38 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 2.39 + fi 2.40 + done 2.41 +} 2.42 + 2.43 +# Post install/remove commands for Tazpkg. 2.44 +post_install() 2.45 +{ 2.46 + chroot "$1/" depmod -a $VERSION-slitaz 2.47 +} 2.48 + 2.49 +post_remove() 2.50 +{ 2.51 + chroot "$1/" depmod -a $VERSION-slitaz 2.52 +} 2.53 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/linux-libre-agp/receipt Tue Mar 15 03:23:44 2011 +0100 3.3 @@ -0,0 +1,44 @@ 3.4 +# SliTaz package receipt. 3.5 + 3.6 +PACKAGE="linux-libre-agp" 3.7 +VERSION="2.6.37-libre" 3.8 +CATEGORY="base-system" 3.9 +SHORT_DESC="The Linux Libre kernel AGP modules." 3.10 +MAINTAINER="gokhlayeh@slitaz.org" 3.11 +PROVIDE="linux-agp" 3.12 +DEPENDS="linux-libre" 3.13 +WANTED="linux-libre" 3.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 3.15 + 3.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 3.17 +genpkg_rules() 3.18 +{ 3.19 + local path 3.20 + path=lib/modules/$VERSION-slitaz/kernel 3.21 + mkdir -p $fs/$path 3.22 + export src 3.23 + export _pkg 3.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/char/agp | while read module; do 3.25 + dir=$path/$(dirname $module) 3.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 3.27 + cp -a $_pkg/$path/$module $fs/$dir 3.28 + done 3.29 + 3.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 3.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 3.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 3.33 + fi 3.34 + done 3.35 +} 3.36 + 3.37 +# Post install/remove commands for Tazpkg. 3.38 +post_install() 3.39 +{ 3.40 + chroot "$1/" depmod -a $VERSION-slitaz 3.41 +} 3.42 + 3.43 +post_remove() 3.44 +{ 3.45 + chroot "$1/" depmod -a $VERSION-slitaz 3.46 +} 3.47 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/linux-libre-api-headers/receipt Tue Mar 15 03:23:44 2011 +0100 4.3 @@ -0,0 +1,49 @@ 4.4 +# SliTaz package receipt. 4.5 + 4.6 +PACKAGE="linux-libre-api-headers" 4.7 +VERSION="2.6.37-libre" 4.8 +CATEGORY="development" 4.9 +SHORT_DESC="Kernel headers sanitized for use in userspace." 4.10 +MAINTAINER="gokhlayeh@slitaz.org" 4.11 +PROVIDE="linux-api-headers" 4.12 +SOURCE="linux-libre" 4.13 +TARBALL="linux-$VERSION.tar.bz2" 4.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 4.15 +WGET_URL="http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/$VERSION/$TARBALL" 4.16 + 4.17 +# Rules to compile & install the temporary toolchain. 4.18 +cook_tmp_toolchain() 4.19 +{ 4.20 + cd $src 4.21 + 4.22 + make mrproper && 4.23 + make headers_check && 4.24 + make INSTALL_HDR_PATH=dest headers_install && 4.25 + cp -r dest/include/* /tools/include 4.26 +} 4.27 + 4.28 +# Rules to configure and make the package. 4.29 +compile_rules() 4.30 +{ 4.31 + cd $src 4.32 + 4.33 + make mrproper && 4.34 + make headers_check && 4.35 + make INSTALL_HDR_PATH=$DESTDIR/usr headers_install 4.36 +} 4.37 + 4.38 +# Rules to gen a SliTaz package suitable for Tazpkg. 4.39 +genpkg_rules() 4.40 +{ 4.41 + mkdir -p $fs/usr 4.42 + cp -a $_pkg/usr/include $fs/usr 4.43 + 4.44 + rm -f $(find ${fs} -name .install -or -name ..install.cmd) 4.45 +} 4.46 + 4.47 +# Post install commands for Tazpkg. 4.48 +post_install() 4.49 +{ 4.50 + # Removed old linux-libre-headers 4.51 + rm -rf $1/var/lib/tazpkg/installed/linux-libre-headers 2>/dev/null 4.52 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/linux-libre-appletalk/receipt Tue Mar 15 03:23:44 2011 +0100 5.3 @@ -0,0 +1,47 @@ 5.4 +# SliTaz package receipt. 5.5 + 5.6 +PACKAGE="linux-libre-appletalk" 5.7 +VERSION="2.6.37-libre" 5.8 +CATEGORY="base-system" 5.9 +SHORT_DESC="The Linux Libre kernel appletalk modules." 5.10 +MAINTAINER="gokhlayeh@slitaz.org" 5.11 +PROVIDE="linux-appletalk" 5.12 +DEPENDS="linux-libre" 5.13 +WANTED="linux-libre" 5.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 5.15 + 5.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 5.17 +genpkg_rules() 5.18 +{ 5.19 + local path 5.20 + path=lib/modules/$VERSION-slitaz/kernel 5.21 + mkdir -p $fs/$path 5.22 + 5.23 + export src 5.24 + export _pkg 5.25 + 5.26 + $WOK/$WANTED/stuff/list_modules.sh drivers/net/appletalk net/appletalk \ 5.27 + net/802/p8022.ko.gz | while read module; do 5.28 + dir=$path/$(dirname $module) 5.29 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 5.30 + cp -a $_pkg/$path/$module $fs/$dir 5.31 + done 5.32 + 5.33 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 5.34 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 5.35 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 5.36 + fi 5.37 + done 5.38 +} 5.39 + 5.40 +# Post install/remove commands for Tazpkg. 5.41 +post_install() 5.42 +{ 5.43 + chroot "$1/" depmod -a $VERSION-slitaz 5.44 +} 5.45 + 5.46 +post_remove() 5.47 +{ 5.48 + chroot "$1/" depmod -a $VERSION-slitaz 5.49 +} 5.50 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/linux-libre-autofs/receipt Tue Mar 15 03:23:44 2011 +0100 6.3 @@ -0,0 +1,43 @@ 6.4 +# SliTaz package receipt. 6.5 + 6.6 +PACKAGE="linux-libre-autofs" 6.7 +VERSION="2.6.37-libre" 6.8 +CATEGORY="base-system" 6.9 +SHORT_DESC="The Linux Libre kernel automounter module." 6.10 +MAINTAINER="gokhlayeh@slitaz.org" 6.11 +PROVIDE="linux-autofs" 6.12 +DEPENDS="linux-libre" 6.13 +WANTED="linux-libre" 6.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 6.15 +CONFIG_FILES="/etc/filesystems" 6.16 + 6.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 6.18 +genpkg_rules() 6.19 +{ 6.20 + local path 6.21 + path=lib/modules/$VERSION-slitaz/kernel 6.22 + mkdir -p $fs/$path $fs/etc 6.23 + export src 6.24 + export _pkg 6.25 + $WOK/$WANTED/stuff/list_modules.sh fs/autofs4 | while read module; do 6.26 + dir=$path/$(dirname $module) 6.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 6.28 + cp -a $_pkg/$path/$module $fs/$dir 6.29 + done 6.30 + touch $fs/etc/filesystems 6.31 +} 6.32 + 6.33 +# Post install/remove commands for Tazpkg. 6.34 +post_install() 6.35 +{ 6.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 6.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 6.38 + chroot "$1/" depmod -a $VERSION-slitaz 6.39 +} 6.40 + 6.41 +post_remove() 6.42 +{ 6.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 6.44 + chroot "$1/" depmod -a $VERSION-slitaz 6.45 +} 6.46 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/linux-libre-bluetooth/receipt Tue Mar 15 03:23:44 2011 +0100 7.3 @@ -0,0 +1,44 @@ 7.4 +# SliTaz package receipt. 7.5 + 7.6 +PACKAGE="linux-libre-bluetooth" 7.7 +VERSION="2.6.37-libre" 7.8 +CATEGORY="base-system" 7.9 +SHORT_DESC="The Linux Libre kernel bluetooth modules." 7.10 +MAINTAINER="gokhlayeh@slitaz.org" 7.11 +PROVIDE="linux-bluetooth" 7.12 +DEPENDS="linux-libre" 7.13 +WANTED="linux-libre" 7.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 7.15 + 7.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 7.17 +genpkg_rules() 7.18 +{ 7.19 + local path 7.20 + path=lib/modules/$VERSION-slitaz/kernel 7.21 + mkdir -p $fs/$path 7.22 + export src 7.23 + export _pkg 7.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/bluetooth net/bluetooth | while read module; do 7.25 + dir=$path/$(dirname $module) 7.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 7.27 + cp -a $_pkg/$path/$module $fs/$dir 7.28 + done 7.29 + 7.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 7.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 7.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 7.33 + fi 7.34 + done 7.35 +} 7.36 + 7.37 +# Post install/remove commands for Tazpkg. 7.38 +post_install() 7.39 +{ 7.40 + chroot "$1/" depmod -a $VERSION-slitaz 7.41 +} 7.42 + 7.43 +post_remove() 7.44 +{ 7.45 + chroot "$1/" depmod -a $VERSION-slitaz 7.46 +} 7.47 +
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/linux-libre-bridge/receipt Tue Mar 15 03:23:44 2011 +0100 8.3 @@ -0,0 +1,44 @@ 8.4 +# SliTaz package receipt. 8.5 + 8.6 +PACKAGE="linux-libre-bridge" 8.7 +VERSION="2.6.37-libre" 8.8 +CATEGORY="base-system" 8.9 +SHORT_DESC="The Linux Libre kernel bridge modules." 8.10 +MAINTAINER="gokhlayeh@slitaz.org" 8.11 +PROVIDE="linux-bridge" 8.12 +DEPENDS="linux-libre" 8.13 +WANTED="linux-libre" 8.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 8.15 + 8.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 8.17 +genpkg_rules() 8.18 +{ 8.19 + local path 8.20 + path=lib/modules/$VERSION-slitaz/kernel 8.21 + mkdir -p $fs/$path 8.22 + export src 8.23 + export _pkg 8.24 + $WOK/$WANTED/stuff/list_modules.sh net/bridge | while read module; do 8.25 + dir=$path/$(dirname $module) 8.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 8.27 + cp -a $_pkg/$path/$module $fs/$dir 8.28 + done 8.29 + 8.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 8.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 8.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 8.33 + fi 8.34 + done 8.35 +} 8.36 + 8.37 +# Post install/remove commands for Tazpkg. 8.38 +post_install() 8.39 +{ 8.40 + chroot "$1/" depmod -a $VERSION-slitaz 8.41 +} 8.42 + 8.43 +post_remove() 8.44 +{ 8.45 + chroot "$1/" depmod -a $VERSION-slitaz 8.46 +} 8.47 +
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/linux-libre-btrfs/receipt Tue Mar 15 03:23:44 2011 +0100 9.3 @@ -0,0 +1,49 @@ 9.4 +# SliTaz package receipt. 9.5 + 9.6 +PACKAGE="linux-libre-btrfs" 9.7 +VERSION="2.6.37-libre" 9.8 +CATEGORY="base-system" 9.9 +SHORT_DESC="The Linux Libre kernel btrfs module." 9.10 +MAINTAINER="gokhlayeh@slitaz.org" 9.11 +PROVIDE="linux-btrfs" 9.12 +DEPENDS="linux-libre" 9.13 +WANTED="linux-libre" 9.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 9.15 +CONFIG_FILES="/etc/filesystems" 9.16 + 9.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 9.18 +genpkg_rules() 9.19 +{ 9.20 + local path 9.21 + path=lib/modules/$VERSION-slitaz/kernel 9.22 + mkdir -p $fs/$path $fs/etc 9.23 + export src 9.24 + export _pkg 9.25 + $WOK/$WANTED/stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do 9.26 + dir=$path/$(dirname $module) 9.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 9.28 + cp -a $_pkg/$path/$module $fs/$dir 9.29 + done 9.30 + touch $fs/etc/filesystems 9.31 + 9.32 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 9.33 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 9.34 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 9.35 + fi 9.36 + done 9.37 +} 9.38 + 9.39 +# Post install/remove commands for Tazpkg. 9.40 +post_install() 9.41 +{ 9.42 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 9.43 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 9.44 + chroot "$1/" depmod -a $VERSION-slitaz 9.45 +} 9.46 + 9.47 +post_remove() 9.48 +{ 9.49 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 9.50 + chroot "$1/" depmod -a $VERSION-slitaz 9.51 +} 9.52 +
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/linux-libre-cifs/receipt Tue Mar 15 03:23:44 2011 +0100 10.3 @@ -0,0 +1,43 @@ 10.4 +# SliTaz package receipt. 10.5 + 10.6 +PACKAGE="linux-libre-cifs" 10.7 +VERSION="2.6.37-libre" 10.8 +CATEGORY="base-system" 10.9 +SHORT_DESC="The Linux Libre kernel cifs module." 10.10 +MAINTAINER="gokhlayeh@slitaz.org" 10.11 +PROVIDE="linux-cifs" 10.12 +DEPENDS="linux-libre" 10.13 +WANTED="linux-libre" 10.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 10.15 +CONFIG_FILES="/etc/filesystems" 10.16 + 10.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 10.18 +genpkg_rules() 10.19 +{ 10.20 + local path 10.21 + path=lib/modules/$VERSION-slitaz/kernel 10.22 + mkdir -p $fs/$path $fs/etc 10.23 + export src 10.24 + export _pkg 10.25 + $WOK/$WANTED/stuff/list_modules.sh fs/cifs | while read module; do 10.26 + dir=$path/$(dirname $module) 10.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 10.28 + cp -a $_pkg/$path/$module $fs/$dir 10.29 + done 10.30 + touch $fs/etc/filesystems 10.31 +} 10.32 + 10.33 +# Post install/remove commands for Tazpkg. 10.34 +post_install() 10.35 +{ 10.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 10.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 10.38 + chroot "$1/" depmod -a $VERSION-slitaz 10.39 +} 10.40 + 10.41 +post_remove() 10.42 +{ 10.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 10.44 + chroot "$1/" depmod -a $VERSION-slitaz 10.45 +} 10.46 +
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/linux-libre-coda/receipt Tue Mar 15 03:23:44 2011 +0100 11.3 @@ -0,0 +1,43 @@ 11.4 +# SliTaz package receipt. 11.5 + 11.6 +PACKAGE="linux-libre-coda" 11.7 +VERSION="2.6.37-libre" 11.8 +CATEGORY="base-system" 11.9 +SHORT_DESC="The Linux Libre kernel coda module." 11.10 +MAINTAINER="gokhlayeh@slitaz.org" 11.11 +PROVIDE="linux-coda" 11.12 +DEPENDS="linux-libre" 11.13 +WANTED="linux-libre" 11.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 11.15 +CONFIG_FILES="/etc/filesystems" 11.16 + 11.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 11.18 +genpkg_rules() 11.19 +{ 11.20 + local path 11.21 + path=lib/modules/$VERSION-slitaz/kernel 11.22 + mkdir -p $fs/$path $fs/etc 11.23 + export src 11.24 + export _pkg 11.25 + $WOK/$WANTED/stuff/list_modules.sh fs/coda | while read module; do 11.26 + dir=$path/$(dirname $module) 11.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 11.28 + cp -a $_pkg/$path/$module $fs/$dir 11.29 + done 11.30 + touch $fs/etc/filesystems 11.31 +} 11.32 + 11.33 +# Post install/remove commands for Tazpkg. 11.34 +post_install() 11.35 +{ 11.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 11.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 11.38 + chroot "$1/" depmod -a $VERSION-slitaz 11.39 +} 11.40 + 11.41 +post_remove() 11.42 +{ 11.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 11.44 + chroot "$1/" depmod -a $VERSION-slitaz 11.45 +} 11.46 +
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/linux-libre-configfs/receipt Tue Mar 15 03:23:44 2011 +0100 12.3 @@ -0,0 +1,43 @@ 12.4 +# SliTaz package receipt. 12.5 + 12.6 +PACKAGE="linux-libre-configfs" 12.7 +VERSION="2.6.37-libre" 12.8 +CATEGORY="base-system" 12.9 +SHORT_DESC="The Linux Libre kernel configfs module." 12.10 +MAINTAINER="gokhlayeh@slitaz.org" 12.11 +PROVIDE="linux-configfs" 12.12 +DEPENDS="linux-libre" 12.13 +WANTED="linux-libre" 12.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 12.15 +CONFIG_FILES="/etc/filesystems" 12.16 + 12.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 12.18 +genpkg_rules() 12.19 +{ 12.20 + local path 12.21 + path=lib/modules/$VERSION-slitaz/kernel 12.22 + mkdir -p $fs/$path $fs/etc 12.23 + export src 12.24 + export _pkg 12.25 + $WOK/$WANTED/stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do 12.26 + dir=$path/$(dirname $module) 12.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 12.28 + cp -a $_pkg/$path/$module $fs/$dir 12.29 + done 12.30 + touch $fs/etc/filesystems 12.31 +} 12.32 + 12.33 +# Post install/remove commands for Tazpkg. 12.34 +post_install() 12.35 +{ 12.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 12.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 12.38 + chroot "$1/" depmod -a $VERSION-slitaz 12.39 +} 12.40 + 12.41 +post_remove() 12.42 +{ 12.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 12.44 + chroot "$1/" depmod -a $VERSION-slitaz 12.45 +} 12.46 +
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/linux-libre-cpufreq/receipt Tue Mar 15 03:23:44 2011 +0100 13.3 @@ -0,0 +1,39 @@ 13.4 +# SliTaz package receipt. 13.5 + 13.6 +PACKAGE="linux-libre-cpufreq" 13.7 +VERSION="2.6.37-libre" 13.8 +CATEGORY="base-system" 13.9 +SHORT_DESC="The Linux Libre kernel cpufreq modules." 13.10 +MAINTAINER="gokhlayeh@slitaz.org" 13.11 +PROVIDE="linux-cpufreq" 13.12 +DEPENDS="linux-libre" 13.13 +WANTED="linux-libre" 13.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 13.15 + 13.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 13.17 +genpkg_rules() 13.18 +{ 13.19 + local path 13.20 + path=lib/modules/$VERSION-slitaz/kernel 13.21 + mkdir -p $fs/$path 13.22 + export src 13.23 + export _pkg 13.24 + $WOK/$WANTED/stuff/list_modules.sh arch/x86/kernel/cpu/cpufreq drivers/cpufreq | \ 13.25 + while read module; do 13.26 + dir=$path/$(dirname $module) 13.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 13.28 + cp -a $_pkg/$path/$module $fs/$dir 13.29 + done 13.30 +} 13.31 + 13.32 +# Post install/remove commands for Tazpkg. 13.33 +post_install() 13.34 +{ 13.35 + chroot "$1/" depmod -a $VERSION-slitaz 13.36 +} 13.37 + 13.38 +post_remove() 13.39 +{ 13.40 + chroot "$1/" depmod -a $VERSION-slitaz 13.41 +} 13.42 +
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/linux-libre-cramfs/receipt Tue Mar 15 03:23:44 2011 +0100 14.3 @@ -0,0 +1,43 @@ 14.4 +# SliTaz package receipt. 14.5 + 14.6 +PACKAGE="linux-libre-cramfs" 14.7 +VERSION="2.6.37-libre" 14.8 +CATEGORY="base-system" 14.9 +SHORT_DESC="The Linux Libre kernel cramfs module." 14.10 +MAINTAINER="gokhlayeh@slitaz.org" 14.11 +PROVIDE="linux-cramfs" 14.12 +DEPENDS="linux-libre" 14.13 +WANTED="linux-libre" 14.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 14.15 +CONFIG_FILES="/etc/filesystems" 14.16 + 14.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 14.18 +genpkg_rules() 14.19 +{ 14.20 + local path 14.21 + path=lib/modules/$VERSION-slitaz/kernel 14.22 + mkdir -p $fs/$path $fs/etc 14.23 + export src 14.24 + export _pkg 14.25 + $WOK/$WANTED/stuff/list_modules.sh fs/cramfs | while read module; do 14.26 + dir=$path/$(dirname $module) 14.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 14.28 + cp -a $_pkg/$path/$module $fs/$dir 14.29 + done 14.30 + touch $fs/etc/filesystems 14.31 +} 14.32 + 14.33 +# Post install/remove commands for Tazpkg. 14.34 +post_install() 14.35 +{ 14.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 14.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 14.38 + chroot "$1/" depmod -a $VERSION-slitaz 14.39 +} 14.40 + 14.41 +post_remove() 14.42 +{ 14.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 14.44 + chroot "$1/" depmod -a $VERSION-slitaz 14.45 +} 14.46 +
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/linux-libre-crypto/receipt Tue Mar 15 03:23:44 2011 +0100 15.3 @@ -0,0 +1,45 @@ 15.4 +# SliTaz package receipt. 15.5 + 15.6 +PACKAGE="linux-libre-crypto" 15.7 +VERSION="2.6.37-libre" 15.8 +CATEGORY="base-system" 15.9 +SHORT_DESC="The Linux Libre kernel crypto modules." 15.10 +MAINTAINER="gokhlayeh@slitaz.org" 15.11 +PROVIDE="linux-crypto" 15.12 +DEPENDS="linux-libre" 15.13 +WANTED="linux-libre" 15.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 15.15 + 15.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 15.17 +genpkg_rules() 15.18 +{ 15.19 + local path 15.20 + path=lib/modules/$VERSION-slitaz/kernel 15.21 + mkdir -p $fs/$path 15.22 + export src 15.23 + export _pkg 15.24 + $WOK/$WANTED/stuff/list_modules.sh arch/x86/crypto crypto drivers/crypto | \ 15.25 + while read module; do 15.26 + dir=$path/$(dirname $module) 15.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 15.28 + cp -a $_pkg/$path/$module $fs/$dir 15.29 + done 15.30 + 15.31 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 15.32 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 15.33 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 15.34 + fi 15.35 + done 15.36 +} 15.37 + 15.38 +# Post install/remove commands for Tazpkg. 15.39 +post_install() 15.40 +{ 15.41 + chroot "$1/" depmod -a $VERSION-slitaz 15.42 +} 15.43 + 15.44 +post_remove() 15.45 +{ 15.46 + chroot "$1/" depmod -a $VERSION-slitaz 15.47 +} 15.48 +
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/linux-libre-cryptoloop/receipt Tue Mar 15 03:23:44 2011 +0100 16.3 @@ -0,0 +1,39 @@ 16.4 +# SliTaz package receipt. 16.5 + 16.6 +PACKAGE="linux-libre-cryptoloop" 16.7 +VERSION="2.6.37-libre" 16.8 +CATEGORY="base-system" 16.9 +SHORT_DESC="The Linux Libre kernel cryptoloop modules." 16.10 +MAINTAINER="gokhlayeh@slitaz.org" 16.11 +PROVIDE="linux-cryptoloop" 16.12 +DEPENDS="linux-libre-crypto" 16.13 +WANTED="linux-libre" 16.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 16.15 + 16.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 16.17 +genpkg_rules() 16.18 +{ 16.19 + local path 16.20 + path=lib/modules/$VERSION-slitaz/kernel 16.21 + mkdir -p $fs/$path 16.22 + export src 16.23 + export _pkg 16.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/block/cryptoloop.ko.gz | \ 16.25 + while read module; do 16.26 + dir=$path/$(dirname $module) 16.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 16.28 + cp -a $_pkg/$path/$module $fs/$dir 16.29 + done 16.30 +} 16.31 + 16.32 +# Post install/remove commands for Tazpkg. 16.33 +post_install() 16.34 +{ 16.35 + chroot "$1/" depmod -a $VERSION-slitaz 16.36 +} 16.37 + 16.38 +post_remove() 16.39 +{ 16.40 + chroot "$1/" depmod -a $VERSION-slitaz 16.41 +} 16.42 +
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17.2 +++ b/linux-libre-dialup/receipt Tue Mar 15 03:23:44 2011 +0100 17.3 @@ -0,0 +1,46 @@ 17.4 +# SliTaz package receipt. 17.5 + 17.6 +PACKAGE="linux-libre-dialup" 17.7 +VERSION="2.6.37-libre" 17.8 +CATEGORY="base-system" 17.9 +SHORT_DESC="The Linux Libre kernel dial-up modules." 17.10 +MAINTAINER="gokhlayeh@slitaz.org" 17.11 +PROVIDE="linux-dialup" 17.12 +DEPENDS="linux-libre" 17.13 +WANTED="linux-libre" 17.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 17.15 + 17.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 17.17 +genpkg_rules() 17.18 +{ 17.19 + local path 17.20 + path=lib/modules/$VERSION-slitaz/kernel 17.21 + mkdir -p $fs/$path 17.22 + export src 17.23 + export _pkg 17.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/serial/serial_cs.ko.gz drivers/char/nozomi.ko.gz \ 17.25 + drivers/usb/serial/option.ko.gz drivers/net/usb/hso.ko.gz | \ 17.26 + while read module; do 17.27 + dir=$path/$(dirname $module) 17.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 17.29 + cp -a $_pkg/$path/$module $fs/$dir 17.30 + done 17.31 + 17.32 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 17.33 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 17.34 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 17.35 + fi 17.36 + done 17.37 +} 17.38 + 17.39 +# Post install/remove commands for Tazpkg. 17.40 +post_install() 17.41 +{ 17.42 + chroot "$1/" depmod -a $VERSION-slitaz 17.43 +} 17.44 + 17.45 +post_remove() 17.46 +{ 17.47 + chroot "$1/" depmod -a $VERSION-slitaz 17.48 +} 17.49 +
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 18.2 +++ b/linux-libre-dlm/receipt Tue Mar 15 03:23:44 2011 +0100 18.3 @@ -0,0 +1,44 @@ 18.4 +# SliTaz package receipt. 18.5 + 18.6 +PACKAGE="linux-libre-dlm" 18.7 +VERSION="2.6.37-libre" 18.8 +CATEGORY="base-system" 18.9 +SHORT_DESC="The Linux Libre kernel dlmfs module." 18.10 +MAINTAINER="gokhlayeh@slitaz.org" 18.11 +PROVIDE="linux-dlm" 18.12 +DEPENDS="linux-libre" 18.13 +WANTED="linux-libre" 18.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 18.15 +CONFIG_FILES="/etc/filesystems" 18.16 + 18.17 +# Modules paths and list 18.18 +MOD_PATH="lib/modules/$VERSION-slitaz/kernel" 18.19 +MODULES="fs/dlm/dlm.ko.gz" 18.20 + 18.21 +# Rules to gen a SliTaz package suitable for Tazpkg. 18.22 +genpkg_rules() 18.23 +{ 18.24 + mkdir -p ${fs}${MOD_PATH} $fs/etc 18.25 + for module in $MODULES 18.26 + do 18.27 + dir=$MOD_PATH/$(dirname $module) 18.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 18.29 + cp -a $_pkg/$MOD_PATH/$module $fs/$dir 18.30 + done 18.31 + touch $fs/etc/filesystems 18.32 +} 18.33 + 18.34 +# Post install/remove commands for Tazpkg. 18.35 +post_install() 18.36 +{ 18.37 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 18.38 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 18.39 + chroot "$1/" depmod -a $VERSION-slitaz 18.40 +} 18.41 + 18.42 +post_remove() 18.43 +{ 18.44 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 18.45 + chroot "$1/" depmod -a $VERSION-slitaz 18.46 +} 18.47 +
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 19.2 +++ b/linux-libre-drm/receipt Tue Mar 15 03:23:44 2011 +0100 19.3 @@ -0,0 +1,49 @@ 19.4 +# SliTaz package receipt. 19.5 + 19.6 +PACKAGE="linux-libre-drm" 19.7 +VERSION="2.6.37-libre" 19.8 +CATEGORY="base-system" 19.9 +SHORT_DESC="The Linux Libre kernel drm module." 19.10 +MAINTAINER="gokhlayeh@slitaz.org" 19.11 +PROVIDE="linux-drm" 19.12 +DEPENDS="linux-libre-agp" 19.13 +WANTED="linux-libre" 19.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 19.15 + 19.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 19.17 +genpkg_rules() 19.18 +{ 19.19 + local path 19.20 + path=lib/modules/$VERSION-slitaz/kernel 19.21 + mkdir -p $fs/$path 19.22 + export src 19.23 + export _pkg 19.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/gpu/drm | while read module; do 19.25 + dir=$path/$(dirname $module) 19.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 19.27 + cp -a $_pkg/$path/$module $fs/$dir 19.28 + done 19.29 + 19.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 19.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 19.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 19.33 + fi 19.34 + done 19.35 + 19.36 + # remove drivers/char/agp kernel modules cause there in linux-agp package 19.37 + if [ -d $fs/lib/modules/$VERSION-slitaz/kernel/drivers/char/agp ]; then 19.38 + rm -rf $fs/lib/modules/$VERSION-slitaz/kernel/drivers/char/agp 19.39 + fi 19.40 +} 19.41 + 19.42 +# Post install/remove commands for Tazpkg. 19.43 +post_install() 19.44 +{ 19.45 + chroot "$1/" depmod -a $VERSION-slitaz 19.46 +} 19.47 + 19.48 +post_remove() 19.49 +{ 19.50 + chroot "$1/" depmod -a $VERSION-slitaz 19.51 +} 19.52 +
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/linux-libre-firewire/receipt Tue Mar 15 03:23:44 2011 +0100 20.3 @@ -0,0 +1,38 @@ 20.4 +# SliTaz package receipt. 20.5 + 20.6 +PACKAGE="linux-libre-firewire" 20.7 +VERSION="2.6.37-libre" 20.8 +CATEGORY="base-system" 20.9 +SHORT_DESC="The Linux Libre kernel firewire modules." 20.10 +MAINTAINER="gokhlayeh@slitaz.org" 20.11 +PROVIDE="linux-firewire" 20.12 +DEPENDS="linux-libre" 20.13 +WANTED="linux-libre" 20.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 20.15 + 20.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 20.17 +genpkg_rules() 20.18 +{ 20.19 + local path 20.20 + path=lib/modules/$VERSION-slitaz/kernel 20.21 + mkdir -p $fs/$path 20.22 + export src 20.23 + export _pkg 20.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/firewire | while read module; do 20.25 + dir=$path/$(dirname $module) 20.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 20.27 + cp -a $_pkg/$path/$module $fs/$dir 20.28 + done 20.29 +} 20.30 + 20.31 +# Post install/remove commands for Tazpkg. 20.32 +post_install() 20.33 +{ 20.34 + chroot "$1/" depmod -a $VERSION-slitaz 20.35 +} 20.36 + 20.37 +post_remove() 20.38 +{ 20.39 + chroot "$1/" depmod -a $VERSION-slitaz 20.40 +} 20.41 +
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/linux-libre-gfs2/receipt Tue Mar 15 03:23:44 2011 +0100 21.3 @@ -0,0 +1,43 @@ 21.4 +# SliTaz package receipt. 21.5 + 21.6 +PACKAGE="linux-libre-gfs2" 21.7 +VERSION="2.6.37-libre" 21.8 +CATEGORY="base-system" 21.9 +SHORT_DESC="The Linux Libre kernel gfs2 module." 21.10 +MAINTAINER="gokhlayeh@slitaz.org" 21.11 +PROVIDE="linux-gfs2" 21.12 +DEPENDS="linux-libre" 21.13 +WANTED="linux-libre" 21.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 21.15 +CONFIG_FILES="/etc/filesystems" 21.16 + 21.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 21.18 +genpkg_rules() 21.19 +{ 21.20 + local path 21.21 + path=lib/modules/$VERSION-slitaz/kernel 21.22 + mkdir -p $fs/$path $fs/etc 21.23 + export src 21.24 + export _pkg 21.25 + $WOK/$WANTED/stuff/list_modules.sh fs/gfs2 | while read module; do 21.26 + dir=$path/$(dirname $module) 21.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 21.28 + cp -a $_pkg/$path/$module $fs/$dir 21.29 + done 21.30 + touch $fs/etc/filesystems 21.31 +} 21.32 + 21.33 +# Post install/remove commands for Tazpkg. 21.34 +post_install() 21.35 +{ 21.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 21.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 21.38 + chroot "$1/" depmod -a $VERSION-slitaz 21.39 +} 21.40 + 21.41 +post_remove() 21.42 +{ 21.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 21.44 + chroot "$1/" depmod -a $VERSION-slitaz 21.45 +} 21.46 +
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 22.2 +++ b/linux-libre-hfs/receipt Tue Mar 15 03:23:44 2011 +0100 22.3 @@ -0,0 +1,43 @@ 22.4 +# SliTaz package receipt. 22.5 + 22.6 +PACKAGE="linux-libre-hfs" 22.7 +VERSION="2.6.37-libre" 22.8 +CATEGORY="base-system" 22.9 +SHORT_DESC="The Linux Libre kernel hfs module." 22.10 +MAINTAINER="gokhlayeh@slitaz.org" 22.11 +PROVIDE="linux-hfs" 22.12 +DEPENDS="linux-libre" 22.13 +WANTED="linux-libre" 22.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 22.15 +CONFIG_FILES="/etc/filesystems" 22.16 + 22.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 22.18 +genpkg_rules() 22.19 +{ 22.20 + local path 22.21 + path=lib/modules/$VERSION-slitaz/kernel 22.22 + mkdir -p $fs/$path $fs/etc 22.23 + export src 22.24 + export _pkg 22.25 + $WOK/$WANTED/stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do 22.26 + dir=$path/$(dirname $module) 22.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 22.28 + cp -a $_pkg/$path/$module $fs/$dir 22.29 + done 22.30 + touch $fs/etc/filesystems 22.31 +} 22.32 + 22.33 +# Post install/remove commands for Tazpkg. 22.34 +post_install() 22.35 +{ 22.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 22.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 22.38 + chroot "$1/" depmod -a $VERSION-slitaz 22.39 +} 22.40 + 22.41 +post_remove() 22.42 +{ 22.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 22.44 + chroot "$1/" depmod -a $VERSION-slitaz 22.45 +} 22.46 +
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 23.2 +++ b/linux-libre-hfsplus/receipt Tue Mar 15 03:23:44 2011 +0100 23.3 @@ -0,0 +1,42 @@ 23.4 +# SliTaz package receipt. 23.5 + 23.6 +PACKAGE="linux-libre-hfsplus" 23.7 +VERSION="2.6.37-libre" 23.8 +CATEGORY="base-system" 23.9 +SHORT_DESC="The Linux Libre kernel hfsplus module." 23.10 +MAINTAINER="gokhlayeh@slitaz.org" 23.11 +PROVIDE="linux-hfsplus" 23.12 +DEPENDS="linux-libre" 23.13 +WANTED="linux-libre" 23.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 23.15 +CONFIG_FILES="/etc/filesystems" 23.16 + 23.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 23.18 +genpkg_rules() 23.19 +{ 23.20 + local path 23.21 + path=lib/modules/$VERSION-slitaz/kernel 23.22 + mkdir -p $fs/$path $fs/etc 23.23 + export src 23.24 + export _pkg 23.25 + $WOK/$WANTED/stuff/list_modules.sh fs/hfsplus | while read module; do 23.26 + dir=$path/$(dirname $module) 23.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 23.28 + cp -a $_pkg/$path/$module $fs/$dir 23.29 + done 23.30 + touch $fs/etc/filesystems 23.31 +} 23.32 + 23.33 +# Post install/remove commands for Tazpkg. 23.34 +post_install() 23.35 +{ 23.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 23.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 23.38 + chroot "$1/" depmod -a $VERSION-slitaz 23.39 +} 23.40 + 23.41 +post_remove() 23.42 +{ 23.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 23.44 + chroot "$1/" depmod -a $VERSION-slitaz 23.45 +}
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 24.2 +++ b/linux-libre-hwmon/receipt Tue Mar 15 03:23:44 2011 +0100 24.3 @@ -0,0 +1,44 @@ 24.4 +# SliTaz package receipt. 24.5 + 24.6 +PACKAGE="linux-libre-hwmon" 24.7 +VERSION="2.6.37-libre" 24.8 +CATEGORY="base-system" 24.9 +SHORT_DESC="The Linux Libre kernel hwmon modules." 24.10 +MAINTAINER="gokhlayeh@slitaz.org" 24.11 +PROVIDE="linux-hwmon" 24.12 +DEPENDS="linux-libre" 24.13 +WANTED="linux-libre" 24.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 24.15 + 24.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 24.17 +genpkg_rules() 24.18 +{ 24.19 + local path 24.20 + path=lib/modules/$VERSION-slitaz/kernel 24.21 + mkdir -p $fs/$path 24.22 + export src 24.23 + export _pkg 24.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/hwmon | while read module; do 24.25 + dir=$path/$(dirname $module) 24.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 24.27 + cp -a $_pkg/$path/$module $fs/$dir 24.28 + done 24.29 + 24.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 24.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 24.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 24.33 + fi 24.34 + done 24.35 +} 24.36 + 24.37 +# Post install/remove commands for Tazpkg. 24.38 +post_install() 24.39 +{ 24.40 + chroot "$1/" depmod -a $VERSION-slitaz 24.41 +} 24.42 + 24.43 +post_remove() 24.44 +{ 24.45 + chroot "$1/" depmod -a $VERSION-slitaz 24.46 +} 24.47 +
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 25.2 +++ b/linux-libre-input-misc/receipt Tue Mar 15 03:23:44 2011 +0100 25.3 @@ -0,0 +1,43 @@ 25.4 +# SliTaz package receipt. 25.5 + 25.6 +PACKAGE="linux-libre-input-misc" 25.7 +VERSION="2.6.37-libre" 25.8 +CATEGORY="base-system" 25.9 +SHORT_DESC="The Linux Libre kernel misc. input drivers, including the ATI RemoteWonders." 25.10 +MAINTAINER="gokhlayeh@slitaz.org" 25.11 +PROVIDE="linux-input-misc" 25.12 +WANTED="linux-libre" 25.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 25.14 + 25.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 25.16 +genpkg_rules() 25.17 +{ 25.18 + local path 25.19 + path=lib/modules/$VERSION-slitaz/kernel 25.20 + mkdir -p $fs/$path 25.21 + export src 25.22 + export _pkg 25.23 + $WOK/$WANTED/stuff/list_modules.sh drivers/input/misc | while read module; do 25.24 + dir=$path/$(dirname $module) 25.25 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 25.26 + cp -a $_pkg/$path/$module $fs/$dir 25.27 + done 25.28 + 25.29 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 25.30 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 25.31 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 25.32 + fi 25.33 + done 25.34 +} 25.35 + 25.36 +# Post install/remove commands for Tazpkg. 25.37 +post_install() 25.38 +{ 25.39 + chroot "$1/" depmod -a $VERSION-slitaz 25.40 +} 25.41 + 25.42 +post_remove() 25.43 +{ 25.44 + chroot "$1/" depmod -a $VERSION-slitaz 25.45 +} 25.46 +
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/linux-libre-input-tablet/receipt Tue Mar 15 03:23:44 2011 +0100 26.3 @@ -0,0 +1,38 @@ 26.4 +# SliTaz package receipt. 26.5 + 26.6 +PACKAGE="linux-libre-input-tablet" 26.7 +VERSION="2.6.37-libre" 26.8 +CATEGORY="base-system" 26.9 +SHORT_DESC="The Linux Libre kernel tablet input drivers." 26.10 +MAINTAINER="gokhlayeh@slitaz.org" 26.11 +PROVIDE="linux-input-tablet" 26.12 +WANTED="linux-libre" 26.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 26.14 + 26.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 26.16 +genpkg_rules() 26.17 +{ 26.18 + local path 26.19 + path=lib/modules/$VERSION-slitaz/kernel 26.20 + mkdir -p $fs/$path 26.21 + export src 26.22 + export _pkg 26.23 + $WOK/$WANTED/stuff/list_modules.sh drivers/input/tablet | while read module; do 26.24 + dir=$path/$(dirname $module) 26.25 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 26.26 + cp -a $_pkg/$path/$module $fs/$dir 26.27 + done 26.28 + 26.29 +} 26.30 + 26.31 +# Post install/remove commands for Tazpkg. 26.32 +post_install() 26.33 +{ 26.34 + chroot "$1/" depmod -a $VERSION-slitaz 26.35 +} 26.36 + 26.37 +post_remove() 26.38 +{ 26.39 + chroot "$1/" depmod -a $VERSION-slitaz 26.40 +} 26.41 +
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 27.2 +++ b/linux-libre-input-touchscreen/receipt Tue Mar 15 03:23:44 2011 +0100 27.3 @@ -0,0 +1,44 @@ 27.4 +# SliTaz package receipt. 27.5 + 27.6 +PACKAGE="linux-libre-input-touchscreen" 27.7 +VERSION="2.6.37-libre" 27.8 +CATEGORY="base-system" 27.9 +SHORT_DESC="The Linux Libre kernel touchscreen input drivers." 27.10 +MAINTAINER="gokhlayeh@slitaz.org" 27.11 +PROVIDE="linux-input-touchscreen" 27.12 +WANTED="linux-libre" 27.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 27.14 + 27.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 27.16 +genpkg_rules() 27.17 +{ 27.18 + local path 27.19 + path=lib/modules/$VERSION-slitaz/kernel 27.20 + mkdir -p $fs/$path 27.21 + export src 27.22 + export _pkg 27.23 + $WOK/$WANTED/stuff/list_modules.sh drivers/input/touchscreen \ 27.24 + lib/ts_bm.ko.gz lib/ts_fsm.ko.gz lib/ts_kmp.ko.gz | while read module; do 27.25 + dir=$path/$(dirname $module) 27.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 27.27 + cp -a $_pkg/$path/$module $fs/$dir 27.28 + done 27.29 + 27.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 27.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 27.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 27.33 + fi 27.34 + done 27.35 +} 27.36 + 27.37 +# Post install/remove commands for Tazpkg. 27.38 +post_install() 27.39 +{ 27.40 + chroot "$1/" depmod -a $VERSION-slitaz 27.41 +} 27.42 + 27.43 +post_remove() 27.44 +{ 27.45 + chroot "$1/" depmod -a $VERSION-slitaz 27.46 +} 27.47 +
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 28.2 +++ b/linux-libre-ipv6/receipt Tue Mar 15 03:23:44 2011 +0100 28.3 @@ -0,0 +1,44 @@ 28.4 +# SliTaz package receipt. 28.5 + 28.6 +PACKAGE="linux-libre-ipv6" 28.7 +VERSION="2.6.37-libre" 28.8 +CATEGORY="base-system" 28.9 +SHORT_DESC="The Linux Libre kernel ipv6 modules." 28.10 +MAINTAINER="gokhlayeh@slitaz.org" 28.11 +PROVIDE="linux-ipv6" 28.12 +DEPENDS="linux-libre" 28.13 +WANTED="linux-libre" 28.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 28.15 + 28.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 28.17 +genpkg_rules() 28.18 +{ 28.19 + local path 28.20 + path=lib/modules/$VERSION-slitaz/kernel 28.21 + mkdir -p $fs/$path 28.22 + export src 28.23 + export _pkg 28.24 + $WOK/$WANTED/stuff/list_modules.sh net/ipv6 | while read module; do 28.25 + dir=$path/$(dirname $module) 28.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 28.27 + cp -a $_pkg/$path/$module $fs/$dir 28.28 + done 28.29 + 28.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 28.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 28.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 28.33 + fi 28.34 + done 28.35 +} 28.36 + 28.37 +# Post install/remove commands for Tazpkg. 28.38 +post_install() 28.39 +{ 28.40 + chroot "$1/" depmod -a $VERSION-slitaz 28.41 +} 28.42 + 28.43 +post_remove() 28.44 +{ 28.45 + chroot "$1/" depmod -a $VERSION-slitaz 28.46 +} 28.47 +
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 29.2 +++ b/linux-libre-irda/receipt Tue Mar 15 03:23:44 2011 +0100 29.3 @@ -0,0 +1,40 @@ 29.4 +# SliTaz package receipt. 29.5 + 29.6 +PACKAGE="linux-libre-irda" 29.7 +VERSION="2.6.37-libre" 29.8 +CATEGORY="base-system" 29.9 +SHORT_DESC="The Linux Libre kernel irda modules." 29.10 +MAINTAINER="gokhlayeh@slitaz.org" 29.11 +PROVIDE="linux-irda" 29.12 +WANTED="linux-libre" 29.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 29.14 + 29.15 + 29.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 29.17 +genpkg_rules() 29.18 +{ 29.19 + local path 29.20 + path=lib/modules/$VERSION-slitaz/kernel 29.21 + mkdir -p $fs/$path 29.22 + 29.23 + export src 29.24 + export _pkg 29.25 + 29.26 + $WOK/$WANTED/stuff/list_modules.sh drivers/net/irda net/irda | while read module; do 29.27 + dir=$path/$(dirname $module) 29.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 29.29 + cp -a $_pkg/$path/$module $fs/$dir 29.30 + done 29.31 +} 29.32 + 29.33 +# Post install/remove commands for Tazpkg. 29.34 +post_install() 29.35 +{ 29.36 + chroot "$1/" depmod -a $VERSION-slitaz 29.37 +} 29.38 + 29.39 +post_remove() 29.40 +{ 29.41 + chroot "$1/" depmod -a $VERSION-slitaz 29.42 +} 29.43 +
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 30.2 +++ b/linux-libre-isdn/receipt Tue Mar 15 03:23:44 2011 +0100 30.3 @@ -0,0 +1,44 @@ 30.4 +# SliTaz package receipt. 30.5 + 30.6 +PACKAGE="linux-libre-isdn" 30.7 +VERSION="2.6.37-libre" 30.8 +CATEGORY="base-system" 30.9 +SHORT_DESC="The Linux Libre kernel isdn modules." 30.10 +MAINTAINER="gokhlayeh@slitaz.org" 30.11 +PROVIDE="linux-isdn" 30.12 +DEPENDS="linux-libre" 30.13 +WANTED="linux-libre" 30.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 30.15 + 30.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 30.17 +genpkg_rules() 30.18 +{ 30.19 + local path 30.20 + path=lib/modules/$VERSION-slitaz/kernel 30.21 + mkdir -p $fs/$path 30.22 + export src 30.23 + export _pkg 30.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/isdn | while read module; do 30.25 + dir=$path/$(dirname $module) 30.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 30.27 + cp -a $_pkg/$path/$module $fs/$dir 30.28 + done 30.29 + 30.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 30.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 30.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 30.33 + fi 30.34 + done 30.35 +} 30.36 + 30.37 +# Post install/remove commands for Tazpkg. 30.38 +post_install() 30.39 +{ 30.40 + chroot "$1/" depmod -a $VERSION-slitaz 30.41 +} 30.42 + 30.43 +post_remove() 30.44 +{ 30.45 + chroot "$1/" depmod -a $VERSION-slitaz 30.46 +} 30.47 +
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 31.2 +++ b/linux-libre-jfs/receipt Tue Mar 15 03:23:44 2011 +0100 31.3 @@ -0,0 +1,42 @@ 31.4 +# SliTaz package receipt. 31.5 + 31.6 +PACKAGE="linux-libre-jfs" 31.7 +VERSION="2.6.37-libre" 31.8 +CATEGORY="base-system" 31.9 +SHORT_DESC="The Linux Libre kernel jfs module." 31.10 +MAINTAINER="gokhlayeh@slitaz.org" 31.11 +PROVIDE="linux-jfs" 31.12 +DEPENDS="linux-libre" 31.13 +WANTED="linux-libre" 31.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 31.15 +CONFIG_FILES="/etc/filesystems" 31.16 + 31.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 31.18 +genpkg_rules() 31.19 +{ 31.20 + local path 31.21 + path=lib/modules/$VERSION-slitaz/kernel 31.22 + mkdir -p $fs/$path $fs/etc 31.23 + export src 31.24 + export _pkg 31.25 + $WOK/$WANTED/stuff/list_modules.sh fs/jfs | while read module; do 31.26 + dir=$path/$(dirname $module) 31.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 31.28 + cp -a $_pkg/$path/$module $fs/$dir 31.29 + done 31.30 + touch $fs/etc/filesystems 31.31 +} 31.32 + 31.33 +# Post install/remove commands for Tazpkg. 31.34 +post_install() 31.35 +{ 31.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 31.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 31.38 + chroot "$1/" depmod -a $VERSION-slitaz 31.39 +} 31.40 + 31.41 +post_remove() 31.42 +{ 31.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 31.44 + chroot "$1/" depmod -a $VERSION-slitaz 31.45 +}
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 32.2 +++ b/linux-libre-joystick/receipt Tue Mar 15 03:23:44 2011 +0100 32.3 @@ -0,0 +1,46 @@ 32.4 +# SliTaz package receipt. 32.5 + 32.6 +PACKAGE="linux-libre-joystick" 32.7 +VERSION="2.6.37-libre" 32.8 +CATEGORY="base-system" 32.9 +SHORT_DESC="The Linux Libre kernel joystick modules." 32.10 +MAINTAINER="gokhlayeh@slitaz.org" 32.11 +PROVIDE="linux-joystick" 32.12 +DEPENDS="linux-libre" 32.13 +WANTED="linux-libre" 32.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 32.15 + 32.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 32.17 +genpkg_rules() 32.18 +{ 32.19 + local path 32.20 + path=lib/modules/$VERSION-slitaz/kernel 32.21 + mkdir -p $fs/$path 32.22 + export src 32.23 + export _pkg 32.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/input/joystick drivers/input/gameport \ 32.25 + drivers/input/input-polldev.ko.gz | \ 32.26 + while read module; do 32.27 + dir=$path/$(dirname $module) 32.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 32.29 + cp -a $_pkg/$path/$module $fs/$dir 32.30 + done 32.31 + 32.32 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 32.33 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 32.34 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 32.35 + fi 32.36 + done 32.37 +} 32.38 + 32.39 +# Post install/remove commands for Tazpkg. 32.40 +post_install() 32.41 +{ 32.42 + chroot "$1/" depmod -a $VERSION-slitaz 32.43 +} 32.44 + 32.45 +post_remove() 32.46 +{ 32.47 + chroot "$1/" depmod -a $VERSION-slitaz 32.48 +} 32.49 +
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 33.2 +++ b/linux-libre-kvm/receipt Tue Mar 15 03:23:44 2011 +0100 33.3 @@ -0,0 +1,41 @@ 33.4 +# SliTaz package receipt. 33.5 + 33.6 +PACKAGE="linux-libre-kvm" 33.7 +VERSION="2.6.37-libre" 33.8 +CATEGORY="base-system" 33.9 +SHORT_DESC="The Linux Libre kernel kvm and virtio modules." 33.10 +MAINTAINER="gokhlayeh@slitaz.org" 33.11 +PROVIDE="linux-kvm" 33.12 +DEPENDS="linux-libre" 33.13 +WANTED="linux-libre" 33.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 33.15 + 33.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 33.17 +genpkg_rules() 33.18 +{ 33.19 + local path 33.20 + path=lib/modules/$VERSION-slitaz/kernel 33.21 + mkdir -p $fs/$path 33.22 + export src 33.23 + export _pkg 33.24 + $WOK/$WANTED/stuff/list_modules.sh arch/x86/kvm drivers/virtio drivers/lguest \ 33.25 + drivers/char/hw_random/virtio-rng.ko.gz \ 33.26 + drivers/net/virtio_net.ko.gz drivers/block/virtio_blk.ko.gz | \ 33.27 + while read module; do 33.28 + dir=$path/$(dirname $module) 33.29 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 33.30 + cp -a $_pkg/$path/$module $fs/$dir 33.31 + done 33.32 +} 33.33 + 33.34 +# Post install/remove commands for Tazpkg. 33.35 +post_install() 33.36 +{ 33.37 + chroot "$1/" depmod -a $VERSION-slitaz 33.38 +} 33.39 + 33.40 +post_remove() 33.41 +{ 33.42 + chroot "$1/" depmod -a $VERSION-slitaz 33.43 +} 33.44 +
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 34.2 +++ b/linux-libre-logfs/receipt Tue Mar 15 03:23:44 2011 +0100 34.3 @@ -0,0 +1,43 @@ 34.4 +# SliTaz package receipt. 34.5 + 34.6 +PACKAGE="linux-libre-logfs" 34.7 +VERSION="2.6.37-libre" 34.8 +CATEGORY="base-system" 34.9 +SHORT_DESC="The Linux Libre kernel logfs module." 34.10 +MAINTAINER="gokhlayeh@slitaz.org" 34.11 +PROVIDE="linux-logfs" 34.12 +DEPENDS="linux-libre" 34.13 +WANTED="linux-libre" 34.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 34.15 +CONFIG_FILES="/etc/filesystems" 34.16 + 34.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 34.18 +genpkg_rules() 34.19 +{ 34.20 + local path 34.21 + path=lib/modules/$VERSION-slitaz/kernel 34.22 + mkdir -p $fs/$path $fs/etc 34.23 + export src 34.24 + export _pkg 34.25 + $WOK/$WANTED/stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do 34.26 + dir=$path/$(dirname $module) 34.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 34.28 + cp -a $_pkg/$path/$module $fs/$dir 34.29 + done 34.30 + touch $fs/etc/filesystems 34.31 +} 34.32 + 34.33 +# Post install/remove commands for Tazpkg. 34.34 +post_install() 34.35 +{ 34.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 34.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 34.38 + chroot "$1/" depmod -a $VERSION-slitaz 34.39 +} 34.40 + 34.41 +post_remove() 34.42 +{ 34.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 34.44 + chroot "$1/" depmod -a $VERSION-slitaz 34.45 +} 34.46 +
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 35.2 +++ b/linux-libre-md/receipt Tue Mar 15 03:23:44 2011 +0100 35.3 @@ -0,0 +1,48 @@ 35.4 +# SliTaz package receipt. 35.5 + 35.6 +PACKAGE="linux-libre-md" 35.7 +VERSION="2.6.37-libre" 35.8 +CATEGORY="base-system" 35.9 +SHORT_DESC="The Linux Libre kernel md modules." 35.10 +MAINTAINER="gokhlayeh@slitaz.org" 35.11 +PROVIDE="linux-md" 35.12 +DEPENDS="linux-libre" 35.13 +WANTED="linux-libre" 35.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 35.15 +DEPENDS="linux-libre-crypto" 35.16 + 35.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 35.18 +genpkg_rules() 35.19 +{ 35.20 + local path 35.21 + path=lib/modules/$VERSION-slitaz/kernel 35.22 + mkdir -p $fs/$path 35.23 + export src 35.24 + export _pkg 35.25 + $WOK/$WANTED/stuff/list_modules.sh drivers/md | while read module; do 35.26 + case "$module" in 35.27 + crypto/*) continue;; 35.28 + esac 35.29 + dir=$path/$(dirname $module) 35.30 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 35.31 + cp -a $_pkg/$path/$module $fs/$dir 35.32 + done 35.33 + 35.34 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 35.35 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 35.36 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 35.37 + fi 35.38 + done 35.39 +} 35.40 + 35.41 +# Post install/remove commands for Tazpkg. 35.42 +post_install() 35.43 +{ 35.44 + chroot "$1/" depmod -a $VERSION-slitaz 35.45 +} 35.46 + 35.47 +post_remove() 35.48 +{ 35.49 + chroot "$1/" depmod -a $VERSION-slitaz 35.50 +} 35.51 +
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 36.2 +++ b/linux-libre-memstick/receipt Tue Mar 15 03:23:44 2011 +0100 36.3 @@ -0,0 +1,46 @@ 36.4 +# SliTaz package receipt. 36.5 + 36.6 +PACKAGE="linux-libre-memstick" 36.7 +VERSION="2.6.37-libre" 36.8 +CATEGORY="base-system" 36.9 +SHORT_DESC="The Linux Libre kernel sony memory stick modules." 36.10 +MAINTAINER="gokhlayeh@slitaz.org" 36.11 +PROVIDE="linux-memstick" 36.12 +DEPENDS="linux-libre" 36.13 +WANTED="linux-libre" 36.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 36.15 + 36.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 36.17 +genpkg_rules() 36.18 +{ 36.19 + local path 36.20 + path=lib/modules/$VERSION-slitaz/kernel 36.21 + mkdir -p $fs/$path 36.22 + 36.23 + export src 36.24 + export _pkg 36.25 + 36.26 + $WOK/$WANTED/stuff/list_modules.sh drivers/memstick | while read module; do 36.27 + dir=$path/$(dirname $module) 36.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 36.29 + cp -a $_pkg/$path/$module $fs/$dir 36.30 + done 36.31 + 36.32 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 36.33 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 36.34 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 36.35 + fi 36.36 + done 36.37 +} 36.38 + 36.39 +# Post install/remove commands for Tazpkg. 36.40 +post_install() 36.41 +{ 36.42 + chroot "$1/" depmod -a $VERSION-slitaz 36.43 +} 36.44 + 36.45 +post_remove() 36.46 +{ 36.47 + chroot "$1/" depmod -a $VERSION-slitaz 36.48 +} 36.49 +
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 37.2 +++ b/linux-libre-minix/receipt Tue Mar 15 03:23:44 2011 +0100 37.3 @@ -0,0 +1,43 @@ 37.4 +# SliTaz package receipt. 37.5 + 37.6 +PACKAGE="linux-libre-minix" 37.7 +VERSION="2.6.37-libre" 37.8 +CATEGORY="base-system" 37.9 +SHORT_DESC="The Linux Libre kernel minix module." 37.10 +MAINTAINER="gokhlayeh@slitaz.org" 37.11 +PROVIDE="linux-minix" 37.12 +DEPENDS="linux-libre" 37.13 +WANTED="linux-libre" 37.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 37.15 +CONFIG_FILES="/etc/filesystems" 37.16 + 37.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 37.18 +genpkg_rules() 37.19 +{ 37.20 + local path 37.21 + path=lib/modules/$VERSION-slitaz/kernel 37.22 + mkdir -p $fs/$path $fs/etc 37.23 + export src 37.24 + export _pkg 37.25 + $WOK/$WANTED/stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do 37.26 + dir=$path/$(dirname $module) 37.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 37.28 + cp -a $_pkg/$path/$module $fs/$dir 37.29 + done 37.30 + touch $fs/etc/filesystems 37.31 +} 37.32 + 37.33 +# Post install/remove commands for Tazpkg. 37.34 +post_install() 37.35 +{ 37.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 37.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 37.38 + chroot "$1/" depmod -a $VERSION-slitaz 37.39 +} 37.40 + 37.41 +post_remove() 37.42 +{ 37.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 37.44 + chroot "$1/" depmod -a $VERSION-slitaz 37.45 +} 37.46 +
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 38.2 +++ b/linux-libre-mmc/receipt Tue Mar 15 03:23:44 2011 +0100 38.3 @@ -0,0 +1,45 @@ 38.4 +# SliTaz package receipt. 38.5 + 38.6 +PACKAGE="linux-libre-mmc" 38.7 +VERSION="2.6.37-libre" 38.8 +CATEGORY="base-system" 38.9 +SHORT_DESC="The Linux Libre kernel mmc modules (card reader)." 38.10 +MAINTAINER="gokhlayeh@slitaz.org" 38.11 +PROVIDE="linux-mmc" 38.12 +DEPENDS="linux-libre" 38.13 +WANTED="linux-libre" 38.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 38.15 + 38.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 38.17 +genpkg_rules() 38.18 +{ 38.19 + local path 38.20 + path=lib/modules/$VERSION-slitaz/kernel 38.21 + mkdir -p $fs/$path 38.22 + export src 38.23 + export _pkg 38.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/mmc drivers/misc/tifm_7xx1.ko.gz drivers/misc/iwmc3200top/iwmc3200top.ko.gz| \ 38.25 + while read module; do 38.26 + dir=$path/$(dirname $module) 38.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 38.28 + cp -a $_pkg/$path/$module $fs/$dir 38.29 + done 38.30 + 38.31 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 38.32 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 38.33 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 38.34 + fi 38.35 + done 38.36 +} 38.37 + 38.38 +# Post install/remove commands for Tazpkg. 38.39 +post_install() 38.40 +{ 38.41 + chroot "$1/" depmod -a $VERSION-slitaz 38.42 +} 38.43 + 38.44 +post_remove() 38.45 +{ 38.46 + chroot "$1/" depmod -a $VERSION-slitaz 38.47 +} 38.48 +
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 39.2 +++ b/linux-libre-module-headers/receipt Tue Mar 15 03:23:44 2011 +0100 39.3 @@ -0,0 +1,148 @@ 39.4 +# SliTaz package receipt. 39.5 + 39.6 +PACKAGE="linux-libre-module-headers" 39.7 +VERSION="2.6.37-libre" 39.8 +CATEGORY="development" 39.9 +SHORT_DESC="Header files and scripts for building modules for Linux Libre kernel." 39.10 +MAINTAINER="gokhlayeh@slitaz.org" 39.11 +PROVIDE="linux-module-headers" 39.12 +DEPENDS="slitaz-toolchain" 39.13 +WANTED="linux-libre" 39.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 39.15 +KVERSION=$VERSION-slitaz 39.16 + 39.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 39.18 +genpkg_rules() 39.19 +{ 39.20 + local path 39.21 + _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 39.22 + AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}" 39.23 + path=usr/src/linux-$KVERSION 39.24 + mkdir -p $fs/lib/modules/$KVERSION 39.25 + ln -sf /$path $fs/lib/modules/$KVERSION/build 39.26 + install -D -m644 $src/Makefile \ 39.27 + $fs/$path/Makefile 39.28 + install -D -m644 $src/kernel/Makefile \ 39.29 + $fs/$path/kernel/Makefile 39.30 + install -D -m644 $src/.config \ 39.31 + $fs/$path/.config 39.32 + mkdir -p $fs/$path/include 39.33 + 39.34 + for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do 39.35 + cp -a $src/include/$i $fs/$path/include/ 39.36 + done 39.37 + 39.38 + # copy arch includes for external modules 39.39 + mkdir -p $fs/$path/arch/x86 39.40 + cp -a $src/arch/x86/include $fs/$path/arch/x86/ 39.41 + 39.42 + # copy files necessary for later builds, like nvidia and vmware 39.43 + cp -a $src/Module.symvers-modules $fs/$path/Module.symvers 39.44 + cp -a $src/scripts $fs/$path 39.45 + # fix permissions on scripts dir 39.46 + chmod og-w -R $fs/$path/scripts 39.47 + mkdir -p $fs/$path/.tmp_versions 39.48 + 39.49 + mkdir -p $fs/$path/arch/x86/kernel 39.50 + cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/ 39.51 + cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/ 39.52 + cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/ 39.53 + 39.54 + # add headers for lirc package 39.55 + mkdir -p $fs/$path/drivers/media/video 39.56 + cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/ 39.57 + 39.58 + for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo ; do 39.59 + mkdir -p $fs/$path/drivers/media/video/$i 39.60 + cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i 39.61 + done 39.62 + 39.63 + # add docbook makefile 39.64 + install -D -m644 $src/Documentation/DocBook/Makefile \ 39.65 + $fs/$path/Documentation/DocBook/Makefile 39.66 + 39.67 + # add dm headers 39.68 + mkdir -p $fs/$path/drivers/md 39.69 + cp -a $src/drivers/md/*.h $fs/$path/drivers/md 39.70 + 39.71 + # add inotify.h 39.72 + mkdir -p $fs/$path/include/linux 39.73 + cp -a $src/include/linux/inotify.h $fs/$path/include/linux/ 39.74 + 39.75 + # add wireless headers 39.76 + mkdir -p $fs/$path/net/mac80211/ 39.77 + cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/ 39.78 + 39.79 + # add dvb headers for external modules 39.80 + # in reference to: 39.81 + # http://bugs.archlinux.org/task/9912 39.82 + mkdir -p $fs/$path/drivers/media/dvb/dvb-core 39.83 + cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/ 39.84 + 39.85 + # add dvb headers for external modules 39.86 + # in reference to: 39.87 + # http://bugs.archlinux.org/task/11194 39.88 + if [ -d $src/include/config/dvb/ ]; then 39.89 + mkdir -p $fs/$path/include/config/dvb/ 39.90 + cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/ 39.91 + fi 39.92 + 39.93 + # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new 39.94 + # in reference to: 39.95 + # http://bugs.archlinux.org/task/13146 39.96 + mkdir -p $fs/$path/drivers/media/dvb/frontends/ 39.97 + cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/ 39.98 + cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/ 39.99 + 39.100 + # add dvb headers 39.101 + # in reference to: 39.102 + # http://bugs.archlinux.org/task/20402 39.103 + mkdir -p $fs/$path/drivers/media/dvb/dvb-usb 39.104 + cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/ 39.105 + mkdir -p $fs/$path/drivers/media/dvb/frontends 39.106 + cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/ 39.107 + mkdir -p $fs/$path/drivers/media/common/tuners 39.108 + cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/ 39.109 + 39.110 + # add xfs and shmem for aufs building 39.111 + mkdir -p $fs/$path/fs/xfs 39.112 + mkdir -p $fs/$path/mm 39.113 + cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h 39.114 + 39.115 + # add headers vor virtualbox 39.116 + # in reference to: 39.117 + # http://bugs.archlinux.org/task/14568 39.118 + cp -a $src/include/drm $fs/$path/include/ 39.119 + 39.120 + # add headers for broadcom wl 39.121 + # in reference to: 39.122 + # http://bugs.archlinux.org/task/14568 39.123 + cp -a $src/include/trace $fs/$path/include/ 39.124 + # add headers for crypto modules 39.125 + # in reference to: 39.126 + # http://bugs.archlinux.org/task/22081 39.127 + cp -a $src/include/crypto $fs/$path/include/ 39.128 + # copy in Kconfig files 39.129 + for i in $(find . -name "Kconfig*"); do 39.130 + mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||') 39.131 + cp -a $src/$i $fs/$path/$i 39.132 + done 39.133 + 39.134 + chown -R root.root $fs/$path 39.135 + find $fs/$path -type d -exec chmod 755 {} \; 39.136 + # remove unneeded architectures 39.137 + rm -rf $fs/$path/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa} 39.138 + 39.139 +} 39.140 + 39.141 +pre_remove() { 39.142 + if [ -e $1/usr/src/linux ]; then 39.143 + rm -rf $1/usr/src/linux 39.144 + fi 39.145 +} 39.146 + 39.147 +post_install() { 39.148 + # Added soft link to make it easier to point to kernel folder 39.149 + [ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux 39.150 + ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux 39.151 +}
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 40.2 +++ b/linux-libre-mwave/receipt Tue Mar 15 03:23:44 2011 +0100 40.3 @@ -0,0 +1,38 @@ 40.4 +# SliTaz package receipt. 40.5 + 40.6 +PACKAGE="linux-libre-mwave" 40.7 +VERSION="2.6.37-libre" 40.8 +CATEGORY="base-system" 40.9 +SHORT_DESC="The Linux Libre kernel ACP Modem driver module (for IBM Thinkpad)" 40.10 +MAINTAINER="gokhlayeh@slitaz.org" 40.11 +PROVIDE="linux-mwave" 40.12 +DEPENDS="linux-libre" 40.13 +WANTED="linux-libre" 40.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 40.15 + 40.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 40.17 +genpkg_rules() 40.18 +{ 40.19 + local path 40.20 + path=lib/modules/$VERSION-slitaz/kernel 40.21 + mkdir -p $fs/$path 40.22 + export src 40.23 + export _pkg 40.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/char/mwave | while read module; do 40.25 + dir=$path/$(dirname $module) 40.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 40.27 + cp -a $_pkg/$path/$module $fs/$dir 40.28 + done 40.29 +} 40.30 + 40.31 +# Post install/remove commands for Tazpkg. 40.32 +post_install() 40.33 +{ 40.34 + chroot "$1/" depmod -a $VERSION-slitaz 40.35 +} 40.36 + 40.37 +post_remove() 40.38 +{ 40.39 + chroot "$1/" depmod -a $VERSION-slitaz 40.40 +} 40.41 +
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 41.2 +++ b/linux-libre-ncpfs/receipt Tue Mar 15 03:23:44 2011 +0100 41.3 @@ -0,0 +1,43 @@ 41.4 +# SliTaz package receipt. 41.5 + 41.6 +PACKAGE="linux-libre-ncpfs" 41.7 +VERSION="2.6.37-libre" 41.8 +CATEGORY="base-system" 41.9 +SHORT_DESC="The Linux Libre kernel ncpfs module." 41.10 +MAINTAINER="gokhlayeh@slitaz.org" 41.11 +PROVIDE="linux-ncpfs" 41.12 +DEPENDS="linux-libre" 41.13 +WANTED="linux-libre" 41.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 41.15 +CONFIG_FILES="/etc/filesystems" 41.16 + 41.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 41.18 +genpkg_rules() 41.19 +{ 41.20 + local path 41.21 + path=lib/modules/$VERSION-slitaz/kernel 41.22 + mkdir -p $fs/$path $fs/etc 41.23 + export src 41.24 + export _pkg 41.25 + $WOK/$WANTED/stuff/list_modules.sh fs/ncpfs | while read module; do 41.26 + dir=$path/$(dirname $module) 41.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 41.28 + cp -a $_pkg/$path/$module $fs/$dir 41.29 + done 41.30 + touch $fs/etc/filesystems 41.31 +} 41.32 + 41.33 +# Post install/remove commands for Tazpkg. 41.34 +post_install() 41.35 +{ 41.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 41.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 41.38 + chroot "$1/" depmod -a $VERSION-slitaz 41.39 +} 41.40 + 41.41 +post_remove() 41.42 +{ 41.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 41.44 + chroot "$1/" depmod -a $VERSION-slitaz 41.45 +} 41.46 +
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 42.2 +++ b/linux-libre-netfilter/receipt Tue Mar 15 03:23:44 2011 +0100 42.3 @@ -0,0 +1,48 @@ 42.4 +# SliTaz package receipt. 42.5 + 42.6 +PACKAGE="linux-libre-netfilter" 42.7 +VERSION="2.6.37-libre" 42.8 +CATEGORY="base-system" 42.9 +SHORT_DESC="The Linux Libre kernel netfilter modules." 42.10 +MAINTAINER="gokhlayeh@slitaz.org" 42.11 +PROVIDE="linux-netfilter" 42.12 +DEPENDS="linux-libre" 42.13 +WANTED="linux-libre" 42.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 42.15 + 42.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 42.17 +genpkg_rules() 42.18 +{ 42.19 + local path 42.20 + path=lib/modules/$VERSION-slitaz/kernel 42.21 + mkdir -p $fs/$path 42.22 + 42.23 + export src 42.24 + export _pkg 42.25 + 42.26 + $WOK/$WANTED/stuff/list_modules.sh net/netfilter net/ipv4/netfilter net/8021q | \ 42.27 + while read module; do 42.28 + dir=$path/$(dirname $module) 42.29 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 42.30 + cp -a $_pkg/$path/$module $fs/$dir 42.31 + done 42.32 + rm -r $fs/$path/net/ipv6 42.33 + 42.34 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 42.35 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 42.36 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 42.37 + fi 42.38 + done 42.39 +} 42.40 + 42.41 +# Post install/remove commands for Tazpkg. 42.42 +post_install() 42.43 +{ 42.44 + chroot "$1/" depmod -a $VERSION-slitaz 42.45 +} 42.46 + 42.47 +post_remove() 42.48 +{ 42.49 + chroot "$1/" depmod -a $VERSION-slitaz 42.50 +} 42.51 +
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 43.2 +++ b/linux-libre-nfsd/receipt Tue Mar 15 03:23:44 2011 +0100 43.3 @@ -0,0 +1,43 @@ 43.4 +# SliTaz package receipt. 43.5 + 43.6 +PACKAGE="linux-libre-nfsd" 43.7 +VERSION="2.6.37-libre" 43.8 +CATEGORY="base-system" 43.9 +SHORT_DESC="The Linux Libre kernel NFS server module." 43.10 +MAINTAINER="gokhlayeh@slitaz.org" 43.11 +PROVIDE="linux-nfsd" 43.12 +DEPENDS="linux-libre" 43.13 +WANTED="linux-libre" 43.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 43.15 +CONFIG_FILES="/etc/filesystems" 43.16 + 43.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 43.18 +genpkg_rules() 43.19 +{ 43.20 + local path 43.21 + path=lib/modules/$VERSION-slitaz/kernel 43.22 + mkdir -p $fs/$path $fs/etc 43.23 + export src 43.24 + export _pkg 43.25 + $WOK/$WANTED/stuff/list_modules.sh fs/nfsd | while read module; do 43.26 + dir=$path/$(dirname $module) 43.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 43.28 + cp -a $_pkg/$path/$module $fs/$dir 43.29 + done 43.30 + touch $fs/etc/filesystems 43.31 +} 43.32 + 43.33 +# Post install/remove commands for Tazpkg. 43.34 +post_install() 43.35 +{ 43.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 43.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 43.38 + chroot "$1/" depmod -a $VERSION-slitaz 43.39 +} 43.40 + 43.41 +post_remove() 43.42 +{ 43.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 43.44 + chroot "$1/" depmod -a $VERSION-slitaz 43.45 +} 43.46 +
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 44.2 +++ b/linux-libre-reiserfs/receipt Tue Mar 15 03:23:44 2011 +0100 44.3 @@ -0,0 +1,43 @@ 44.4 +# SliTaz package receipt. 44.5 + 44.6 +PACKAGE="linux-libre-reiserfs" 44.7 +VERSION="2.6.37-libre" 44.8 +CATEGORY="base-system" 44.9 +SHORT_DESC="The Linux Libre kernel reiserfs module." 44.10 +MAINTAINER="gokhlayeh@slitaz.org" 44.11 +PROVIDE="linux-reiserfs" 44.12 +DEPENDS="linux-libre" 44.13 +WANTED="linux-libre" 44.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 44.15 +CONFIG_FILES="/etc/filesystems" 44.16 + 44.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 44.18 +genpkg_rules() 44.19 +{ 44.20 + local path 44.21 + path=lib/modules/$VERSION-slitaz/kernel 44.22 + mkdir -p $fs/$path $fs/etc 44.23 + export src 44.24 + export _pkg 44.25 + $WOK/$WANTED/stuff/list_modules.sh fs/reiserfs | while read module; do 44.26 + dir=$path/$(dirname $module) 44.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 44.28 + cp -a $_pkg/$path/$module $fs/$dir 44.29 + done 44.30 + touch $fs/etc/filesystems 44.31 +} 44.32 + 44.33 +# Post install/remove commands for Tazpkg. 44.34 +post_install() 44.35 +{ 44.36 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 44.37 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 44.38 + chroot "$1/" depmod -a $VERSION-slitaz 44.39 +} 44.40 + 44.41 +post_remove() 44.42 +{ 44.43 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 44.44 + chroot "$1/" depmod -a $VERSION-slitaz 44.45 +} 44.46 +
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 45.2 +++ b/linux-libre-sched/receipt Tue Mar 15 03:23:44 2011 +0100 45.3 @@ -0,0 +1,41 @@ 45.4 +# SliTaz package receipt. 45.5 + 45.6 +PACKAGE="linux-libre-sched" 45.7 +VERSION="2.6.37-libre" 45.8 +CATEGORY="base-system" 45.9 +SHORT_DESC="The Linux Libre kernel sched modules." 45.10 +MAINTAINER="gokhlayeh@slitaz.org" 45.11 +PROVIDE="linux-sched" 45.12 +DEPENDS="linux-libre" 45.13 +WANTED="linux-libre" 45.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 45.15 + 45.16 + 45.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 45.18 +genpkg_rules() 45.19 +{ 45.20 + local path 45.21 + path=lib/modules/$VERSION-slitaz/kernel 45.22 + mkdir -p $fs/$path 45.23 + 45.24 + export src 45.25 + export _pkg 45.26 + 45.27 + $WOK/$WANTED/stuff/list_modules.sh net/sched | while read module; do 45.28 + dir=$path/$(dirname $module) 45.29 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 45.30 + cp -a $_pkg/$path/$module $fs/$dir 45.31 + done 45.32 +} 45.33 + 45.34 +# Post install/remove commands for Tazpkg. 45.35 +post_install() 45.36 +{ 45.37 + chroot "$1/" depmod -a $VERSION-slitaz 45.38 +} 45.39 + 45.40 +post_remove() 45.41 +{ 45.42 + chroot "$1/" depmod -a $VERSION-slitaz 45.43 +} 45.44 +
46.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 46.2 +++ b/linux-libre-scsi/receipt Tue Mar 15 03:23:44 2011 +0100 46.3 @@ -0,0 +1,38 @@ 46.4 +# SliTaz package receipt. 46.5 + 46.6 +PACKAGE="linux-libre-scsi" 46.7 +VERSION="2.6.37-libre" 46.8 +CATEGORY="base-system" 46.9 +SHORT_DESC="The Linux Libre kernel scsi modules." 46.10 +MAINTAINER="gokhlayeh@slitaz.org" 46.11 +PROVIDE="linux-scsi" 46.12 +DEPENDS="linux-libre" 46.13 +WANTED="linux-libre" 46.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 46.15 + 46.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 46.17 +genpkg_rules() 46.18 +{ 46.19 + local path 46.20 + path=lib/modules/$VERSION-slitaz/kernel 46.21 + mkdir -p $fs/$path 46.22 + export src 46.23 + export _pkg 46.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/scsi | while read module; do 46.25 + dir=$path/$(dirname $module) 46.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 46.27 + cp -a $_pkg/$path/$module $fs/$dir 46.28 + done 46.29 +} 46.30 + 46.31 +# Post install/remove commands for Tazpkg. 46.32 +post_install() 46.33 +{ 46.34 + chroot "$1/" depmod -a $VERSION-slitaz 46.35 +} 46.36 + 46.37 +post_remove() 46.38 +{ 46.39 + chroot "$1/" depmod -a $VERSION-slitaz 46.40 +} 46.41 +
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 47.2 +++ b/linux-libre-sound/receipt Tue Mar 15 03:23:44 2011 +0100 47.3 @@ -0,0 +1,49 @@ 47.4 +# SliTaz package receipt. 47.5 + 47.6 +PACKAGE="linux-libre-sound" 47.7 +VERSION="2.6.37-libre" 47.8 +CATEGORY="base-system" 47.9 +SHORT_DESC="The Linux Libre kernel sound modules." 47.10 +MAINTAINER="gokhlayeh@slitaz.org" 47.11 +PROVIDE="linux-sound" 47.12 +DEPENDS="linux-libre" 47.13 +WANTED="linux-libre" 47.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 47.15 + 47.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 47.17 +genpkg_rules() 47.18 +{ 47.19 + local path 47.20 + path=lib/modules/$VERSION-slitaz/kernel 47.21 + mkdir -p $fs/$path 47.22 + export src 47.23 + export _pkg 47.24 + $WOK/$WANTED/stuff/list_modules.sh sound | while read module; do 47.25 + dir=$path/$(dirname $module) 47.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 47.27 + cp -a $_pkg/$path/$module $fs/$dir 47.28 + done 47.29 + mkdir $fs/lib/firmware 47.30 + for i in ess korg sun yamaha; do 47.31 + cp -a $_pkg/lib/firmware/$i $fs/lib/firmware 47.32 + done 47.33 + 47.34 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 47.35 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 47.36 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 47.37 + fi 47.38 + done 47.39 + 47.40 +} 47.41 + 47.42 +# Post install/remove commands for Tazpkg. 47.43 +post_install() 47.44 +{ 47.45 + chroot "$1/" depmod -a $VERSION-slitaz 47.46 +} 47.47 + 47.48 +post_remove() 47.49 +{ 47.50 + chroot "$1/" depmod -a $VERSION-slitaz 47.51 +} 47.52 +
48.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 48.2 +++ b/linux-libre-source/receipt Tue Mar 15 03:23:44 2011 +0100 48.3 @@ -0,0 +1,35 @@ 48.4 +# SliTaz package receipt. 48.5 + 48.6 +PACKAGE="linux-libre-source" 48.7 +VERSION="2.6.37-libre" 48.8 +CATEGORY="development" 48.9 +SHORT_DESC="The Linux Libre kernel source files." 48.10 +MAINTAINER="gokhlayeh@slitaz.org" 48.11 +PROVIDE="linux-source" 48.12 +WANTED="linux-libre" 48.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 48.14 +DEPENDS="linux-libre slitaz-toolchain ncurses-dev perl" 48.15 + 48.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 48.17 +genpkg_rules() 48.18 +{ 48.19 + local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 48.20 + local AUFSDIR="aufs-${_AUFSVER}" 48.21 + mkdir -p $fs/usr/src/kernel-patches \ 48.22 + $fs/lib/modules/$VERSION-slitaz \ 48.23 + $fs/usr/bin 48.24 + cp -a $WOK/$WANTED/slitaz $fs/usr/src/kernel-patches 48.25 + cp -a stuff/buildtaz $fs/usr/src/kernel-patches/slitaz 48.26 + cp -a stuff/make-tazpkg.u $fs/usr/src/kernel-patches/slitaz 48.27 + cp -a stuff/get-linux-source $fs/usr/bin 48.28 + sed -i "s|=XXX|=$VERSION|g" $fs/usr/bin/get-linux-source 48.29 + # Copy Aufs2 source files 48.30 + if [ -d $WOK/$WANTED/$AUFSDIR ]; then 48.31 + mkdir $fs/usr/src/kernel-patches/slitaz/aufs2 48.32 + cp -a $WOK/$WANTED/$AUFSDIR/Documentation \ 48.33 + $WOK/$WANTED/$AUFSDIR/fs $WOK/$WANTED/$AUFSDIR/include \ 48.34 + $fs/usr/src/kernel-patches/slitaz/aufs2 48.35 + fi 48.36 + ln -s /usr/src/linux-$VERSION \ 48.37 + $fs/lib/modules/$VERSION-slitaz/source 48.38 +}
49.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 49.2 +++ b/linux-libre-source/stuff/buildtaz Tue Mar 15 03:23:44 2011 +0100 49.3 @@ -0,0 +1,80 @@ 49.4 +#!/bin/sh 49.5 +# 49.6 +# buildtaz 1.0 49.7 +# This script generate a SliTaz package for linux kernel and modules. 49.8 +# Inspired from builddeb script. 49.9 +# 49.10 +# (C) 2009 SliTaz - GNU General Public License v3. 49.11 +# 49.12 +# Author: Eric Joseph-Alexandre <erjo@slitaz.org> 49.13 + 49.14 +set -e 49.15 + 49.16 +LOCALVERSION=$(grep ^CONFIG_LOCALVERSION $objtree/.config | sed -e "s/CONFIG_LOCALVERSION=\"\(.*\)\"/\1/") 49.17 +PACKAGE="linux${LOCALVERSION}" 49.18 +VERSION=${KERNELVERSION} 49.19 +V=$KERNELRELEASE 49.20 +DIR="$objtree/taz/$PACKAGE-$VERSION" 49.21 +fs="$DIR/fs" 49.22 + 49.23 +# Setup directories 49.24 +rm -rf "$objtree/taz" 49.25 +mkdir -p "$fs/lib" "$fs/boot" 49.26 + 49.27 +# Build and install kernel 49.28 +cp System.map "$fs/boot/System.map-$KERNELRELEASE" 49.29 +cp $KBUILD_IMAGE "$fs/boot/vmlinuz-$KERNELRELEASE" 49.30 + 49.31 +# Build and compress modules if needed 49.32 +if grep -q '^CONFIG_MODULES=y' .config ; then 49.33 + INSTALL_MOD_PATH="$fs" make KBUILD_SRC= modules_install 49.34 + [ -f $objtree/slitaz/gztazmod.sh ] && $objtree/slitaz/gztazmod.sh $fs/lib/modules/${VERSION}${LOCALVERSION} 49.35 +fi 49.36 + 49.37 +# Create Slitaz package 49.38 +cat > $DIR/receipt <<EOT 49.39 +# SliTaz package receipt. 49.40 + 49.41 +PACKAGE="${PACKAGE}" 49.42 +VERSION="${VERSION}" 49.43 +CATEGORY="base-system" 49.44 +SHORT_DESC="Customized Linux Kernel" 49.45 +WEB_SITE="http://www.kernel.org" 49.46 +DEPENDS="depmod" 49.47 + 49.48 +post_install() 49.49 +{ 49.50 + echo "Processing post-install commands..." 49.51 + chroot "\$1/" depmod -a $V 49.52 + if [ -f "\$1/boot/grub/menu.lst" ]; then 49.53 + root_dev="`cat \$1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`" 49.54 + grub_dev="`cat \$1/boot/grub/menu.lst | grep "root (" | head -n 1`" 49.55 + # Add new kernel entry in case of upgrade for installed system. 49.56 + if ! grep -q \$PACKAGE-\$VERSION \$1/boot/grub/menu.lst; then 49.57 + echo " 49.58 + 49.59 +title SliTaz GNU/Linux (Kernel $V) 49.60 +"\$grub_dev" 49.61 +kernel /boot/vmlinuz-$V root=\$root_dev" >> \$1/boot/grub/menu.lst 49.62 + fi 49.63 + 49.64 + # Display information message. 49.65 + echo " 49.66 +---- 49.67 +GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: 49.68 + 49.69 +title SliTaz GNU/Linux (Kernel $V) 49.70 +\$grub_dev 49.71 +kernel /boot/vmlinuz-$V root=\$root_dev 49.72 +---- 49.73 +" 49.74 + fi 49.75 +} 49.76 +EOT 49.77 + 49.78 +# Pack 49.79 +cd $objtree/taz 49.80 +tazpkg pack $PACKAGE-$VERSION 49.81 +mv *.tazpkg $objtree 49.82 +cd - 49.83 +exit 0
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 50.2 +++ b/linux-libre-source/stuff/get-linux-source Tue Mar 15 03:23:44 2011 +0100 50.3 @@ -0,0 +1,63 @@ 50.4 +#!/bin/sh 50.5 + 50.6 + 50.7 +source /etc/slitaz/slitaz.conf 50.8 +SOURCES_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION/src 50.9 +VERSION=XXX 50.10 + 50.11 +url=$(cat /usr/src/kernel-patches/slitaz/url) 50.12 + 50.13 +if [ ! -d $SOURCES_REPOSITORY ]; then 50.14 + mkdir -p $SOURCES_REPOSITORY 50.15 +fi 50.16 + 50.17 +cd /usr/src/ 50.18 +if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then 50.19 + unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD 50.20 +elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then 50.21 + tar xjf $SOURCES_REPOSITORY/$(basename $url) 50.22 +else 50.23 + wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url 50.24 + tar xjf $SOURCES_REPOSITORY/$(basename $url) 50.25 +fi 50.26 + 50.27 +cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION 50.28 +if [ -d /usr/src/linux-$VERSION/slitaz/aufs2 ]; then 50.29 + cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION 50.30 +fi 50.31 + 50.32 +# Add tazpkg support 50.33 +if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then 50.34 + cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package 50.35 + cd /usr/src/linux-$VERSION 50.36 + patch -p1 -i slitaz/make-tazpkg.u 50.37 +fi 50.38 + 50.39 +cd /usr/src/linux-$VERSION 50.40 +while read patch_file; do 50.41 + echo "Apply $patch_file" 50.42 + patch -p1 < slitaz/$patch_file 50.43 +done < slitaz/patches 50.44 +[ ! -f System.map ] && cp slitaz/config .config && 50.45 +make oldconfig && make modules_prepare 50.46 + 50.47 + cat <<EOT 50.48 +---- 50.49 +To modify the kernel configuration: 50.50 +$ cd /usr/src/linux-$VERSION 50.51 +$ make menuconfig 50.52 + 50.53 +To build the kernel and the modules: 50.54 +$ cd /usr/src/linux-$VERSION 50.55 +$ make bzImage && make modules 50.56 + 50.57 +To install the new kernel and the modules: 50.58 +$ make modules_install 50.59 +$ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz 50.60 + 50.61 +To make a Slitaz package with the new kernel and the modules: 50.62 +$ make tazpkg 50.63 + 50.64 +See /usr/src/linux-$VERSION/README 50.65 +---- 50.66 +EOT
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 51.2 +++ b/linux-libre-source/stuff/make-tazpkg.u Tue Mar 15 03:23:44 2011 +0100 51.3 @@ -0,0 +1,23 @@ 51.4 +--- linux-2.6.36.1-ori/scripts/package/Makefile Mon Nov 22 20:03:49 2010 51.5 ++++ linux-2.6.36.1/scripts/package/Makefile Sat Nov 27 09:56:12 2010 51.6 +@@ -101,6 +101,13 @@ 51.7 + 51.8 + clean-dirs += $(objtree)/debian/ 51.9 + 51.10 ++# tazpkg target 51.11 ++# --------------------------------------------------------------------------- 51.12 ++tazpkg: FORCE 51.13 ++ $(MAKE) KBUILD_SRC= 51.14 ++ $(CONFIG_SHELL) $(srctree)/scripts/package/buildtaz 51.15 ++ 51.16 ++clean-dirs += $(objtree)/taz/ 51.17 + 51.18 + # tarball targets 51.19 + # --------------------------------------------------------------------------- 51.20 +@@ -145,4 +152,4 @@ 51.21 + @echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball' 51.22 + @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball' 51.23 + @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball' 51.24 +- 51.25 ++ @echo ' tazpkg - Build the kernel as a SliTaz package' 51.26 +Only in linux-2.6.36.1: scripts/package/buildtaz
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 52.2 +++ b/linux-libre-speakup/receipt Tue Mar 15 03:23:44 2011 +0100 52.3 @@ -0,0 +1,44 @@ 52.4 +# SliTaz package receipt. 52.5 + 52.6 +PACKAGE="linux-libre-speakup" 52.7 +VERSION="2.6.37-libre" 52.8 +CATEGORY="base-system" 52.9 +SHORT_DESC="The Linux Libre kernel Speakup modules." 52.10 +MAINTAINER="gokhlayeh@slitaz.org" 52.11 +PROVIDE="linux-speakup" 52.12 +DEPENDS="linux-libre" 52.13 +WANTED="linux-libre" 52.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 52.15 + 52.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 52.17 +genpkg_rules() 52.18 +{ 52.19 + local path 52.20 + path=lib/modules/$VERSION-slitaz/kernel 52.21 + mkdir -p $fs/$path 52.22 + export src 52.23 + export _pkg 52.24 + $WOK/$WANTED/stuff/list_modules.sh drivers/staging/speakup | while read module; do 52.25 + dir=$path/$(dirname $module) 52.26 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 52.27 + cp -a $_pkg/$path/$module $fs/$dir 52.28 + done 52.29 + 52.30 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 52.31 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 52.32 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 52.33 + fi 52.34 + done 52.35 +} 52.36 + 52.37 +# Post install/remove commands for Tazpkg. 52.38 +post_install() 52.39 +{ 52.40 + chroot "$1/" depmod -a $VERSION-slitaz 52.41 +} 52.42 + 52.43 +post_remove() 52.44 +{ 52.45 + chroot "$1/" depmod -a $VERSION-slitaz 52.46 +} 52.47 +
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 53.2 +++ b/linux-libre-squashfs/receipt Tue Mar 15 03:23:44 2011 +0100 53.3 @@ -0,0 +1,44 @@ 53.4 +# SliTaz package receipt. 53.5 + 53.6 +PACKAGE="linux-libre-squashfs" 53.7 +VERSION="2.6.37-libre" 53.8 +CATEGORY="base-system" 53.9 +SHORT_DESC="The Linux Libre kernel squashfs module." 53.10 +MAINTAINER="gokhlayeh@slitaz.org" 53.11 +PROVIDE="linux-squashfs" 53.12 +DEPENDS="linux-libre" 53.13 +WANTED="linux-libre" 53.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 53.15 +PROVIDE="squashfs-module" 53.16 +CONFIG_FILES="/etc/filesystems" 53.17 + 53.18 +# Rules to gen a SliTaz package suitable for Tazpkg. 53.19 +genpkg_rules() 53.20 +{ 53.21 + local path 53.22 + path=lib/modules/$VERSION-slitaz/kernel 53.23 + mkdir -p $fs/$path $fs/etc 53.24 + export src 53.25 + export _pkg 53.26 + $WOK/$WANTED/stuff/list_modules.sh fs/squashfs | while read module; do 53.27 + dir=$path/$(dirname $module) 53.28 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 53.29 + cp -a $_pkg/$path/$module $fs/$dir 53.30 + done 53.31 + touch $fs/etc/filesystems 53.32 +} 53.33 + 53.34 +# Post install/remove commands for Tazpkg. 53.35 +post_install() 53.36 +{ 53.37 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 53.38 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 53.39 + chroot "$1/" depmod -a $VERSION-slitaz 53.40 +} 53.41 + 53.42 +post_remove() 53.43 +{ 53.44 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 53.45 + chroot "$1/" depmod -a $VERSION-slitaz 53.46 +} 53.47 +
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 54.2 +++ b/linux-libre-toshiba/receipt Tue Mar 15 03:23:44 2011 +0100 54.3 @@ -0,0 +1,38 @@ 54.4 +# SliTaz package receipt. 54.5 + 54.6 +PACKAGE="linux-libre-toshiba" 54.7 +VERSION="2.6.37-libre" 54.8 +CATEGORY="base-system" 54.9 +SHORT_DESC="The Linux Libre kernel toshiba module." 54.10 +MAINTAINER="gokhlayeh@slitaz.org" 54.11 +PROVIDE="linux-toshiba" 54.12 +DEPENDS="linux-libre" 54.13 +WANTED="linux-libre" 54.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 54.15 + 54.16 +# Modules paths and list 54.17 +MOD_PATH="lib/modules/$VERSION-slitaz/kernel" 54.18 +MODULES="drivers/char/toshiba.ko.gz" 54.19 + 54.20 +# Rules to gen a SliTaz package suitable for Tazpkg. 54.21 +genpkg_rules() 54.22 +{ 54.23 + mkdir -p ${fs}${MOD_PATH} 54.24 + for module in $MODULES 54.25 + do 54.26 + dir=$MOD_PATH/$(dirname $module) 54.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 54.28 + cp -a $_pkg/$MOD_PATH/$module $fs/$dir 54.29 + done 54.30 +} 54.31 + 54.32 +# Post install/remove commands for Tazpkg. 54.33 +post_install() 54.34 +{ 54.35 + chroot "$1/" depmod -a $VERSION-slitaz 54.36 +} 54.37 + 54.38 +post_remove() 54.39 +{ 54.40 + chroot "$1/" depmod -a $VERSION-slitaz 54.41 +}
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 55.2 +++ b/linux-libre-udf/receipt Tue Mar 15 03:23:44 2011 +0100 55.3 @@ -0,0 +1,49 @@ 55.4 +# SliTaz package receipt. 55.5 + 55.6 +PACKAGE="linux-libre-udf" 55.7 +VERSION="2.6.37-libre" 55.8 +CATEGORY="base-system" 55.9 +SHORT_DESC="The Linux Libre kernel udf module." 55.10 +MAINTAINER="gokhlayeh@slitaz.org" 55.11 +PROVIDE="linux-udf" 55.12 +DEPENDS="linux-libre" 55.13 +WANTED="linux-libre" 55.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 55.15 +CONFIG_FILES="/etc/filesystems" 55.16 + 55.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 55.18 +genpkg_rules() 55.19 +{ 55.20 + local path 55.21 + path=lib/modules/$VERSION-slitaz/kernel 55.22 + mkdir -p $fs/$path $fs/etc 55.23 + export src 55.24 + export _pkg 55.25 + $WOK/$WANTED/stuff/list_modules.sh fs/udf | while read module; do 55.26 + dir=$path/$(dirname $module) 55.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 55.28 + cp -a $_pkg/$path/$module $fs/$dir 55.29 + done 55.30 + touch $fs/etc/filesystems 55.31 + 55.32 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 55.33 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 55.34 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 55.35 + fi 55.36 + done 55.37 +} 55.38 + 55.39 +# Post install/remove commands for Tazpkg. 55.40 +post_install() 55.41 +{ 55.42 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 55.43 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 55.44 + chroot "$1/" depmod -a $VERSION-slitaz 55.45 +} 55.46 + 55.47 +post_remove() 55.48 +{ 55.49 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 55.50 + chroot "$1/" depmod -a $VERSION-slitaz 55.51 +} 55.52 +
56.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 56.2 +++ b/linux-libre-usb-misc/receipt Tue Mar 15 03:23:44 2011 +0100 56.3 @@ -0,0 +1,38 @@ 56.4 +# SliTaz package receipt. 56.5 + 56.6 +PACKAGE="linux-libre-usb-misc" 56.7 +VERSION="2.6.37-libre" 56.8 +CATEGORY="base-system" 56.9 +SHORT_DESC="The Linux Libre kernel misc. USB drivers, including the Lego USB tower." 56.10 +MAINTAINER="gokhlayeh@slitaz.org" 56.11 +PROVIDE="linux-usb-misc" 56.12 +WANTED="linux-libre" 56.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 56.14 + 56.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 56.16 +genpkg_rules() 56.17 +{ 56.18 + local path 56.19 + path=lib/modules/$VERSION-slitaz/kernel 56.20 + mkdir -p $fs/$path 56.21 + export src 56.22 + export _pkg 56.23 + $WOK/$WANTED/stuff/list_modules.sh drivers/usb/misc | while read module; do 56.24 + dir=$path/$(dirname $module) 56.25 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 56.26 + cp -a $_pkg/$path/$module $fs/$dir 56.27 + done 56.28 + 56.29 +} 56.30 + 56.31 +# Post install/remove commands for Tazpkg. 56.32 +post_install() 56.33 +{ 56.34 + chroot "$1/" depmod -a $VERSION-slitaz 56.35 +} 56.36 + 56.37 +post_remove() 56.38 +{ 56.39 + chroot "$1/" depmod -a $VERSION-slitaz 56.40 +} 56.41 +
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 57.2 +++ b/linux-libre-usbdsl/receipt Tue Mar 15 03:23:44 2011 +0100 57.3 @@ -0,0 +1,42 @@ 57.4 +# SliTaz package receipt. 57.5 + 57.6 +PACKAGE="linux-libre-usbdsl" 57.7 +VERSION="2.6.37-libre" 57.8 +CATEGORY="base-system" 57.9 +SHORT_DESC="The Linux Libre kernel usb dsl modem modules." 57.10 +MAINTAINER="gokhlayeh@slitaz.org" 57.11 +PROVIDE="linux-usbdsl" 57.12 +DEPENDS="linux-libre" 57.13 +WANTED="linux-libre" 57.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 57.15 + 57.16 + 57.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 57.18 +genpkg_rules() 57.19 +{ 57.20 + local path 57.21 + path=lib/modules/$VERSION-slitaz/kernel 57.22 + mkdir -p $fs/$path 57.23 + 57.24 + export src 57.25 + export _pkg 57.26 + 57.27 + $WOK/$WANTED/stuff/list_modules.sh drivers/usb/atm net/atm | \ 57.28 + while read module; do 57.29 + dir=$path/$(dirname $module) 57.30 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 57.31 + cp -a $_pkg/$path/$module $fs/$dir 57.32 + done 57.33 +} 57.34 + 57.35 +# Post install/remove commands for Tazpkg. 57.36 +post_install() 57.37 +{ 57.38 + chroot "$1/" depmod -a $VERSION-slitaz 57.39 +} 57.40 + 57.41 +post_remove() 57.42 +{ 57.43 + chroot "$1/" depmod -a $VERSION-slitaz 57.44 +} 57.45 +
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 58.2 +++ b/linux-libre-usbip/receipt Tue Mar 15 03:23:44 2011 +0100 58.3 @@ -0,0 +1,42 @@ 58.4 +# SliTaz package receipt. 58.5 + 58.6 +PACKAGE="linux-libre-usbip" 58.7 +VERSION="2.6.37-libre" 58.8 +CATEGORY="base-system" 58.9 +SHORT_DESC="The Linux Libre kernel usbip module." 58.10 +MAINTAINER="gokhlayeh@slitaz.org" 58.11 +PROVIDE="linux-usbip" 58.12 +DEPENDS="linux-libre" 58.13 +WANTED="linux-libre" 58.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 58.15 +PROVIDE="usbip-module" 58.16 + 58.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 58.18 +genpkg_rules() 58.19 +{ 58.20 + local path 58.21 + path=lib/modules/$VERSION-slitaz/kernel 58.22 + mkdir -p $fs/$path 58.23 + export src 58.24 + export _pkg 58.25 + $WOK/$WANTED/stuff/list_modules.sh drivers/staging/usbip | while read module; do 58.26 + dir=$path/$(dirname $module) 58.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 58.28 + cp -a $_pkg/$path/$module $fs/$dir 58.29 + done 58.30 +} 58.31 + 58.32 +# Post install/remove commands for Tazpkg. 58.33 +post_install() 58.34 +{ 58.35 + grep -qs ^${PACKAGE##*-}$ $1/etc/filesystems || \ 58.36 + echo "${PACKAGE##*-}" >> $1/etc/filesystems 58.37 + chroot "$1/" depmod -a $VERSION-slitaz 58.38 +} 58.39 + 58.40 +post_remove() 58.41 +{ 58.42 + sed -i "/^${PACKAGE##*-}\$/d" $1/etc/filesystems 58.43 + chroot "$1/" depmod -a $VERSION-slitaz 58.44 +} 58.45 +
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 59.2 +++ b/linux-libre-uwb/receipt Tue Mar 15 03:23:44 2011 +0100 59.3 @@ -0,0 +1,42 @@ 59.4 +# SliTaz package receipt. 59.5 + 59.6 +PACKAGE="linux-libre-uwb" 59.7 +VERSION="2.6.37-libre" 59.8 +CATEGORY="base-system" 59.9 +SHORT_DESC="The Linux Libre kernel uwb modules." 59.10 +MAINTAINER="gokhlayeh@slitaz.org" 59.11 +PROVIDE="linux-uwb" 59.12 +DEPENDS="linux-libre" 59.13 +WANTED="linux-libre" 59.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 59.15 + 59.16 + 59.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 59.18 +genpkg_rules() 59.19 +{ 59.20 + local path 59.21 + path=lib/modules/$VERSION-slitaz/kernel 59.22 + mkdir -p $fs/$path 59.23 + 59.24 + export src 59.25 + export _pkg 59.26 + 59.27 + $WOK/$WANTED/stuff/list_modules.sh drivers/uwb drivers/usb/wusbcore \ 59.28 + drivers/usb/host/whci | while read module; do 59.29 + dir=$path/$(dirname $module) 59.30 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 59.31 + cp -a $_pkg/$path/$module $fs/$dir 59.32 + done 59.33 +} 59.34 + 59.35 +# Post install/remove commands for Tazpkg. 59.36 +post_install() 59.37 +{ 59.38 + chroot "$1/" depmod -a $VERSION-slitaz 59.39 +} 59.40 + 59.41 +post_remove() 59.42 +{ 59.43 + chroot "$1/" depmod -a $VERSION-slitaz 59.44 +} 59.45 +
60.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 60.2 +++ b/linux-libre-video/receipt Tue Mar 15 03:23:44 2011 +0100 60.3 @@ -0,0 +1,41 @@ 60.4 +# SliTaz package receipt. 60.5 + 60.6 +PACKAGE="linux-libre-video" 60.7 +VERSION="2.6.37-libre" 60.8 +CATEGORY="base-system" 60.9 +SHORT_DESC="The Linux Libre kernel video modules." 60.10 +MAINTAINER="gokhlayeh@slitaz.org" 60.11 +PROVIDE="linux-video" 60.12 +DEPENDS="linux-libre" 60.13 +WANTED="linux-libre" 60.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 60.15 + 60.16 +# Modules paths and list 60.17 +MOD_PATH="lib/modules/$VERSION-slitaz/kernel" 60.18 +MODULES="drivers/video/backlight/lcd.ko.gz 60.19 +drivers/video/backlight/generic_bl.ko.gz 60.20 +drivers/gpio/bt8xxgpio.ko.gz" 60.21 + 60.22 +# Rules to gen a SliTaz package suitable for Tazpkg. 60.23 +genpkg_rules() 60.24 +{ 60.25 + mkdir -p ${fs}${MOD_PATH} 60.26 + for module in $MODULES 60.27 + do 60.28 + dir=$MOD_PATH/$(dirname $module) 60.29 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 60.30 + cp -a $_pkg/$MOD_PATH/$module $fs/$dir 60.31 + done 60.32 +} 60.33 + 60.34 +# Post install/remove commands for Tazpkg. 60.35 +post_install() 60.36 +{ 60.37 + chroot "$1/" depmod -a $VERSION-slitaz 60.38 +} 60.39 + 60.40 +post_remove() 60.41 +{ 60.42 + chroot "$1/" depmod -a $VERSION-slitaz 60.43 +} 60.44 +
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 61.2 +++ b/linux-libre-wimax/receipt Tue Mar 15 03:23:44 2011 +0100 61.3 @@ -0,0 +1,45 @@ 61.4 +# SliTaz package receipt. 61.5 + 61.6 +PACKAGE="linux-libre-wimax" 61.7 +VERSION="2.6.37-libre" 61.8 +CATEGORY="base-system" 61.9 +SHORT_DESC="The Linux Libre kernel wimax modules." 61.10 +MAINTAINER="gokhlayeh@slitaz.org" 61.11 +PROVIDE="linux-wimax" 61.12 +WANTED="linux-libre" 61.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 61.14 + 61.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 61.16 +genpkg_rules() 61.17 +{ 61.18 + local path 61.19 + path=lib/modules/$VERSION-slitaz/kernel 61.20 + mkdir -p $fs/$path 61.21 + 61.22 + export src 61.23 + export _pkg 61.24 + 61.25 + $WOK/$WANTED/stuff/list_modules.sh drivers/net/wimax net/wimax | while read module; do 61.26 + dir=$path/$(dirname $module) 61.27 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 61.28 + cp -a $_pkg/$path/$module $fs/$dir 61.29 + done 61.30 + 61.31 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 61.32 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 61.33 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 61.34 + fi 61.35 + done 61.36 +} 61.37 + 61.38 +# Post install/remove commands for Tazpkg. 61.39 +post_install() 61.40 +{ 61.41 + chroot "$1/" depmod -a $VERSION-slitaz 61.42 +} 61.43 + 61.44 +post_remove() 61.45 +{ 61.46 + chroot "$1/" depmod -a $VERSION-slitaz 61.47 +} 61.48 +
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 62.2 +++ b/linux-libre-wireless/receipt Tue Mar 15 03:23:44 2011 +0100 62.3 @@ -0,0 +1,51 @@ 62.4 +# SliTaz package receipt. 62.5 + 62.6 +PACKAGE="linux-libre-wireless" 62.7 +VERSION="2.6.37-libre" 62.8 +CATEGORY="base-system" 62.9 +SHORT_DESC="The Linux Libre kernel wireless modules." 62.10 +MAINTAINER="gokhlayeh@slitaz.org" 62.11 +PROVIDE="linux-wireless" 62.12 +WANTED="linux-libre" 62.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 62.14 +DEPENDS="linux-libre-crypto wireless_tools" 62.15 + 62.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 62.17 +genpkg_rules() 62.18 +{ 62.19 + local path 62.20 + path=lib/modules/$VERSION-slitaz/kernel 62.21 + mkdir -p $fs/$path 62.22 + 62.23 + export src 62.24 + export _pkg 62.25 + 62.26 + $WOK/$WANTED/stuff/list_modules.sh drivers/net/wireless drivers/staging/wlan-ng \ 62.27 + drivers/staging/rt2860 drivers/staging/rt2870 drivers/staging/echo \ 62.28 + drivers/leds net/wireless net/mac80211 drivers/staging/rtl8192e/r8192e_pci.ko.gz \ 62.29 + drivers/staging/rtl8187se/r8187se.ko.gz \ 62.30 + drivers/staging/rtl8192u/r8192u_usb.ko.gz drivers/staging/crystalhd/crystalhd.ko.gz \ 62.31 + drivers/staging/sm7xx/sm7xx.ko.gz | while read module; do 62.32 + dir=$path/$(dirname $module) 62.33 + [ -d $fs/$dir ] || mkdir -p $fs/$dir 62.34 + cp -a $_pkg/$path/$module $fs/$dir 62.35 + done 62.36 + 62.37 + for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do 62.38 + if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then 62.39 + rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i 62.40 + fi 62.41 + done 62.42 +} 62.43 + 62.44 +# Post install/remove commands for Tazpkg. 62.45 +post_install() 62.46 +{ 62.47 + chroot "$1/" depmod -a $VERSION-slitaz 62.48 +} 62.49 + 62.50 +post_remove() 62.51 +{ 62.52 + chroot "$1/" depmod -a $VERSION-slitaz 62.53 +} 62.54 +
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 63.2 +++ b/linux-libre-without-modules/receipt Tue Mar 15 03:23:44 2011 +0100 63.3 @@ -0,0 +1,18 @@ 63.4 +# SliTaz package receipt. 63.5 + 63.6 +PACKAGE="linux-libre-without-modules" 63.7 +VERSION="2.6.37-libre" 63.8 +CATEGORY="base-system" 63.9 +SHORT_DESC="The Linux Libre kernel without module support." 63.10 +MAINTAINER="gokhlayeh@slitaz.org" 63.11 +PROVIDE="linux-without-modules" 63.12 +WANTED="linux-libre" 63.13 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 63.14 + 63.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 63.16 +genpkg_rules() 63.17 +{ 63.18 + mkdir -p $fs/boot 63.19 + cp -a $_pkg/bzImage $fs/boot/vmlinuz-$VERSION-slitaz-without-modules 63.20 +} 63.21 +
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 64.2 +++ b/linux-libre/receipt Tue Mar 15 03:23:44 2011 +0100 64.3 @@ -0,0 +1,168 @@ 64.4 +# SliTaz package receipt. 64.5 + 64.6 +PACKAGE="linux-libre" 64.7 +VERSION="2.6.37-libre" 64.8 +CATEGORY="base-system" 64.9 +SHORT_DESC="The Linux Libre kernel and modules." 64.10 +DEPENDS="depmod" 64.11 +BUILD_DEPENDS="slitaz-toolchain perl git lzma patch" 64.12 +MAINTAINER="gokhlayeh@slitaz.org" 64.13 +PROVIDE="linux" 64.14 +TARBALL="linux-$VERSION.tar.bz2" 64.15 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 64.16 +WGET_URL="http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/$VERSION/$TARBALL" 64.17 +CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" 64.18 + 64.19 +# Rules to configure and make the package. 64.20 +compile_rules() 64.21 +{ 64.22 + 64.23 + # this is code to help update the kernel version faster 64.24 + #for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt) 64.25 + #do 64.26 + # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i 64.27 + #done 64.28 + report open-bloc 64.29 + 64.30 + _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 64.31 + AUFSDIR=$WOK/$PACKAGE/aufs-${_AUFSVER} 64.32 + tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; } 64.33 + cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src 64.34 + cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff 64.35 + cd $src 64.36 + # SliTaz db 64.37 + [ -d $WOK/$PACKAGE/slitaz ] && rm -rf $WOK/$PACKAGE/slitaz 2> /dev/null 64.38 + mkdir $WOK/$PACKAGE/slitaz 64.39 + echo "$WGET_URL" > slitaz/url 64.40 + cp $stuff/gztazmod.sh $stuff/list_modules.sh $WOK/$PACKAGE/slitaz 64.41 + cp $stuff/bootloader.sh $WOK/$PACKAGE/slitaz 64.42 + # Apply patches 64.43 + report step "Applying patches" 64.44 + while read patch_file; do 64.45 + echo "$patch_file" >> $WOK/$PACKAGE/slitaz/patches 64.46 + cp $stuff/$patch_file $WOK/$PACKAGE/slitaz 64.47 + if [ -f done.$patch_file ]; then 64.48 + echo "Skipping $patch_file" 64.49 + continue 64.50 + fi 64.51 + echo "Apply $patch_file" 64.52 + patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || { report close-bloc; return 1; } 64.53 + touch done.$patch_file 64.54 + done <<EOT 64.55 +$PACKAGE-diff-$VERSION.u 64.56 +$PACKAGE-unlzma-$VERSION.u 64.57 +$PACKAGE-header-$VERSION.u 64.58 +$PACKAGE-freeinitrd-$VERSION.u 64.59 +aufs2-base.patch 64.60 +aufs2-standalone.patch 64.61 +001-squashfs-decompressors-add-xz-decompressor-module.patch 64.62 +002-squashfs-decompressors-add-boot-time-xz-support.patch 64.63 +003-squashfs-x86-support-xz-compressed-kernel.patch 64.64 +004-squashfs-add-xz-compression-support.patch 64.65 +005-squashfs-add-xz-compression-configuration-option.patch 64.66 +EOT 64.67 + report step "Make kernel proper and then build lguest" 64.68 + make mrproper 64.69 + cd Documentation/lguest 64.70 + make lguest || { report close-bloc; return 1; } 64.71 + cd $src 64.72 + 64.73 + report step "Make bzImage without modules first" 64.74 + # Build bzImage without modules first 64.75 + cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config 64.76 + sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config 64.77 + # We can't keep every driver in staging 64.78 + sed -i -e 's/^CONFIG_RTL8192/#&/' \ 64.79 + -e 's/^CONFIG_R8187SE/#&/' \ 64.80 + -e 's/^CONFIG_RT2870/#&/' .config 64.81 + yes '' | make oldconfig 64.82 + make -j 4 bzImage || { report close-bloc; return 1; } 64.83 + [ -d $PWD/_pkg ] || mkdir -p $PWD/_pkg 64.84 + mv arch/x86/boot/bzImage $PWD/_pkg 64.85 + mv System.map System.map-without-modules 64.86 + 64.87 + report step "Now build bzImage with modules" 64.88 + # Build bzImage with modules 64.89 + cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config 64.90 + make oldconfig 64.91 + ln .config $WOK/$PACKAGE/slitaz/config 64.92 + make -j 4 bzImage && 64.93 + make -j 4 modules && 64.94 + make INSTALL_MOD_PATH=$PWD/_pkg modules_install && 64.95 + make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install && 64.96 + [ -s arch/x86/boot/bzImage ] || { report close-bloc; return 1; } 64.97 + mkdir -p $PWD/_pkg/boot 2> /dev/null 64.98 + mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz 64.99 + # Compress all modules. 64.100 + report step "Compressing all modules" 64.101 + $stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz 64.102 + ln System.map System.map-modules 64.103 + ln Module.symvers Module.symvers-modules 64.104 + report close-bloc 64.105 +} 64.106 + 64.107 +# Rules to gen a SliTaz package suitable for Tazpkg. 64.108 +genpkg_rules() 64.109 +{ 64.110 + local path 64.111 + cp -a $_pkg/boot $fs 64.112 + # Compress all modules. 64.113 + #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz 64.114 + path=$fs/lib/modules/$VERSION-slitaz/kernel 64.115 + mkdir -p $path 64.116 + cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \ 64.117 + $fs/lib/modules/$VERSION-slitaz 64.118 + # Get the base modules 64.119 + export src 64.120 + export _pkg 64.121 + mkdir $WOK/$PACKAGE/tmp 64.122 + $WOK/$PACKAGE/stuff/list_modules.sh \ 64.123 + $(cat stuff/modules-$VERSION.list) > $WOK/$PACKAGE/tmp/modules.list 64.124 + while read module; do 64.125 + dir=$(dirname $module) 64.126 + [ -d $path/$dir ] || mkdir -p $path/$dir 64.127 + cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir 64.128 + done < $WOK/$PACKAGE/tmp/modules.list 64.129 + # Remove unresolved links 64.130 + rm -f $fs/lib/modules/$VERSION-slitaz/build 64.131 + rm -f $fs/lib/modules/$VERSION-slitaz/source 64.132 + # Cook all packages with a kernel module 64.133 + for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt) 64.134 + do 64.135 + echo tazwok cook ${i%/receipt} 64.136 + done 64.137 + # Check and echo any module in kernel .config that's not added to 64.138 + # one of linux-* pkgs 64.139 + ./stuff/check_modules.sh 64.140 +} 64.141 + 64.142 +# Pre and post install commands for Tazpkg. 64.143 +post_install() 64.144 +{ 64.145 + echo "Processing post-install commands..." 64.146 + chroot "$1/" depmod -a $VERSION-slitaz 64.147 + # GRUB stuff. 64.148 + if [ -f "$1/boot/grub/menu.lst" ]; then 64.149 + root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` 64.150 + grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` 64.151 + # Add new kernel entry in case of upgrade for installed system. 64.152 + if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then 64.153 + cat >> $1/boot/grub/menu.lst << EOT 64.154 + 64.155 +title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 64.156 +$grub_dev 64.157 +kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev 64.158 +EOT 64.159 + fi 64.160 + # Display information message. 64.161 + cat <<EOT 64.162 +---- 64.163 +GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: 64.164 + 64.165 +title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 64.166 +$grub_dev 64.167 +kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev 64.168 +---- 64.169 +EOT 64.170 + fi 64.171 +}
65.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 65.2 +++ b/linux-libre/stuff/002-squashfs-decompressors-add-boot-time-xz-support.patch Tue Mar 15 03:23:44 2011 +0100 65.3 @@ -0,0 +1,638 @@ 65.4 +From: Lasse Collin <lasse.collin@tukaani.org> 65.5 +Date: Thu, 2 Dec 2010 19:14:37 +0000 (+0200) 65.6 +Subject: Decompressors: Add boot-time XZ support 65.7 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=c64bc9a229b46db75d7761601dd8ca25385a7780 65.8 + 65.9 +Decompressors: Add boot-time XZ support 65.10 + 65.11 +This implements the API defined in <linux/decompress/generic.h> 65.12 +which is used for kernel, initramfs, and initrd decompression. 65.13 +This patch together with the first patch is enough for 65.14 +XZ-compressed initramfs and initrd; XZ-compressed kernel will 65.15 +need arch-specific changes. 65.16 + 65.17 +In contrast to other initramfs compression methods, support for 65.18 +XZ-compressed initramfs is not enabled by default in usr/Kconfig. 65.19 +This is primarily due to the Kconfig options of the xz_dec 65.20 +module. It can be good to require that xz_dec is enabled 65.21 +separately so the user can select only the BCJ filters he needs 65.22 +when EMBEDDED=y. 65.23 + 65.24 +The buffering requirements described in decompress_unxz.c are 65.25 +stricter than with gzip, so the relevant changes should be done 65.26 +to the arch-specific code when adding support for XZ-compressed 65.27 +kernel. Similarly, the heap size in arch-specific pre-boot code 65.28 +may need to be increased (30 KiB is enough). 65.29 + 65.30 +The XZ decompressor needs memmove(), memeq() (memcmp() == 0), 65.31 +and memzero() (memset(ptr, 0, size)), which aren't available in 65.32 +all arch-specific pre-boot environments. I'm including simple 65.33 +versions in decompress_unxz.c, but a cleaner solution would 65.34 +naturally be nicer. 65.35 + 65.36 +Signed-off-by: Lasse Collin <lasse.collin@tukaani.org> 65.37 +--- 65.38 + 65.39 +diff --git a/include/linux/decompress/unxz.h b/include/linux/decompress/unxz.h 65.40 +new file mode 100644 65.41 +index 0000000..41728fc 65.42 +--- /dev/null 65.43 ++++ b/include/linux/decompress/unxz.h 65.44 +@@ -0,0 +1,19 @@ 65.45 ++/* 65.46 ++ * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd 65.47 ++ * 65.48 ++ * Author: Lasse Collin <lasse.collin@tukaani.org> 65.49 ++ * 65.50 ++ * This file has been put into the public domain. 65.51 ++ * You can do whatever you want with this file. 65.52 ++ */ 65.53 ++ 65.54 ++#ifndef DECOMPRESS_UNXZ_H 65.55 ++#define DECOMPRESS_UNXZ_H 65.56 ++ 65.57 ++int unxz(unsigned char *in, int in_size, 65.58 ++ int (*fill)(void *dest, unsigned int size), 65.59 ++ int (*flush)(void *src, unsigned int size), 65.60 ++ unsigned char *out, int *in_used, 65.61 ++ void (*error)(char *x)); 65.62 ++ 65.63 ++#endif 65.64 +diff --git a/init/Kconfig b/init/Kconfig 65.65 +index 2de5b1c..d9fbb0f 100644 65.66 +--- a/init/Kconfig 65.67 ++++ b/init/Kconfig 65.68 +@@ -123,13 +123,16 @@ config HAVE_KERNEL_BZIP2 65.69 + config HAVE_KERNEL_LZMA 65.70 + bool 65.71 + 65.72 ++config HAVE_KERNEL_XZ 65.73 ++ bool 65.74 ++ 65.75 + config HAVE_KERNEL_LZO 65.76 + bool 65.77 + 65.78 + choice 65.79 + prompt "Kernel compression mode" 65.80 + default KERNEL_GZIP 65.81 +- depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_LZO 65.82 ++ depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO 65.83 + help 65.84 + The linux kernel is a kind of self-extracting executable. 65.85 + Several compression algorithms are available, which differ 65.86 +@@ -174,6 +177,21 @@ config KERNEL_LZMA 65.87 + two. Compression is slowest. The kernel size is about 33% 65.88 + smaller with LZMA in comparison to gzip. 65.89 + 65.90 ++config KERNEL_XZ 65.91 ++ bool "XZ" 65.92 ++ depends on HAVE_KERNEL_XZ 65.93 ++ help 65.94 ++ XZ uses the LZMA2 algorithm and instruction set specific 65.95 ++ BCJ filters which can improve compression ratio of executable 65.96 ++ code. The size of the kernel is about 30% smaller with XZ in 65.97 ++ comparison to gzip. On architectures for which there is a BCJ 65.98 ++ filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ 65.99 ++ will create a few percent smaller kernel than plain LZMA. 65.100 ++ 65.101 ++ The speed is about the same as with LZMA: The decompression 65.102 ++ speed of XZ is better than that of bzip2 but worse than gzip 65.103 ++ and LZO. Compression is slow. 65.104 ++ 65.105 + config KERNEL_LZO 65.106 + bool "LZO" 65.107 + depends on HAVE_KERNEL_LZO 65.108 +diff --git a/lib/Kconfig b/lib/Kconfig 65.109 +index 6090314..45960e1 100644 65.110 +--- a/lib/Kconfig 65.111 ++++ b/lib/Kconfig 65.112 +@@ -122,6 +122,9 @@ config DECOMPRESS_BZIP2 65.113 + config DECOMPRESS_LZMA 65.114 + tristate 65.115 + 65.116 ++config DECOMPRESS_XZ 65.117 ++ tristate 65.118 ++ 65.119 + config DECOMPRESS_LZO 65.120 + select LZO_DECOMPRESS 65.121 + tristate 65.122 +diff --git a/lib/Makefile b/lib/Makefile 65.123 +index f2f98dd..06e3d8a 100644 65.124 +--- a/lib/Makefile 65.125 ++++ b/lib/Makefile 65.126 +@@ -75,6 +75,7 @@ obj-$(CONFIG_RAID6_PQ) += raid6/ 65.127 + lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o 65.128 + lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o 65.129 + lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o 65.130 ++lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o 65.131 + lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o 65.132 + 65.133 + obj-$(CONFIG_TEXTSEARCH) += textsearch.o 65.134 +diff --git a/lib/decompress.c b/lib/decompress.c 65.135 +index a760681..3d766b7 100644 65.136 +--- a/lib/decompress.c 65.137 ++++ b/lib/decompress.c 65.138 +@@ -8,6 +8,7 @@ 65.139 + 65.140 + #include <linux/decompress/bunzip2.h> 65.141 + #include <linux/decompress/unlzma.h> 65.142 ++#include <linux/decompress/unxz.h> 65.143 + #include <linux/decompress/inflate.h> 65.144 + #include <linux/decompress/unlzo.h> 65.145 + 65.146 +@@ -23,6 +24,9 @@ 65.147 + #ifndef CONFIG_DECOMPRESS_LZMA 65.148 + # define unlzma NULL 65.149 + #endif 65.150 ++#ifndef CONFIG_DECOMPRESS_XZ 65.151 ++# define unxz NULL 65.152 ++#endif 65.153 + #ifndef CONFIG_DECOMPRESS_LZO 65.154 + # define unlzo NULL 65.155 + #endif 65.156 +@@ -36,6 +40,7 @@ static const struct compress_format { 65.157 + { {037, 0236}, "gzip", gunzip }, 65.158 + { {0x42, 0x5a}, "bzip2", bunzip2 }, 65.159 + { {0x5d, 0x00}, "lzma", unlzma }, 65.160 ++ { {0xfd, 0x37}, "xz", unxz }, 65.161 + { {0x89, 0x4c}, "lzo", unlzo }, 65.162 + { {0, 0}, NULL, NULL } 65.163 + }; 65.164 +diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c 65.165 +new file mode 100644 65.166 +index 0000000..cecd23d 65.167 +--- /dev/null 65.168 ++++ b/lib/decompress_unxz.c 65.169 +@@ -0,0 +1,397 @@ 65.170 ++/* 65.171 ++ * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd 65.172 ++ * 65.173 ++ * Author: Lasse Collin <lasse.collin@tukaani.org> 65.174 ++ * 65.175 ++ * This file has been put into the public domain. 65.176 ++ * You can do whatever you want with this file. 65.177 ++ */ 65.178 ++ 65.179 ++/* 65.180 ++ * Important notes about in-place decompression 65.181 ++ * 65.182 ++ * At least on x86, the kernel is decompressed in place: the compressed data 65.183 ++ * is placed to the end of the output buffer, and the decompressor overwrites 65.184 ++ * most of the compressed data. There must be enough safety margin to 65.185 ++ * guarantee that the write position is always behind the read position. 65.186 ++ * 65.187 ++ * The safety margin for XZ with LZMA2 or BCJ+LZMA2 is calculated below. 65.188 ++ * Note that the margin with XZ is bigger than with Deflate (gzip)! 65.189 ++ * 65.190 ++ * The worst case for in-place decompression is that the beginning of 65.191 ++ * the file is compressed extremely well, and the rest of the file is 65.192 ++ * uncompressible. Thus, we must look for worst-case expansion when the 65.193 ++ * compressor is encoding uncompressible data. 65.194 ++ * 65.195 ++ * The structure of the .xz file in case of a compresed kernel is as follows. 65.196 ++ * Sizes (as bytes) of the fields are in parenthesis. 65.197 ++ * 65.198 ++ * Stream Header (12) 65.199 ++ * Block Header: 65.200 ++ * Block Header (8-12) 65.201 ++ * Compressed Data (N) 65.202 ++ * Block Padding (0-3) 65.203 ++ * CRC32 (4) 65.204 ++ * Index (8-20) 65.205 ++ * Stream Footer (12) 65.206 ++ * 65.207 ++ * Normally there is exactly one Block, but let's assume that there are 65.208 ++ * 2-4 Blocks just in case. Because Stream Header and also Block Header 65.209 ++ * of the first Block don't make the decompressor produce any uncompressed 65.210 ++ * data, we can ignore them from our calculations. Block Headers of possible 65.211 ++ * additional Blocks have to be taken into account still. With these 65.212 ++ * assumptions, it is safe to assume that the total header overhead is 65.213 ++ * less than 128 bytes. 65.214 ++ * 65.215 ++ * Compressed Data contains LZMA2 or BCJ+LZMA2 encoded data. Since BCJ 65.216 ++ * doesn't change the size of the data, it is enough to calculate the 65.217 ++ * safety margin for LZMA2. 65.218 ++ * 65.219 ++ * LZMA2 stores the data in chunks. Each chunk has a header whose size is 65.220 ++ * a maximum of 6 bytes, but to get round 2^n numbers, let's assume that 65.221 ++ * the maximum chunk header size is 8 bytes. After the chunk header, there 65.222 ++ * may be up to 64 KiB of actual payload in the chunk. Often the payload is 65.223 ++ * quite a bit smaller though; to be safe, let's assume that an average 65.224 ++ * chunk has only 32 KiB of payload. 65.225 ++ * 65.226 ++ * The maximum uncompressed size of the payload is 2 MiB. The minimum 65.227 ++ * uncompressed size of the payload is in practice never less than the 65.228 ++ * payload size itself. The LZMA2 format would allow uncompressed size 65.229 ++ * to be less than the payload size, but no sane compressor creates such 65.230 ++ * files. LZMA2 supports storing uncompressible data in uncompressed form, 65.231 ++ * so there's never a need to create payloads whose uncompressed size is 65.232 ++ * smaller than the compressed size. 65.233 ++ * 65.234 ++ * The assumption, that the uncompressed size of the payload is never 65.235 ++ * smaller than the payload itself, is valid only when talking about 65.236 ++ * the payload as a whole. It is possible that the payload has parts where 65.237 ++ * the decompressor consumes more input than it produces output. Calculating 65.238 ++ * the worst case for this would be tricky. Instead of trying to do that, 65.239 ++ * let's simply make sure that the decompressor never overwrites any bytes 65.240 ++ * of the payload which it is currently reading. 65.241 ++ * 65.242 ++ * Now we have enough information to calculate the safety margin. We need 65.243 ++ * - 128 bytes for the .xz file format headers; 65.244 ++ * - 8 bytes per every 32 KiB of uncompressed size (one LZMA2 chunk header 65.245 ++ * per chunk, each chunk having average payload size of 32 KiB); and 65.246 ++ * - 64 KiB (biggest possible LZMA2 chunk payload size) to make sure that 65.247 ++ * the decompressor never overwrites anything from the LZMA2 chunk 65.248 ++ * payload it is currently reading. 65.249 ++ * 65.250 ++ * We get the following formula: 65.251 ++ * 65.252 ++ * safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536 65.253 ++ * = 128 + (uncompressed_size >> 12) + 65536 65.254 ++ * 65.255 ++ * For comparision, according to arch/x86/boot/compressed/misc.c, the 65.256 ++ * equivalent formula for Deflate is this: 65.257 ++ * 65.258 ++ * safety_margin = 18 + (uncompressed_size >> 12) + 32768 65.259 ++ * 65.260 ++ * Thus, when updating Deflate-only in-place kernel decompressor to 65.261 ++ * support XZ, the fixed overhead has to be increased from 18+32768 bytes 65.262 ++ * to 128+65536 bytes. 65.263 ++ */ 65.264 ++ 65.265 ++/* 65.266 ++ * STATIC is defined to "static" if we are being built for kernel 65.267 ++ * decompression (pre-boot code). <linux/decompress/mm.h> will define 65.268 ++ * STATIC to empty if it wasn't already defined. Since we will need to 65.269 ++ * know later if we are being used for kernel decompression, we define 65.270 ++ * XZ_PREBOOT here. 65.271 ++ */ 65.272 ++#ifdef STATIC 65.273 ++# define XZ_PREBOOT 65.274 ++#endif 65.275 ++#ifdef __KERNEL__ 65.276 ++# include <linux/decompress/mm.h> 65.277 ++#endif 65.278 ++#define XZ_EXTERN STATIC 65.279 ++ 65.280 ++#ifndef XZ_PREBOOT 65.281 ++# include <linux/slab.h> 65.282 ++# include <linux/xz.h> 65.283 ++#else 65.284 ++/* 65.285 ++ * Use the internal CRC32 code instead of kernel's CRC32 module, which 65.286 ++ * is not available in early phase of booting. 65.287 ++ */ 65.288 ++#define XZ_INTERNAL_CRC32 1 65.289 ++ 65.290 ++/* 65.291 ++ * For boot time use, we enable only the BCJ filter of the current 65.292 ++ * architecture or none if no BCJ filter is available for the architecture. 65.293 ++ */ 65.294 ++#ifdef CONFIG_X86 65.295 ++# define XZ_DEC_X86 65.296 ++#endif 65.297 ++#ifdef CONFIG_PPC 65.298 ++# define XZ_DEC_POWERPC 65.299 ++#endif 65.300 ++#ifdef CONFIG_ARM 65.301 ++# define XZ_DEC_ARM 65.302 ++#endif 65.303 ++#ifdef CONFIG_IA64 65.304 ++# define XZ_DEC_IA64 65.305 ++#endif 65.306 ++#ifdef CONFIG_SPARC 65.307 ++# define XZ_DEC_SPARC 65.308 ++#endif 65.309 ++ 65.310 ++/* 65.311 ++ * This will get the basic headers so that memeq() and others 65.312 ++ * can be defined. 65.313 ++ */ 65.314 ++#include "xz/xz_private.h" 65.315 ++ 65.316 ++/* 65.317 ++ * Replace the normal allocation functions with the versions from 65.318 ++ * <linux/decompress/mm.h>. vfree() needs to support vfree(NULL) 65.319 ++ * when XZ_DYNALLOC is used, but the pre-boot free() doesn't support it. 65.320 ++ * Workaround it here because the other decompressors don't need it. 65.321 ++ */ 65.322 ++#undef kmalloc 65.323 ++#undef kfree 65.324 ++#undef vmalloc 65.325 ++#undef vfree 65.326 ++#define kmalloc(size, flags) malloc(size) 65.327 ++#define kfree(ptr) free(ptr) 65.328 ++#define vmalloc(size) malloc(size) 65.329 ++#define vfree(ptr) do { if (ptr != NULL) free(ptr); } while (0) 65.330 ++ 65.331 ++/* 65.332 ++ * FIXME: Not all basic memory functions are provided in architecture-specific 65.333 ++ * files (yet). We define our own versions here for now, but this should be 65.334 ++ * only a temporary solution. 65.335 ++ * 65.336 ++ * memeq and memzero are not used much and any remotely sane implementation 65.337 ++ * is fast enough. memcpy/memmove speed matters in multi-call mode, but 65.338 ++ * the kernel image is decompressed in single-call mode, in which only 65.339 ++ * memcpy speed can matter and only if there is a lot of uncompressible data 65.340 ++ * (LZMA2 stores uncompressible chunks in uncompressed form). Thus, the 65.341 ++ * functions below should just be kept small; it's probably not worth 65.342 ++ * optimizing for speed. 65.343 ++ */ 65.344 ++ 65.345 ++#ifndef memeq 65.346 ++static bool memeq(const void *a, const void *b, size_t size) 65.347 ++{ 65.348 ++ const uint8_t *x = a; 65.349 ++ const uint8_t *y = b; 65.350 ++ size_t i; 65.351 ++ 65.352 ++ for (i = 0; i < size; ++i) 65.353 ++ if (x[i] != y[i]) 65.354 ++ return false; 65.355 ++ 65.356 ++ return true; 65.357 ++} 65.358 ++#endif 65.359 ++ 65.360 ++#ifndef memzero 65.361 ++static void memzero(void *buf, size_t size) 65.362 ++{ 65.363 ++ uint8_t *b = buf; 65.364 ++ uint8_t *e = b + size; 65.365 ++ 65.366 ++ while (b != e) 65.367 ++ *b++ = '\0'; 65.368 ++} 65.369 ++#endif 65.370 ++ 65.371 ++#ifndef memmove 65.372 ++/* Not static to avoid a conflict with the prototype in the Linux headers. */ 65.373 ++void *memmove(void *dest, const void *src, size_t size) 65.374 ++{ 65.375 ++ uint8_t *d = dest; 65.376 ++ const uint8_t *s = src; 65.377 ++ size_t i; 65.378 ++ 65.379 ++ if (d < s) { 65.380 ++ for (i = 0; i < size; ++i) 65.381 ++ d[i] = s[i]; 65.382 ++ } else if (d > s) { 65.383 ++ i = size; 65.384 ++ while (i-- > 0) 65.385 ++ d[i] = s[i]; 65.386 ++ } 65.387 ++ 65.388 ++ return dest; 65.389 ++} 65.390 ++#endif 65.391 ++ 65.392 ++/* 65.393 ++ * Since we need memmove anyway, would use it as memcpy too. 65.394 ++ * Commented out for now to avoid breaking things. 65.395 ++ */ 65.396 ++/* 65.397 ++#ifndef memcpy 65.398 ++# define memcpy memmove 65.399 ++#endif 65.400 ++*/ 65.401 ++ 65.402 ++#include "xz/xz_crc32.c" 65.403 ++#include "xz/xz_dec_stream.c" 65.404 ++#include "xz/xz_dec_lzma2.c" 65.405 ++#include "xz/xz_dec_bcj.c" 65.406 ++ 65.407 ++#endif /* XZ_PREBOOT */ 65.408 ++ 65.409 ++/* Size of the input and output buffers in multi-call mode */ 65.410 ++#define XZ_IOBUF_SIZE 4096 65.411 ++ 65.412 ++/* 65.413 ++ * This function implements the API defined in <linux/decompress/generic.h>. 65.414 ++ * 65.415 ++ * This wrapper will automatically choose single-call or multi-call mode 65.416 ++ * of the native XZ decoder API. The single-call mode can be used only when 65.417 ++ * both input and output buffers are available as a single chunk, i.e. when 65.418 ++ * fill() and flush() won't be used. 65.419 ++ */ 65.420 ++STATIC int INIT unxz(unsigned char *in, int in_size, 65.421 ++ int (*fill)(void *dest, unsigned int size), 65.422 ++ int (*flush)(void *src, unsigned int size), 65.423 ++ unsigned char *out, int *in_used, 65.424 ++ void (*error)(char *x)) 65.425 ++{ 65.426 ++ struct xz_buf b; 65.427 ++ struct xz_dec *s; 65.428 ++ enum xz_ret ret; 65.429 ++ bool must_free_in = false; 65.430 ++ 65.431 ++#if XZ_INTERNAL_CRC32 65.432 ++ xz_crc32_init(); 65.433 ++#endif 65.434 ++ 65.435 ++ if (in_used != NULL) 65.436 ++ *in_used = 0; 65.437 ++ 65.438 ++ if (fill == NULL && flush == NULL) 65.439 ++ s = xz_dec_init(XZ_SINGLE, 0); 65.440 ++ else 65.441 ++ s = xz_dec_init(XZ_DYNALLOC, (uint32_t)-1); 65.442 ++ 65.443 ++ if (s == NULL) 65.444 ++ goto error_alloc_state; 65.445 ++ 65.446 ++ if (flush == NULL) { 65.447 ++ b.out = out; 65.448 ++ b.out_size = (size_t)-1; 65.449 ++ } else { 65.450 ++ b.out_size = XZ_IOBUF_SIZE; 65.451 ++ b.out = malloc(XZ_IOBUF_SIZE); 65.452 ++ if (b.out == NULL) 65.453 ++ goto error_alloc_out; 65.454 ++ } 65.455 ++ 65.456 ++ if (in == NULL) { 65.457 ++ must_free_in = true; 65.458 ++ in = malloc(XZ_IOBUF_SIZE); 65.459 ++ if (in == NULL) 65.460 ++ goto error_alloc_in; 65.461 ++ } 65.462 ++ 65.463 ++ b.in = in; 65.464 ++ b.in_pos = 0; 65.465 ++ b.in_size = in_size; 65.466 ++ b.out_pos = 0; 65.467 ++ 65.468 ++ if (fill == NULL && flush == NULL) { 65.469 ++ ret = xz_dec_run(s, &b); 65.470 ++ } else { 65.471 ++ do { 65.472 ++ if (b.in_pos == b.in_size && fill != NULL) { 65.473 ++ if (in_used != NULL) 65.474 ++ *in_used += b.in_pos; 65.475 ++ 65.476 ++ b.in_pos = 0; 65.477 ++ 65.478 ++ in_size = fill(in, XZ_IOBUF_SIZE); 65.479 ++ if (in_size < 0) { 65.480 ++ /* 65.481 ++ * This isn't an optimal error code 65.482 ++ * but it probably isn't worth making 65.483 ++ * a new one either. 65.484 ++ */ 65.485 ++ ret = XZ_BUF_ERROR; 65.486 ++ break; 65.487 ++ } 65.488 ++ 65.489 ++ b.in_size = in_size; 65.490 ++ } 65.491 ++ 65.492 ++ ret = xz_dec_run(s, &b); 65.493 ++ 65.494 ++ if (flush != NULL && (b.out_pos == b.out_size 65.495 ++ || (ret != XZ_OK && b.out_pos > 0))) { 65.496 ++ /* 65.497 ++ * Setting ret here may hide an error 65.498 ++ * returned by xz_dec_run(), but probably 65.499 ++ * it's not too bad. 65.500 ++ */ 65.501 ++ if (flush(b.out, b.out_pos) != (int)b.out_pos) 65.502 ++ ret = XZ_BUF_ERROR; 65.503 ++ 65.504 ++ b.out_pos = 0; 65.505 ++ } 65.506 ++ } while (ret == XZ_OK); 65.507 ++ 65.508 ++ if (must_free_in) 65.509 ++ free(in); 65.510 ++ 65.511 ++ if (flush != NULL) 65.512 ++ free(b.out); 65.513 ++ } 65.514 ++ 65.515 ++ if (in_used != NULL) 65.516 ++ *in_used += b.in_pos; 65.517 ++ 65.518 ++ xz_dec_end(s); 65.519 ++ 65.520 ++ switch (ret) { 65.521 ++ case XZ_STREAM_END: 65.522 ++ return 0; 65.523 ++ 65.524 ++ case XZ_MEM_ERROR: 65.525 ++ /* This can occur only in multi-call mode. */ 65.526 ++ error("XZ decompressor ran out of memory"); 65.527 ++ break; 65.528 ++ 65.529 ++ case XZ_FORMAT_ERROR: 65.530 ++ error("Input is not in the XZ format (wrong magic bytes)"); 65.531 ++ break; 65.532 ++ 65.533 ++ case XZ_OPTIONS_ERROR: 65.534 ++ error("Input was encoded with settings that are not " 65.535 ++ "supported by this XZ decoder"); 65.536 ++ break; 65.537 ++ 65.538 ++ case XZ_DATA_ERROR: 65.539 ++ case XZ_BUF_ERROR: 65.540 ++ error("XZ-compressed data is corrupt"); 65.541 ++ break; 65.542 ++ 65.543 ++ default: 65.544 ++ error("Bug in the XZ decompressor"); 65.545 ++ break; 65.546 ++ } 65.547 ++ 65.548 ++ return -1; 65.549 ++ 65.550 ++error_alloc_in: 65.551 ++ if (flush != NULL) 65.552 ++ free(b.out); 65.553 ++ 65.554 ++error_alloc_out: 65.555 ++ xz_dec_end(s); 65.556 ++ 65.557 ++error_alloc_state: 65.558 ++ error("XZ decompressor ran out of memory"); 65.559 ++ return -1; 65.560 ++} 65.561 ++ 65.562 ++/* 65.563 ++ * This macro is used by architecture-specific files to decompress 65.564 ++ * the kernel image. 65.565 ++ */ 65.566 ++#define decompress unxz 65.567 +diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh 65.568 +index 5958fff..55caecd 100644 65.569 +--- a/scripts/gen_initramfs_list.sh 65.570 ++++ b/scripts/gen_initramfs_list.sh 65.571 +@@ -243,6 +243,8 @@ case "$arg" in 65.572 + echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f" 65.573 + echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f" 65.574 + echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f" 65.575 ++ echo "$output_file" | grep -q "\.xz$" && \ 65.576 ++ compr="xz --check=crc32 --lzma2=dict=1MiB" 65.577 + echo "$output_file" | grep -q "\.lzo$" && compr="lzop -9 -f" 65.578 + echo "$output_file" | grep -q "\.cpio$" && compr="cat" 65.579 + shift 65.580 +diff --git a/usr/Kconfig b/usr/Kconfig 65.581 +index e2721f5..9f51a29 100644 65.582 +--- a/usr/Kconfig 65.583 ++++ b/usr/Kconfig 65.584 +@@ -72,6 +72,18 @@ config RD_LZMA 65.585 + Support loading of a LZMA encoded initial ramdisk or cpio buffer 65.586 + If unsure, say N. 65.587 + 65.588 ++config RD_XZ 65.589 ++ bool "Support initial ramdisks compressed using XZ" 65.590 ++ depends on BLK_DEV_INITRD && XZ_DEC=y 65.591 ++ select DECOMPRESS_XZ 65.592 ++ help 65.593 ++ Support loading of a XZ encoded initial ramdisk or cpio buffer. 65.594 ++ 65.595 ++ If this option is inactive, say Y to "XZ decompression support" 65.596 ++ under "Library routines" first. 65.597 ++ 65.598 ++ If unsure, say N. 65.599 ++ 65.600 + config RD_LZO 65.601 + bool "Support initial ramdisks compressed using LZO" if EMBEDDED 65.602 + default !EMBEDDED 65.603 +@@ -139,6 +151,15 @@ config INITRAMFS_COMPRESSION_LZMA 65.604 + three. Compression is slowest. The initramfs size is about 33% 65.605 + smaller with LZMA in comparison to gzip. 65.606 + 65.607 ++config INITRAMFS_COMPRESSION_XZ 65.608 ++ bool "XZ" 65.609 ++ depends on RD_XZ 65.610 ++ help 65.611 ++ XZ uses the LZMA2 algorithm. The initramfs size is about 30% 65.612 ++ smaller with XZ in comparison to gzip. Decompression speed 65.613 ++ is better than that of bzip2 but worse than gzip and LZO. 65.614 ++ Compression is slow. 65.615 ++ 65.616 + config INITRAMFS_COMPRESSION_LZO 65.617 + bool "LZO" 65.618 + depends on RD_LZO 65.619 +diff --git a/usr/Makefile b/usr/Makefile 65.620 +index 6b4b6da..5845a13 100644 65.621 +--- a/usr/Makefile 65.622 ++++ b/usr/Makefile 65.623 +@@ -15,6 +15,9 @@ suffix_$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) = .bz2 65.624 + # Lzma 65.625 + suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZMA) = .lzma 65.626 + 65.627 ++# XZ 65.628 ++suffix_$(CONFIG_INITRAMFS_COMPRESSION_XZ) = .xz 65.629 ++ 65.630 + # Lzo 65.631 + suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZO) = .lzo 65.632 + 65.633 +@@ -48,7 +51,7 @@ endif 65.634 + quiet_cmd_initfs = GEN $@ 65.635 + cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) 65.636 + 65.637 +-targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_data.cpio.lzo initramfs_data.cpio 65.638 ++targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_data.cpio.xz initramfs_data.cpio.lzo initramfs_data.cpio 65.639 + # do not try to update files included in initramfs 65.640 + $(deps_initramfs): ; 65.641 +
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 66.2 +++ b/linux-libre/stuff/003-squashfs-x86-support-xz-compressed-kernel.patch Tue Mar 15 03:23:44 2011 +0100 66.3 @@ -0,0 +1,128 @@ 66.4 +From: Lasse Collin <lasse.collin@tukaani.org> 66.5 +Date: Thu, 2 Dec 2010 19:14:57 +0000 (+0200) 66.6 +Subject: x86: Support XZ-compressed kernel 66.7 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=d4ad78414e5312126127b1f88cdaf8584af3eef1 66.8 + 66.9 +x86: Support XZ-compressed kernel 66.10 + 66.11 +This integrates the XZ decompression code to the x86 66.12 +pre-boot code. 66.13 + 66.14 +mkpiggy.c is updated to reserve about 32 KiB more buffer safety 66.15 +margin for kernel decompression. It is done unconditionally for 66.16 +all decompressors to keep the code simpler. 66.17 + 66.18 +The XZ decompressor needs around 30 KiB of heap, so the heap size 66.19 +is increased to 32 KiB on both x86-32 and x86-64. 66.20 + 66.21 +Documentation/x86/boot.txt is updated to list the XZ magic number. 66.22 + 66.23 +With the x86 BCJ filter in XZ, XZ-compressed x86 kernel tends to be 66.24 +a few percent smaller than the equivalent LZMA-compressed kernel. 66.25 + 66.26 +Signed-off-by: Lasse Collin <lasse.collin@tukaani.org> 66.27 +--- 66.28 + 66.29 +diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt 66.30 +index 30b43e1..3988cde 100644 66.31 +--- a/Documentation/x86/boot.txt 66.32 ++++ b/Documentation/x86/boot.txt 66.33 +@@ -621,9 +621,9 @@ Protocol: 2.08+ 66.34 + The payload may be compressed. The format of both the compressed and 66.35 + uncompressed data should be determined using the standard magic 66.36 + numbers. The currently supported compression formats are gzip 66.37 +- (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A) and LZMA 66.38 +- (magic number 5D 00). The uncompressed payload is currently always ELF 66.39 +- (magic number 7F 45 4C 46). 66.40 ++ (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA 66.41 ++ (magic number 5D 00), and XZ (magic number FD 37). The uncompressed 66.42 ++ payload is currently always ELF (magic number 7F 45 4C 46). 66.43 + 66.44 + Field name: payload_length 66.45 + Type: read 66.46 +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig 66.47 +index cea0cd9..f3db0d7 100644 66.48 +--- a/arch/x86/Kconfig 66.49 ++++ b/arch/x86/Kconfig 66.50 +@@ -51,6 +51,7 @@ config X86 66.51 + select HAVE_KERNEL_GZIP 66.52 + select HAVE_KERNEL_BZIP2 66.53 + select HAVE_KERNEL_LZMA 66.54 ++ select HAVE_KERNEL_XZ 66.55 + select HAVE_KERNEL_LZO 66.56 + select HAVE_HW_BREAKPOINT 66.57 + select HAVE_MIXED_BREAKPOINTS_REGS 66.58 +diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile 66.59 +index 0c22955..09664ef 100644 66.60 +--- a/arch/x86/boot/compressed/Makefile 66.61 ++++ b/arch/x86/boot/compressed/Makefile 66.62 +@@ -4,7 +4,7 @@ 66.63 + # create a compressed vmlinux image from the original vmlinux 66.64 + # 66.65 + 66.66 +-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o 66.67 ++targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o 66.68 + 66.69 + KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 66.70 + KBUILD_CFLAGS += -fno-strict-aliasing -fPIC 66.71 +@@ -49,12 +49,15 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE 66.72 + $(call if_changed,bzip2) 66.73 + $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE 66.74 + $(call if_changed,lzma) 66.75 ++$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE 66.76 ++ $(call if_changed,xzkern) 66.77 + $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE 66.78 + $(call if_changed,lzo) 66.79 + 66.80 + suffix-$(CONFIG_KERNEL_GZIP) := gz 66.81 + suffix-$(CONFIG_KERNEL_BZIP2) := bz2 66.82 + suffix-$(CONFIG_KERNEL_LZMA) := lzma 66.83 ++suffix-$(CONFIG_KERNEL_XZ) := xz 66.84 + suffix-$(CONFIG_KERNEL_LZO) := lzo 66.85 + 66.86 + quiet_cmd_mkpiggy = MKPIGGY $@ 66.87 +diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c 66.88 +index 8f7bef8..6d4cab7 100644 66.89 +--- a/arch/x86/boot/compressed/misc.c 66.90 ++++ b/arch/x86/boot/compressed/misc.c 66.91 +@@ -139,6 +139,10 @@ static int lines, cols; 66.92 + #include "../../../../lib/decompress_unlzma.c" 66.93 + #endif 66.94 + 66.95 ++#ifdef CONFIG_KERNEL_XZ 66.96 ++#include "../../../../lib/decompress_unxz.c" 66.97 ++#endif 66.98 ++ 66.99 + #ifdef CONFIG_KERNEL_LZO 66.100 + #include "../../../../lib/decompress_unlzo.c" 66.101 + #endif 66.102 +diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c 66.103 +index 5c22812..646aa78 100644 66.104 +--- a/arch/x86/boot/compressed/mkpiggy.c 66.105 ++++ b/arch/x86/boot/compressed/mkpiggy.c 66.106 +@@ -74,7 +74,7 @@ int main(int argc, char *argv[]) 66.107 + 66.108 + offs = (olen > ilen) ? olen - ilen : 0; 66.109 + offs += olen >> 12; /* Add 8 bytes for each 32K block */ 66.110 +- offs += 32*1024 + 18; /* Add 32K + 18 bytes slack */ 66.111 ++ offs += 64*1024 + 128; /* Add 64K + 128 bytes slack */ 66.112 + offs = (offs+4095) & ~4095; /* Round to a 4K boundary */ 66.113 + 66.114 + printf(".section \".rodata..compressed\",\"a\",@progbits\n"); 66.115 +diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h 66.116 +index 3b62ab5..5e1a2ee 100644 66.117 +--- a/arch/x86/include/asm/boot.h 66.118 ++++ b/arch/x86/include/asm/boot.h 66.119 +@@ -32,11 +32,7 @@ 66.120 + #define BOOT_HEAP_SIZE 0x400000 66.121 + #else /* !CONFIG_KERNEL_BZIP2 */ 66.122 + 66.123 +-#ifdef CONFIG_X86_64 66.124 +-#define BOOT_HEAP_SIZE 0x7000 66.125 +-#else 66.126 +-#define BOOT_HEAP_SIZE 0x4000 66.127 +-#endif 66.128 ++#define BOOT_HEAP_SIZE 0x8000 66.129 + 66.130 + #endif /* !CONFIG_KERNEL_BZIP2 */ 66.131 +
67.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 67.2 +++ b/linux-libre/stuff/004-squashfs-add-xz-compression-support.patch Tue Mar 15 03:23:44 2011 +0100 67.3 @@ -0,0 +1,183 @@ 67.4 +From: Phillip Lougher <phillip@lougher.demon.co.uk> 67.5 +Date: Thu, 9 Dec 2010 02:02:29 +0000 (+0000) 67.6 +Subject: Squashfs: add XZ compression support 67.7 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=d3e6969b9ff1f3a3c6bf3da71433c77046aa80e4 67.8 + 67.9 +Squashfs: add XZ compression support 67.10 + 67.11 +Add XZ decompressor wrapper code. 67.12 + 67.13 +Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk> 67.14 +--- 67.15 + 67.16 +diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h 67.17 +index c5137fc..39533fe 100644 67.18 +--- a/fs/squashfs/squashfs_fs.h 67.19 ++++ b/fs/squashfs/squashfs_fs.h 67.20 +@@ -238,6 +238,7 @@ struct meta_index { 67.21 + #define ZLIB_COMPRESSION 1 67.22 + #define LZMA_COMPRESSION 2 67.23 + #define LZO_COMPRESSION 3 67.24 ++#define XZ_COMPRESSION 4 67.25 + 67.26 + struct squashfs_super_block { 67.27 + __le32 s_magic; 67.28 +diff --git a/fs/squashfs/xz_wrapper.c b/fs/squashfs/xz_wrapper.c 67.29 +new file mode 100644 67.30 +index 0000000..053fe35 67.31 +--- /dev/null 67.32 ++++ b/fs/squashfs/xz_wrapper.c 67.33 +@@ -0,0 +1,153 @@ 67.34 ++/* 67.35 ++ * Squashfs - a compressed read only filesystem for Linux 67.36 ++ * 67.37 ++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 67.38 ++ * Phillip Lougher <phillip@lougher.demon.co.uk> 67.39 ++ * 67.40 ++ * This program is free software; you can redistribute it and/or 67.41 ++ * modify it under the terms of the GNU General Public License 67.42 ++ * as published by the Free Software Foundation; either version 2, 67.43 ++ * or (at your option) any later version. 67.44 ++ * 67.45 ++ * This program is distributed in the hope that it will be useful, 67.46 ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of 67.47 ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 67.48 ++ * GNU General Public License for more details. 67.49 ++ * 67.50 ++ * You should have received a copy of the GNU General Public License 67.51 ++ * along with this program; if not, write to the Free Software 67.52 ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 67.53 ++ * 67.54 ++ * xz_wrapper.c 67.55 ++ */ 67.56 ++ 67.57 ++ 67.58 ++#include <linux/mutex.h> 67.59 ++#include <linux/buffer_head.h> 67.60 ++#include <linux/slab.h> 67.61 ++#include <linux/xz.h> 67.62 ++ 67.63 ++#include "squashfs_fs.h" 67.64 ++#include "squashfs_fs_sb.h" 67.65 ++#include "squashfs_fs_i.h" 67.66 ++#include "squashfs.h" 67.67 ++#include "decompressor.h" 67.68 ++ 67.69 ++struct squashfs_xz { 67.70 ++ struct xz_dec *state; 67.71 ++ struct xz_buf buf; 67.72 ++}; 67.73 ++ 67.74 ++static void *squashfs_xz_init(struct squashfs_sb_info *msblk) 67.75 ++{ 67.76 ++ int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE); 67.77 ++ 67.78 ++ struct squashfs_xz *stream = kmalloc(sizeof(*stream), GFP_KERNEL); 67.79 ++ if (stream == NULL) 67.80 ++ goto failed; 67.81 ++ stream->state = xz_dec_init(XZ_PREALLOC, block_size); 67.82 ++ if (stream->state == NULL) 67.83 ++ goto failed; 67.84 ++ 67.85 ++ return stream; 67.86 ++ 67.87 ++failed: 67.88 ++ ERROR("Failed to allocate xz workspace\n"); 67.89 ++ kfree(stream); 67.90 ++ return NULL; 67.91 ++} 67.92 ++ 67.93 ++ 67.94 ++static void squashfs_xz_free(void *strm) 67.95 ++{ 67.96 ++ struct squashfs_xz *stream = strm; 67.97 ++ 67.98 ++ if (stream) { 67.99 ++ xz_dec_end(stream->state); 67.100 ++ kfree(stream); 67.101 ++ } 67.102 ++} 67.103 ++ 67.104 ++ 67.105 ++static int squashfs_xz_uncompress(struct squashfs_sb_info *msblk, void **buffer, 67.106 ++ struct buffer_head **bh, int b, int offset, int length, int srclength, 67.107 ++ int pages) 67.108 ++{ 67.109 ++ enum xz_ret xz_err; 67.110 ++ int avail, total = 0, k = 0, page = 0; 67.111 ++ struct squashfs_xz *stream = msblk->stream; 67.112 ++ 67.113 ++ mutex_lock(&msblk->read_data_mutex); 67.114 ++ 67.115 ++ xz_dec_reset(stream->state); 67.116 ++ stream->buf.in_pos = 0; 67.117 ++ stream->buf.in_size = 0; 67.118 ++ stream->buf.out_pos = 0; 67.119 ++ stream->buf.out_size = PAGE_CACHE_SIZE; 67.120 ++ stream->buf.out = buffer[page++]; 67.121 ++ 67.122 ++ do { 67.123 ++ if (stream->buf.in_pos == stream->buf.in_size && k < b) { 67.124 ++ avail = min(length, msblk->devblksize - offset); 67.125 ++ length -= avail; 67.126 ++ wait_on_buffer(bh[k]); 67.127 ++ if (!buffer_uptodate(bh[k])) 67.128 ++ goto release_mutex; 67.129 ++ 67.130 ++ if (avail == 0) { 67.131 ++ offset = 0; 67.132 ++ put_bh(bh[k++]); 67.133 ++ continue; 67.134 ++ } 67.135 ++ 67.136 ++ stream->buf.in = bh[k]->b_data + offset; 67.137 ++ stream->buf.in_size = avail; 67.138 ++ stream->buf.in_pos = 0; 67.139 ++ offset = 0; 67.140 ++ } 67.141 ++ 67.142 ++ if (stream->buf.out_pos == stream->buf.out_size 67.143 ++ && page < pages) { 67.144 ++ stream->buf.out = buffer[page++]; 67.145 ++ stream->buf.out_pos = 0; 67.146 ++ total += PAGE_CACHE_SIZE; 67.147 ++ } 67.148 ++ 67.149 ++ xz_err = xz_dec_run(stream->state, &stream->buf); 67.150 ++ 67.151 ++ if (stream->buf.in_pos == stream->buf.in_size && k < b) 67.152 ++ put_bh(bh[k++]); 67.153 ++ } while (xz_err == XZ_OK); 67.154 ++ 67.155 ++ if (xz_err != XZ_STREAM_END) { 67.156 ++ ERROR("xz_dec_run error, data probably corrupt\n"); 67.157 ++ goto release_mutex; 67.158 ++ } 67.159 ++ 67.160 ++ if (k < b) { 67.161 ++ ERROR("xz_uncompress error, input remaining\n"); 67.162 ++ goto release_mutex; 67.163 ++ } 67.164 ++ 67.165 ++ total += stream->buf.out_pos; 67.166 ++ mutex_unlock(&msblk->read_data_mutex); 67.167 ++ return total; 67.168 ++ 67.169 ++release_mutex: 67.170 ++ mutex_unlock(&msblk->read_data_mutex); 67.171 ++ 67.172 ++ for (; k < b; k++) 67.173 ++ put_bh(bh[k]); 67.174 ++ 67.175 ++ return -EIO; 67.176 ++} 67.177 ++ 67.178 ++const struct squashfs_decompressor squashfs_xz_comp_ops = { 67.179 ++ .init = squashfs_xz_init, 67.180 ++ .free = squashfs_xz_free, 67.181 ++ .decompress = squashfs_xz_uncompress, 67.182 ++ .id = XZ_COMPRESSION, 67.183 ++ .name = "xz", 67.184 ++ .supported = 1 67.185 ++}; 67.186 ++
68.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 68.2 +++ b/linux-libre/stuff/005-squashfs-add-xz-compression-configuration-option.patch Tue Mar 15 03:23:44 2011 +0100 68.3 @@ -0,0 +1,86 @@ 68.4 +From: Phillip Lougher <phillip@lougher.demon.co.uk> 68.5 +Date: Thu, 9 Dec 2010 02:08:31 +0000 (+0000) 68.6 +Subject: Squashfs: Add XZ compression configuration option 68.7 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=e23d468968e608de27328888240de27d7582ad52 68.8 + 68.9 +Squashfs: Add XZ compression configuration option 68.10 + 68.11 +Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk> 68.12 +--- 68.13 + 68.14 +diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig 68.15 +index e5f63da..e96d99a 100644 68.16 +--- a/fs/squashfs/Kconfig 68.17 ++++ b/fs/squashfs/Kconfig 68.18 +@@ -53,6 +53,22 @@ config SQUASHFS_LZO 68.19 + 68.20 + If unsure, say N. 68.21 + 68.22 ++config SQUASHFS_XZ 68.23 ++ bool "Include support for XZ compressed file systems" 68.24 ++ depends on SQUASHFS 68.25 ++ default n 68.26 ++ select XZ_DEC 68.27 ++ help 68.28 ++ Saying Y here includes support for reading Squashfs file systems 68.29 ++ compressed with XZ compresssion. XZ gives better compression than 68.30 ++ the default zlib compression, at the expense of greater CPU and 68.31 ++ memory overhead. 68.32 ++ 68.33 ++ XZ is not the standard compression used in Squashfs and so most 68.34 ++ file systems will be readable without selecting this option. 68.35 ++ 68.36 ++ If unsure, say N. 68.37 ++ 68.38 + config SQUASHFS_EMBEDDED 68.39 + bool "Additional option for memory-constrained systems" 68.40 + depends on SQUASHFS 68.41 +diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile 68.42 +index 7672bac..cecf2be 100644 68.43 +--- a/fs/squashfs/Makefile 68.44 ++++ b/fs/squashfs/Makefile 68.45 +@@ -7,3 +7,4 @@ squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o 68.46 + squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o 68.47 + squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o 68.48 + squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o 68.49 ++squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o 68.50 +diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c 68.51 +index 24af9ce..ac333b8 100644 68.52 +--- a/fs/squashfs/decompressor.c 68.53 ++++ b/fs/squashfs/decompressor.c 68.54 +@@ -46,6 +46,12 @@ static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = { 68.55 + }; 68.56 + #endif 68.57 + 68.58 ++#ifndef CONFIG_SQUASHFS_XZ 68.59 ++static const struct squashfs_decompressor squashfs_xz_unsupported_comp_ops = { 68.60 ++ NULL, NULL, NULL, XZ_COMPRESSION, "xz", 0 68.61 ++}; 68.62 ++#endif 68.63 ++ 68.64 + static const struct squashfs_decompressor squashfs_unknown_comp_ops = { 68.65 + NULL, NULL, NULL, 0, "unknown", 0 68.66 + }; 68.67 +@@ -58,6 +64,11 @@ static const struct squashfs_decompressor *decompressor[] = { 68.68 + #else 68.69 + &squashfs_lzo_unsupported_comp_ops, 68.70 + #endif 68.71 ++#ifdef CONFIG_SQUASHFS_XZ 68.72 ++ &squashfs_xz_comp_ops, 68.73 ++#else 68.74 ++ &squashfs_xz_unsupported_comp_ops, 68.75 ++#endif 68.76 + &squashfs_unknown_comp_ops 68.77 + }; 68.78 + 68.79 +diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h 68.80 +index 5d45569..1096e2e 100644 68.81 +--- a/fs/squashfs/squashfs.h 68.82 ++++ b/fs/squashfs/squashfs.h 68.83 +@@ -107,3 +107,6 @@ extern const struct squashfs_decompressor squashfs_zlib_comp_ops; 68.84 + 68.85 + /* lzo_wrapper.c */ 68.86 + extern const struct squashfs_decompressor squashfs_lzo_comp_ops; 68.87 ++ 68.88 ++/* xz_wrapper.c */ 68.89 ++extern const struct squashfs_decompressor squashfs_xz_comp_ops;
69.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 69.2 +++ b/linux-libre/stuff/aufs2-2.6.36-fix.patch Tue Mar 15 03:23:44 2011 +0100 69.3 @@ -0,0 +1,130 @@ 69.4 +diff --git a/fs/file_table.c b/fs/file_table.c 69.5 +index a04bdd8..fbf8908 100644 69.6 +--- a/fs/file_table.c 69.7 ++++ b/fs/file_table.c 69.8 +@@ -20,7 +20,6 @@ 69.9 + #include <linux/cdev.h> 69.10 + #include <linux/fsnotify.h> 69.11 + #include <linux/sysctl.h> 69.12 +-#include <linux/lglock.h> 69.13 + #include <linux/percpu_counter.h> 69.14 + #include <linux/percpu.h> 69.15 + #include <linux/ima.h> 69.16 +@@ -34,7 +33,6 @@ struct files_stat_struct files_stat = { 69.17 + .max_files = NR_FILE 69.18 + }; 69.19 + 69.20 +-DECLARE_LGLOCK(files_lglock); 69.21 + DEFINE_LGLOCK(files_lglock); 69.22 + 69.23 + /* SLAB cache for file structures */ 69.24 +@@ -394,37 +392,6 @@ void file_sb_list_del(struct file *file) 69.25 + } 69.26 + } 69.27 + 69.28 +-#ifdef CONFIG_SMP 69.29 +- 69.30 +-/* 69.31 +- * These macros iterate all files on all CPUs for a given superblock. 69.32 +- * files_lglock must be held globally. 69.33 +- */ 69.34 +-#define do_file_list_for_each_entry(__sb, __file) \ 69.35 +-{ \ 69.36 +- int i; \ 69.37 +- for_each_possible_cpu(i) { \ 69.38 +- struct list_head *list; \ 69.39 +- list = per_cpu_ptr((__sb)->s_files, i); \ 69.40 +- list_for_each_entry((__file), list, f_u.fu_list) 69.41 +- 69.42 +-#define while_file_list_for_each_entry \ 69.43 +- } \ 69.44 +-} 69.45 +- 69.46 +-#else 69.47 +- 69.48 +-#define do_file_list_for_each_entry(__sb, __file) \ 69.49 +-{ \ 69.50 +- struct list_head *list; \ 69.51 +- list = &(sb)->s_files; \ 69.52 +- list_for_each_entry((__file), list, f_u.fu_list) 69.53 +- 69.54 +-#define while_file_list_for_each_entry \ 69.55 +-} 69.56 +- 69.57 +-#endif 69.58 +- 69.59 + int fs_may_remount_ro(struct super_block *sb) 69.60 + { 69.61 + struct file *file; 69.62 +diff --git a/fs/statfs.c b/fs/statfs.c 69.63 +index 30ea8c8..9025c98 100644 69.64 +--- a/fs/statfs.c 69.65 ++++ b/fs/statfs.c 69.66 +@@ -61,6 +61,7 @@ int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) 69.67 + buf->f_frsize = buf->f_bsize; 69.68 + return retval; 69.69 + } 69.70 ++EXPORT_SYMBOL(statfs_by_dentry); 69.71 + 69.72 + int vfs_statfs(struct path *path, struct kstatfs *buf) 69.73 + { 69.74 +diff --git a/include/linux/fs.h b/include/linux/fs.h 69.75 +index 63d069b..741d296 100644 69.76 +--- a/include/linux/fs.h 69.77 ++++ b/include/linux/fs.h 69.78 +@@ -9,6 +9,7 @@ 69.79 + #include <linux/limits.h> 69.80 + #include <linux/ioctl.h> 69.81 + #include <linux/blk_types.h> 69.82 ++#include <linux/lglock.h> 69.83 + 69.84 + /* 69.85 + * It's silly to have NR_OPEN bigger than NR_FILE, but you can change 69.86 +@@ -1814,6 +1815,7 @@ extern struct vfsmount *collect_mounts(struct path *); 69.87 + extern void drop_collected_mounts(struct vfsmount *); 69.88 + extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 69.89 + struct vfsmount *); 69.90 ++extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf); 69.91 + extern int vfs_statfs(struct path *, struct kstatfs *); 69.92 + extern int statfs_by_dentry(struct dentry *, struct kstatfs *); 69.93 + extern int freeze_super(struct super_block *super); 69.94 +@@ -2481,5 +2483,39 @@ int __init get_filesystem_list(char *buf); 69.95 + #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ 69.96 + (flag & FMODE_NONOTIFY))) 69.97 + 69.98 ++ 69.99 ++DECLARE_LGLOCK(files_lglock); 69.100 ++ 69.101 ++#ifdef CONFIG_SMP 69.102 ++ 69.103 ++/* 69.104 ++ * These macros iterate all files on all CPUs for a given superblock. 69.105 ++ * files_lglock must be held globally. 69.106 ++ */ 69.107 ++#define do_file_list_for_each_entry(__sb, __file) \ 69.108 ++{ \ 69.109 ++ int i; \ 69.110 ++ for_each_possible_cpu(i) { \ 69.111 ++ struct list_head *list; \ 69.112 ++ list = per_cpu_ptr((__sb)->s_files, i); \ 69.113 ++ list_for_each_entry((__file), list, f_u.fu_list) 69.114 ++ 69.115 ++#define while_file_list_for_each_entry \ 69.116 ++ } \ 69.117 ++} 69.118 ++ 69.119 ++#else 69.120 ++ 69.121 ++#define do_file_list_for_each_entry(__sb, __file) \ 69.122 ++{ \ 69.123 ++ struct list_head *list; \ 69.124 ++ list = &(sb)->s_files; \ 69.125 ++ list_for_each_entry((__file), list, f_u.fu_list) 69.126 ++ 69.127 ++#define while_file_list_for_each_entry \ 69.128 ++} 69.129 ++ 69.130 ++#endif 69.131 ++ 69.132 + #endif /* __KERNEL__ */ 69.133 + #endif /* _LINUX_FS_H */
70.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 70.2 +++ b/linux-libre/stuff/aufs2-base.patch Tue Mar 15 03:23:44 2011 +0100 70.3 @@ -0,0 +1,78 @@ 70.4 +aufs2.1 base patch for linux-2.6.37 70.5 + 70.6 +diff --git a/fs/namei.c b/fs/namei.c 70.7 +index 4ff7ca5..a8c583f 100644 70.8 +--- a/fs/namei.c 70.9 ++++ b/fs/namei.c 70.10 +@@ -1161,12 +1161,12 @@ out: 70.11 + * needs parent already locked. Doesn't follow mounts. 70.12 + * SMP-safe. 70.13 + */ 70.14 +-static struct dentry *lookup_hash(struct nameidata *nd) 70.15 ++struct dentry *lookup_hash(struct nameidata *nd) 70.16 + { 70.17 + return __lookup_hash(&nd->last, nd->path.dentry, nd); 70.18 + } 70.19 + 70.20 +-static int __lookup_one_len(const char *name, struct qstr *this, 70.21 ++int __lookup_one_len(const char *name, struct qstr *this, 70.22 + struct dentry *base, int len) 70.23 + { 70.24 + unsigned long hash; 70.25 +diff --git a/fs/splice.c b/fs/splice.c 70.26 +index ce2f025..ff0ae69 100644 70.27 +--- a/fs/splice.c 70.28 ++++ b/fs/splice.c 70.29 +@@ -1092,8 +1092,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); 70.30 + /* 70.31 + * Attempt to initiate a splice from pipe to file. 70.32 + */ 70.33 +-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, 70.34 +- loff_t *ppos, size_t len, unsigned int flags) 70.35 ++long do_splice_from(struct pipe_inode_info *pipe, struct file *out, 70.36 ++ loff_t *ppos, size_t len, unsigned int flags) 70.37 + { 70.38 + ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, 70.39 + loff_t *, size_t, unsigned int); 70.40 +@@ -1120,9 +1120,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, 70.41 + /* 70.42 + * Attempt to initiate a splice from a file to a pipe. 70.43 + */ 70.44 +-static long do_splice_to(struct file *in, loff_t *ppos, 70.45 +- struct pipe_inode_info *pipe, size_t len, 70.46 +- unsigned int flags) 70.47 ++long do_splice_to(struct file *in, loff_t *ppos, 70.48 ++ struct pipe_inode_info *pipe, size_t len, 70.49 ++ unsigned int flags) 70.50 + { 70.51 + ssize_t (*splice_read)(struct file *, loff_t *, 70.52 + struct pipe_inode_info *, size_t, unsigned int); 70.53 +diff --git a/include/linux/namei.h b/include/linux/namei.h 70.54 +index 05b441d..91bc74e 100644 70.55 +--- a/include/linux/namei.h 70.56 ++++ b/include/linux/namei.h 70.57 +@@ -73,6 +73,9 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 70.58 + extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, 70.59 + int (*open)(struct inode *, struct file *)); 70.60 + 70.61 ++extern struct dentry *lookup_hash(struct nameidata *nd); 70.62 ++extern int __lookup_one_len(const char *name, struct qstr *this, 70.63 ++ struct dentry *base, int len); 70.64 + extern struct dentry *lookup_one_len(const char *, struct dentry *, int); 70.65 + 70.66 + extern int follow_down(struct path *); 70.67 +diff --git a/include/linux/splice.h b/include/linux/splice.h 70.68 +index 997c3b4..be9a153 100644 70.69 +--- a/include/linux/splice.h 70.70 ++++ b/include/linux/splice.h 70.71 +@@ -89,4 +89,10 @@ extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *); 70.72 + extern void splice_shrink_spd(struct pipe_inode_info *, 70.73 + struct splice_pipe_desc *); 70.74 + 70.75 ++extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out, 70.76 ++ loff_t *ppos, size_t len, unsigned int flags); 70.77 ++extern long do_splice_to(struct file *in, loff_t *ppos, 70.78 ++ struct pipe_inode_info *pipe, size_t len, 70.79 ++ unsigned int flags); 70.80 ++ 70.81 + #endif
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 71.2 +++ b/linux-libre/stuff/aufs2-kbuild.patch Tue Mar 15 03:23:44 2011 +0100 71.3 @@ -0,0 +1,35 @@ 71.4 +aufs2.1 kbuild patch for linux-2.6.37 71.5 + 71.6 +diff --git a/fs/Kconfig b/fs/Kconfig 71.7 +index 771f457..bb1a52f 100644 71.8 +--- a/fs/Kconfig 71.9 ++++ b/fs/Kconfig 71.10 +@@ -191,6 +191,7 @@ source "fs/romfs/Kconfig" 71.11 + source "fs/sysv/Kconfig" 71.12 + source "fs/ufs/Kconfig" 71.13 + source "fs/exofs/Kconfig" 71.14 ++source "fs/aufs/Kconfig" 71.15 + 71.16 + endif # MISC_FILESYSTEMS 71.17 + 71.18 +diff --git a/fs/Makefile b/fs/Makefile 71.19 +index a7f7cef..95dd4d3 100644 71.20 +--- a/fs/Makefile 71.21 ++++ b/fs/Makefile 71.22 +@@ -121,3 +121,4 @@ obj-$(CONFIG_BTRFS_FS) += btrfs/ 71.23 + obj-$(CONFIG_GFS2_FS) += gfs2/ 71.24 + obj-$(CONFIG_EXOFS_FS) += exofs/ 71.25 + obj-$(CONFIG_CEPH_FS) += ceph/ 71.26 ++obj-$(CONFIG_AUFS_FS) += aufs/ 71.27 +diff --git a/include/linux/Kbuild b/include/linux/Kbuild 71.28 +index 97319a8..7ebb4b4 100644 71.29 +--- a/include/linux/Kbuild 71.30 ++++ b/include/linux/Kbuild 71.31 +@@ -60,6 +60,7 @@ header-y += atmppp.h 71.32 + header-y += atmsap.h 71.33 + header-y += atmsvc.h 71.34 + header-y += audit.h 71.35 ++header-y += aufs_type.h 71.36 + header-y += auto_fs.h 71.37 + header-y += auto_fs4.h 71.38 + header-y += auxvec.h
72.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 72.2 +++ b/linux-libre/stuff/aufs2-module-2.6.36.patch Tue Mar 15 03:23:44 2011 +0100 72.3 @@ -0,0 +1,47 @@ 72.4 +diff --git a/ubuntu/aufs/branch.c b/ubuntu/aufs/branch.c 72.5 +index cd4463c..ff6b158 100644 72.6 +--- a/fs/aufs/branch.c 72.7 ++++ b/fs/aufs/branch.c 72.8 +@@ -22,6 +22,8 @@ 72.9 + 72.10 + #include <linux/file.h> 72.11 + #include <linux/statfs.h> 72.12 ++#include <linux/lglock.h> 72.13 ++#include <linux/percpu.h> 72.14 + #include "aufs.h" 72.15 + 72.16 + /* 72.17 +@@ -851,7 +853,8 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) 72.18 + goto out; 72.19 + 72.20 + /* no need file_list_lock() since sbinfo is locked? defered? */ 72.21 +- list_for_each_entry(file, &sb->s_files, f_u.fu_list) { 72.22 ++ lg_global_lock(files_lglock); 72.23 ++ do_file_list_for_each_entry(sb, file) { 72.24 + if (special_file(file->f_dentry->d_inode->i_mode)) 72.25 + continue; 72.26 + 72.27 +@@ -861,6 +864,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) 72.28 + err = -EBUSY; 72.29 + FiMustNoWaiters(file); 72.30 + fi_read_unlock(file); 72.31 ++ lg_global_unlock(files_lglock); 72.32 + goto out_free; 72.33 + } 72.34 + 72.35 +@@ -889,10 +893,13 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) 72.36 + if (p) { 72.37 + a = p; 72.38 + a[n++] = hf; 72.39 +- } else 72.40 ++ } else { 72.41 ++ lg_global_unlock(files_lglock); 72.42 + goto out_free; 72.43 ++ } 72.44 + } 72.45 +- } 72.46 ++ } while_file_list_for_each_entry; 72.47 ++ lg_global_unlock(files_lglock); 72.48 + 72.49 + err = 0; 72.50 + if (n)
73.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 73.2 +++ b/linux-libre/stuff/aufs2-standalone.patch Tue Mar 15 03:23:44 2011 +0100 73.3 @@ -0,0 +1,289 @@ 73.4 +aufs2.1 standalone patch for linux-2.6.37 73.5 + 73.6 +diff --git a/fs/file_table.c b/fs/file_table.c 73.7 +index c3dee38..f529e4d 100644 73.8 +--- a/fs/file_table.c 73.9 ++++ b/fs/file_table.c 73.10 +@@ -393,6 +393,8 @@ void file_sb_list_del(struct file *file) 73.11 + } 73.12 + } 73.13 + 73.14 ++EXPORT_SYMBOL(file_sb_list_del); 73.15 ++ 73.16 + #ifdef CONFIG_SMP 73.17 + 73.18 + /* 73.19 +diff --git a/fs/inode.c b/fs/inode.c 73.20 +index ae2727a..2c8071a 100644 73.21 +--- a/fs/inode.c 73.22 ++++ b/fs/inode.c 73.23 +@@ -82,6 +82,7 @@ static struct hlist_head *inode_hashtable __read_mostly; 73.24 + * the i_state of an inode while it is in use.. 73.25 + */ 73.26 + DEFINE_SPINLOCK(inode_lock); 73.27 ++EXPORT_SYMBOL(inode_lock); 73.28 + 73.29 + /* 73.30 + * iprune_sem provides exclusion between the kswapd or try_to_free_pages 73.31 +diff --git a/fs/namei.c b/fs/namei.c 73.32 +index a8c583f..b020c45 100644 73.33 +--- a/fs/namei.c 73.34 ++++ b/fs/namei.c 73.35 +@@ -347,6 +347,7 @@ int deny_write_access(struct file * file) 73.36 + 73.37 + return 0; 73.38 + } 73.39 ++EXPORT_SYMBOL(deny_write_access); 73.40 + 73.41 + /** 73.42 + * path_get - get a reference to a path 73.43 +@@ -1165,6 +1166,7 @@ struct dentry *lookup_hash(struct nameidata *nd) 73.44 + { 73.45 + return __lookup_hash(&nd->last, nd->path.dentry, nd); 73.46 + } 73.47 ++EXPORT_SYMBOL(lookup_hash); 73.48 + 73.49 + int __lookup_one_len(const char *name, struct qstr *this, 73.50 + struct dentry *base, int len) 73.51 +@@ -1187,6 +1189,7 @@ int __lookup_one_len(const char *name, struct qstr *this, 73.52 + this->hash = end_name_hash(hash); 73.53 + return 0; 73.54 + } 73.55 ++EXPORT_SYMBOL(__lookup_one_len); 73.56 + 73.57 + /** 73.58 + * lookup_one_len - filesystem helper to lookup single pathname component 73.59 +diff --git a/fs/namespace.c b/fs/namespace.c 73.60 +index 3dbfc07..3998762 100644 73.61 +--- a/fs/namespace.c 73.62 ++++ b/fs/namespace.c 73.63 +@@ -1321,6 +1321,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, 73.64 + } 73.65 + return 0; 73.66 + } 73.67 ++EXPORT_SYMBOL(iterate_mounts); 73.68 + 73.69 + static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end) 73.70 + { 73.71 +diff --git a/fs/notify/group.c b/fs/notify/group.c 73.72 +index d309f38..f0e9568 100644 73.73 +--- a/fs/notify/group.c 73.74 ++++ b/fs/notify/group.c 73.75 +@@ -22,6 +22,7 @@ 73.76 + #include <linux/srcu.h> 73.77 + #include <linux/rculist.h> 73.78 + #include <linux/wait.h> 73.79 ++#include <linux/module.h> 73.80 + 73.81 + #include <linux/fsnotify_backend.h> 73.82 + #include "fsnotify.h" 73.83 +@@ -70,6 +71,7 @@ void fsnotify_put_group(struct fsnotify_group *group) 73.84 + if (atomic_dec_and_test(&group->refcnt)) 73.85 + fsnotify_destroy_group(group); 73.86 + } 73.87 ++EXPORT_SYMBOL(fsnotify_put_group); 73.88 + 73.89 + /* 73.90 + * Create a new fsnotify_group and hold a reference for the group returned. 73.91 +@@ -102,3 +104,4 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) 73.92 + 73.93 + return group; 73.94 + } 73.95 ++EXPORT_SYMBOL(fsnotify_alloc_group); 73.96 +diff --git a/fs/notify/mark.c b/fs/notify/mark.c 73.97 +index 325185e..adede09 100644 73.98 +--- a/fs/notify/mark.c 73.99 ++++ b/fs/notify/mark.c 73.100 +@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) 73.101 + if (atomic_dec_and_test(&mark->refcnt)) 73.102 + mark->free_mark(mark); 73.103 + } 73.104 ++EXPORT_SYMBOL(fsnotify_put_mark); 73.105 + 73.106 + /* 73.107 + * Any time a mark is getting freed we end up here. 73.108 +@@ -190,6 +191,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark) 73.109 + if (unlikely(atomic_dec_and_test(&group->num_marks))) 73.110 + fsnotify_final_destroy_group(group); 73.111 + } 73.112 ++EXPORT_SYMBOL(fsnotify_destroy_mark); 73.113 + 73.114 + void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask) 73.115 + { 73.116 +@@ -277,6 +279,7 @@ err: 73.117 + 73.118 + return ret; 73.119 + } 73.120 ++EXPORT_SYMBOL(fsnotify_add_mark); 73.121 + 73.122 + /* 73.123 + * clear any marks in a group in which mark->flags & flags is true 73.124 +@@ -332,6 +335,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, 73.125 + atomic_set(&mark->refcnt, 1); 73.126 + mark->free_mark = free_mark; 73.127 + } 73.128 ++EXPORT_SYMBOL(fsnotify_init_mark); 73.129 + 73.130 + static int fsnotify_mark_destroy(void *ignored) 73.131 + { 73.132 +diff --git a/fs/open.c b/fs/open.c 73.133 +index 4197b9e..912817a 100644 73.134 +--- a/fs/open.c 73.135 ++++ b/fs/open.c 73.136 +@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, 73.137 + mutex_unlock(&dentry->d_inode->i_mutex); 73.138 + return ret; 73.139 + } 73.140 ++EXPORT_SYMBOL(do_truncate); 73.141 + 73.142 + static long do_sys_truncate(const char __user *pathname, loff_t length) 73.143 + { 73.144 +diff --git a/fs/splice.c b/fs/splice.c 73.145 +index ff0ae69..1c9e9b0 100644 73.146 +--- a/fs/splice.c 73.147 ++++ b/fs/splice.c 73.148 +@@ -1116,6 +1116,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out, 73.149 + 73.150 + return splice_write(pipe, out, ppos, len, flags); 73.151 + } 73.152 ++EXPORT_SYMBOL(do_splice_from); 73.153 + 73.154 + /* 73.155 + * Attempt to initiate a splice from a file to a pipe. 73.156 +@@ -1142,6 +1143,7 @@ long do_splice_to(struct file *in, loff_t *ppos, 73.157 + 73.158 + return splice_read(in, ppos, pipe, len, flags); 73.159 + } 73.160 ++EXPORT_SYMBOL(do_splice_to); 73.161 + 73.162 + /** 73.163 + * splice_direct_to_actor - splices data directly between two non-pipes 73.164 +diff --git a/security/commoncap.c b/security/commoncap.c 73.165 +index 64c2ed9..e58b5d8 100644 73.166 +--- a/security/commoncap.c 73.167 ++++ b/security/commoncap.c 73.168 +@@ -929,3 +929,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot, 73.169 + } 73.170 + return ret; 73.171 + } 73.172 ++EXPORT_SYMBOL(cap_file_mmap); 73.173 +diff --git a/security/device_cgroup.c b/security/device_cgroup.c 73.174 +index 8d9c48f..29108aa 100644 73.175 +--- a/security/device_cgroup.c 73.176 ++++ b/security/device_cgroup.c 73.177 +@@ -515,6 +515,7 @@ found: 73.178 + 73.179 + return -EPERM; 73.180 + } 73.181 ++EXPORT_SYMBOL(devcgroup_inode_permission); 73.182 + 73.183 + int devcgroup_inode_mknod(int mode, dev_t dev) 73.184 + { 73.185 +diff --git a/security/security.c b/security/security.c 73.186 +index 1b798d3..3b7d2ca 100644 73.187 +--- a/security/security.c 73.188 ++++ b/security/security.c 73.189 +@@ -360,6 +360,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode) 73.190 + return 0; 73.191 + return security_ops->path_mkdir(dir, dentry, mode); 73.192 + } 73.193 ++EXPORT_SYMBOL(security_path_mkdir); 73.194 + 73.195 + int security_path_rmdir(struct path *dir, struct dentry *dentry) 73.196 + { 73.197 +@@ -367,6 +368,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry) 73.198 + return 0; 73.199 + return security_ops->path_rmdir(dir, dentry); 73.200 + } 73.201 ++EXPORT_SYMBOL(security_path_rmdir); 73.202 + 73.203 + int security_path_unlink(struct path *dir, struct dentry *dentry) 73.204 + { 73.205 +@@ -374,6 +376,7 @@ int security_path_unlink(struct path *dir, struct dentry *dentry) 73.206 + return 0; 73.207 + return security_ops->path_unlink(dir, dentry); 73.208 + } 73.209 ++EXPORT_SYMBOL(security_path_unlink); 73.210 + 73.211 + int security_path_symlink(struct path *dir, struct dentry *dentry, 73.212 + const char *old_name) 73.213 +@@ -382,6 +385,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry, 73.214 + return 0; 73.215 + return security_ops->path_symlink(dir, dentry, old_name); 73.216 + } 73.217 ++EXPORT_SYMBOL(security_path_symlink); 73.218 + 73.219 + int security_path_link(struct dentry *old_dentry, struct path *new_dir, 73.220 + struct dentry *new_dentry) 73.221 +@@ -390,6 +394,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir, 73.222 + return 0; 73.223 + return security_ops->path_link(old_dentry, new_dir, new_dentry); 73.224 + } 73.225 ++EXPORT_SYMBOL(security_path_link); 73.226 + 73.227 + int security_path_rename(struct path *old_dir, struct dentry *old_dentry, 73.228 + struct path *new_dir, struct dentry *new_dentry) 73.229 +@@ -400,6 +405,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry, 73.230 + return security_ops->path_rename(old_dir, old_dentry, new_dir, 73.231 + new_dentry); 73.232 + } 73.233 ++EXPORT_SYMBOL(security_path_rename); 73.234 + 73.235 + int security_path_truncate(struct path *path) 73.236 + { 73.237 +@@ -407,6 +413,7 @@ int security_path_truncate(struct path *path) 73.238 + return 0; 73.239 + return security_ops->path_truncate(path); 73.240 + } 73.241 ++EXPORT_SYMBOL(security_path_truncate); 73.242 + 73.243 + int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 73.244 + mode_t mode) 73.245 +@@ -415,6 +422,7 @@ int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 73.246 + return 0; 73.247 + return security_ops->path_chmod(dentry, mnt, mode); 73.248 + } 73.249 ++EXPORT_SYMBOL(security_path_chmod); 73.250 + 73.251 + int security_path_chown(struct path *path, uid_t uid, gid_t gid) 73.252 + { 73.253 +@@ -422,6 +430,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid) 73.254 + return 0; 73.255 + return security_ops->path_chown(path, uid, gid); 73.256 + } 73.257 ++EXPORT_SYMBOL(security_path_chown); 73.258 + 73.259 + int security_path_chroot(struct path *path) 73.260 + { 73.261 +@@ -498,6 +507,7 @@ int security_inode_readlink(struct dentry *dentry) 73.262 + return 0; 73.263 + return security_ops->inode_readlink(dentry); 73.264 + } 73.265 ++EXPORT_SYMBOL(security_inode_readlink); 73.266 + 73.267 + int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd) 73.268 + { 73.269 +@@ -512,6 +522,7 @@ int security_inode_permission(struct inode *inode, int mask) 73.270 + return 0; 73.271 + return security_ops->inode_permission(inode, mask); 73.272 + } 73.273 ++EXPORT_SYMBOL(security_inode_permission); 73.274 + 73.275 + int security_inode_setattr(struct dentry *dentry, struct iattr *attr) 73.276 + { 73.277 +@@ -611,6 +622,7 @@ int security_file_permission(struct file *file, int mask) 73.278 + 73.279 + return fsnotify_perm(file, mask); 73.280 + } 73.281 ++EXPORT_SYMBOL(security_file_permission); 73.282 + 73.283 + int security_file_alloc(struct file *file) 73.284 + { 73.285 +@@ -638,6 +650,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot, 73.286 + return ret; 73.287 + return ima_file_mmap(file, prot); 73.288 + } 73.289 ++EXPORT_SYMBOL(security_file_mmap); 73.290 + 73.291 + int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, 73.292 + unsigned long prot)
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 74.2 +++ b/linux-libre/stuff/bootloader.sh Tue Mar 15 03:23:44 2011 +0100 74.3 @@ -0,0 +1,220 @@ 74.4 +#!/bin/sh 74.5 +# 74.6 +# This script creates a floppy image set from a linux bzImage and can merge 74.7 +# a cmdline and/or one or more initramfs. 74.8 +# The total size can not exceed 15M because INT 15H function 87H limitations. 74.9 +# 74.10 +# (C) 2009 Pascal Bellard - GNU General Public License v3. 74.11 + 74.12 +usage() 74.13 +{ 74.14 +cat <<EOT 74.15 +Usage: $0 bzImage [--prefix image_prefix] [--cmdline 'args'] 74.16 + [--rdev device] [--video mode] [--flags rootflags] [--tracks cnt] 74.17 + [--format 1440|1680|1920|2880 ] [--initrd initrdfile]... 74.18 + 74.19 +Default values: --format 1440 --tracks 80 --prefix floppy. 74.20 + 74.21 +Example: 74.22 +$0 /boot/vmlinuz-2.6.30.6 --rdev /dev/ram0 --video -3 --cmdline 'rw lang=fr_FR kmap=fr-latin1 laptop autologin' --initrd /boot/rootfs.gz --initrd ./myconfig.gz 74.23 +EOT 74.24 +exit 1 74.25 +} 74.26 + 74.27 +KERNEL="" 74.28 +INITRD="" 74.29 +CMDLINE="" 74.30 +PREFIX="floppy." 74.31 +FORMAT="1440" 74.32 +RDEV="" 74.33 +VIDEO="" 74.34 +FLAGS="" 74.35 +TRACKS="" 74.36 +DEBUG="" 74.37 +while [ -n "$1" ]; do 74.38 + case "$1" in 74.39 + --c*|-c*) CMDLINE="$2"; shift;; 74.40 + --i*|-i*) INITRD="$INITRD $2"; shift;; 74.41 + --p*|-p*) PREFIX="$2"; shift;; 74.42 + --fo*|-f*) FORMAT="$2"; shift;; 74.43 + --fl*) FLAGS="$2"; shift;; # 1 read-only, 0 read-write 74.44 + --r*|-r*) RDEV="$2"; shift;; # /dev/??? 74.45 + --v*|-v*) VIDEO="$2"; shift;; # -3 .. n 74.46 + --t*|-t*) TRACKS="$2"; shift;; # likely 81 .. 84 74.47 + --debug) DEBUG="1";; 74.48 + *) KERNEL="$1";; 74.49 + esac 74.50 + shift 74.51 +done 74.52 +[ -n "$KERNEL" -a -f "$KERNEL" ] || usage 74.53 +if [ -n "$TRACKS" ]; then 74.54 + if [ $(( $FORMAT % $TRACKS )) -ne 0 ]; then 74.55 + echo "Invalid track count for format $FORMAT." 74.56 + usage 74.57 + fi 74.58 +fi 74.59 + 74.60 +# write a 16 bits data 74.61 +# usage: store16 offset data16 file 74.62 +store16() 74.63 +{ 74.64 + n=$2; i=2; while [ $i -ne 0 ]; do 74.65 + printf '\\\\x%02X' $(($n & 255)) 74.66 + i=$(($i-1)); n=$(($n >> 8)) 74.67 + done | xargs echo -en | \ 74.68 + dd bs=2 conv=notrunc of=$3 seek=$(( $1 / 2 )) 2> /dev/null 74.69 + [ -n "$DEBUG" ] && printf "store16(%04X) = %04X\n" $1 $2 1>&2 74.70 +} 74.71 + 74.72 +# write a 32 bits data 74.73 +# usage: storelong offset data32 file 74.74 +storelong() 74.75 +{ 74.76 + n=$2; i=4; while [ $i -ne 0 ]; do 74.77 + printf '\\\\x%02X' $(($n & 255)) 74.78 + i=$(($i-1)); n=$(($n >> 8)) 74.79 + done | xargs echo -en | \ 74.80 + dd bs=4 conv=notrunc of=$3 seek=$(( $1 / 4 )) 2> /dev/null 74.81 + [ -n "$DEBUG" ] && printf "storelong(%04X) = %08X\n" $1 $2 1>&2 74.82 +} 74.83 + 74.84 +# read a 32 bits data 74.85 +# usage: getlong offset file 74.86 +getlong() 74.87 +{ 74.88 + dd if=$2 bs=1 skip=$(( $1 )) count=4 2> /dev/null | \ 74.89 + hexdump -e '"" 1/4 "%d" "\n"' 74.90 +} 74.91 + 74.92 +floppyset() 74.93 +{ 74.94 + # bzImage offsets 74.95 + CylinderCount=496 74.96 + SetupSzOfs=497 74.97 + FlagsOfs=498 74.98 + SyssizeOfs=500 74.99 + VideoModeOfs=506 74.100 + RootDevOfs=508 74.101 + CodeAdrOfs=0x214 74.102 + RamfsAdrOfs=0x218 74.103 + RamfsLenOfs=0x21C 74.104 + ArgPtrOfs=0x228 74.105 + 74.106 + # boot+setup address 74.107 + SetupBase=0x90000 74.108 + 74.109 + stacktop=0x9E00 74.110 + 74.111 + bs=/tmp/bs$$ 74.112 + 74.113 + # Get and patch boot sector 74.114 + # See http://hg.slitaz.org/wok/raw-file/711d076b277c/linux/stuff/linux-header-2.6.34.u 74.115 + dd if=$KERNEL bs=512 count=1 of=$bs 2> /dev/null 74.116 + uudecode <<EOT | dd of=$bs conv=notrunc 2> /dev/null 74.117 +begin-base64 644 - 74.118 +/L+6nWgAkAcGF4n8McC5HQDzq1sfD6mg8X1ABlfFd3ixBvOlZWaPR3gGH8ZF 74.119 ++D/6l1hB6DQBvgACA3QO6HYBWwseKAJ0LFNH6AoBXuhmAbAgzRCwCM0QTuhl 74.120 +ATwIdAOIBK05NigCdPDoPgE8CnXgiHz+ieb/TBD/TBi/9AGBTRz/gMdFMACc 74.121 +sBCxBUi0k4lEHLABiUQUmGaY0+BIZgMFZtPoaAAQB7+AACn4nHMCAccx21BW 74.122 +6J4AXrkAgLSH/kQczRVYnXfcoRoCvxwCsQk4RBxyuJPNE+oAACCQsEYoyL7b 74.123 +AejSAF3rI4D5E3IEOMF3a4D+AnIEOOZ3bGCB/QAGdCoGUlFTlrQCULEGtQTB 74.124 +xQSwDyHoBJAnFEAn6IwA/s117LAgzRDitOiWAJjNE2FSUCjIdwKwAZg5+HIC 74.125 +ifhQtALNE5VeWFpyoJVBjuGAxwJPdFFOdfSM4ZU4wXVFiMj+xrEBOOZ1O4j0 74.126 +/sW2AID9UHIwOi7wAXIqtQBgvt4B/kQMU+gxAFvoOAB1FlKYzRO4AQLNE1rQ 74.127 +1Dpk/nXqRgjkdeVh64sWB7AxLAO0DrsHAM0QPA1088OwDejv/6wIwHX4w79s 74.128 +BLFbZQINuA0BZToNdArNFnT0mM0Wju9Hw1g6AEluc2VydCBkaXNrIDEuBw0A 74.129 +AA== 74.130 +==== 74.131 +EOT 74.132 + 74.133 + # Get setup 74.134 + setupsz=$(getlong $SetupSzOfs $bs) 74.135 + setupszb=$(( $setupsz & 255 )) 74.136 + dd if=$KERNEL bs=512 skip=1 count=$setupszb 2> /dev/null >> $bs 74.137 + 74.138 + if [ -n "$TRACKS" ]; then 74.139 + [ -n "$DEBUG" ] && echo -n "--tracks " 1>&2 74.140 + n=$(getlong $CylinderCount $bs) 74.141 + store16 $CylinderCount $(( ($n & -256) + $TRACKS )) $bs 74.142 + fi 74.143 + if [ -n "$FLAGS" ]; then 74.144 + [ -n "$DEBUG" ] && echo -n "--flags " 1>&2 74.145 + store16 $FlagsOfs $FLAGS $bs 74.146 + fi 74.147 + if [ -n "$VIDEO" ]; then 74.148 + [ -n "$DEBUG" ] && echo -n "--video " 1>&2 74.149 + store16 $VideoModeOfs $VIDEO $bs 74.150 + fi 74.151 + if [ -n "$RDEV" ]; then 74.152 + [ -n "$DEBUG" ] && echo -n "--rdev " 1>&2 74.153 + n=$(stat -c '0x%02t%02T' $RDEV 2> /dev/null) 74.154 + [ -n "$n" ] || n=$RDEV 74.155 + store16 $RootDevOfs $n $bs 74.156 + fi 74.157 + 74.158 + # Store cmdline after setup 74.159 + if [ -n "$CMDLINE" ]; then 74.160 + [ -n "$DEBUG" ] && echo -n "--cmdline '$CMDLINE' " 1>&2 74.161 + echo -n "$CMDLINE" | dd bs=512 count=1 conv=sync 2> /dev/null >> $bs 74.162 + storelong $ArgPtrOfs $(( $SetupBase + $stacktop )) $bs 74.163 + fi 74.164 + 74.165 + # Compute initramfs size 74.166 + initrdlen=0 74.167 + padding=0 74.168 + for i in $( echo $INITRD | sed 's/,/ /' ); do 74.169 + [ -s "$i" ] || continue 74.170 + [ -n "$DEBUG" ] && echo "--initrd $i " 1>&2 74.171 + initrdlen=$(( $initrdlen + $padding )) 74.172 + padding=$(stat -c %s $i) 74.173 + initrdlen=$(( $initrdlen + $padding )) 74.174 + padding=$(( 4096 - ($padding & 4095) )) 74.175 + [ $padding -eq 4096 ] && padding=0 74.176 + done 74.177 + Ksize=$(( $(getlong $SyssizeOfs $bs)*16 )) 74.178 + Kpad=$(( (($Ksize+4095)/4096)*4096 - Ksize )) 74.179 + if [ $initrdlen -ne 0 ]; then 74.180 + [ -n "$DEBUG" ] && echo "initrdlen = $initrdlen " 1>&2 74.181 + Kbase=$(getlong $CodeAdrOfs $bs) 74.182 + storelong $RamfsAdrOfs \ 74.183 + $(( (0x1000000 - $initrdlen) & 0xFFFF0000 )) $bs 74.184 + storelong $RamfsLenOfs $(( ($initrdlen + 3) & -4 )) $bs 74.185 + fi 74.186 + 74.187 + # Output boot sector + setup + cmdline 74.188 + dd if=$bs 2> /dev/null 74.189 + 74.190 + # Output kernel code 74.191 + dd if=$KERNEL bs=512 skip=$(( $setupszb + 1 )) 2> /dev/null 74.192 + 74.193 + # Pad to next sector 74.194 + Kpad=$(( 512 - ($(stat -c %s $KERNEL) & 511) )) 74.195 + [ $Kpad -eq 512 ] || dd if=/dev/zero bs=1 count=$Kpad 2> /dev/null 74.196 + 74.197 + # Output initramfs 74.198 + padding=0 74.199 + for i in $( echo $INITRD | sed 's/,/ /' ); do 74.200 + [ -s "$i" ] || continue 74.201 + [ $padding -ne 0 ] && dd if=/dev/zero bs=1 count=$padding 2> /dev/null 74.202 + dd if=$i 2> /dev/null 74.203 + padding=$(( 4 - ($(stat -c %s $i) & 3) )) 74.204 + [ $padding -eq 4 ] && padding=0 74.205 + done 74.206 + 74.207 + # Cleanup 74.208 + rm -f $bs 74.209 +} 74.210 + 74.211 +if [ "$FORMAT" == "0" ]; then # unsplitted 74.212 + floppyset > $PREFIX 74.213 + exit 74.214 +fi 74.215 +floppyset | split -b ${FORMAT}k /dev/stdin floppy$$ 74.216 +i=1 74.217 +ls floppy$$* | while read file ; do 74.218 + output=$PREFIX$(printf "%03d" $i) 74.219 + cat $file /dev/zero | dd bs=1k count=$FORMAT conv=sync of=$output 2> /dev/null 74.220 + echo $output 74.221 + rm -f $file 74.222 + i=$(( $i + 1 )) 74.223 +done
75.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 75.2 +++ b/linux-libre/stuff/check_modules.sh Tue Mar 15 03:23:44 2011 +0100 75.3 @@ -0,0 +1,54 @@ 75.4 +#!/bin/sh 75.5 +# Echo any module in kernel .config that's not added to one of linux-libre-* pkgs 75.6 +# (c) SliTaz - GNU General Public License. 75.7 +# 20090618 <jozee@slitaz.org> 75.8 +# 20100528 <pankso@slitaz.org> 75.9 +# 75.10 +#. /etc/slitaz/slitaz.conf 75.11 + 75.12 +#WOK=$LOCAL_REPOSITORY/wok 75.13 +WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/') 75.14 +VERSION=`grep ^VERSION= $WOK/linux-libre/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 75.15 +src="$WOK/linux-libre/linux-$VERSION" 75.16 + 75.17 +cd $src 75.18 +mkdir -p $WOK/$PACKAGE/tmp 75.19 +rm -f $WOK/$PACKAGE/tmp/* 75.20 + 75.21 +echo -e "\nChecking for modules selected in .config but not in linux-libre-* pkgs" 75.22 +echo "======================================================================" 75.23 + 75.24 +# create a packaged modules list 75.25 +cat ../stuff/modules-"$VERSION".list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list 75.26 + 75.27 +for i in $(cd $WOK; ls -d linux-libre-*) 75.28 +do 75.29 + tazpath="taz/$i-$VERSION" 75.30 + for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz") 75.31 + do 75.32 + basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list 75.33 + done 75.34 +done 75.35 +# get the original list in .config 75.36 +for i in $(find $_pkg -iname "*.ko.gz") 75.37 +do 75.38 + basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list 75.39 +done 75.40 +# compare original .config and pkged modules 75.41 +for i in $(cat $WOK/$PACKAGE/tmp/originial-$VERSION.list) 75.42 +do 75.43 + if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then 75.44 + modpath=`find $_pkg -iname "$i"` 75.45 + echo "Orphan module: $i" 75.46 + echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list 75.47 + fi 75.48 +done 75.49 +if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then 75.50 + echo "======================================================================" 75.51 + echo -e "Check linux-libre/tmp/unpackaged-modules-$VERSION.list for mod path\n" 75.52 +else 75.53 + echo -e "\nAll modules are packaged\n" 75.54 + echo "======================================================================" 75.55 + echo "" 75.56 + rm -rf $WOK/$PACKAGE/tmp 75.57 +fi
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 76.2 +++ b/linux-libre/stuff/gztazmod.sh Tue Mar 15 03:23:44 2011 +0100 76.3 @@ -0,0 +1,67 @@ 76.4 +#!/bin/sh 76.5 +# gztazmod.sh: Compress Linux kernel modules for SliTaz GNU/Linux. 76.6 +# 2007/10/04 <pankso@slitaz.org> - GNU General Public License. 76.7 +# 76.8 + 76.9 +# We do our work in the kernel version modules directory. 76.10 +if [ -z "$1" ] ; then 76.11 + echo "" 76.12 + echo -e "\033[1musage:\033[0m `basename $0` path/to/kernel-version" 76.13 + echo "" 76.14 + exit 1 76.15 +fi 76.16 + 76.17 +if [ ! -r "$1" ] ; then 76.18 + echo "" 76.19 + echo -e "Error : $1 does not exist." 76.20 + echo "" 76.21 + exit 1 76.22 +fi 76.23 + 76.24 +cd $1 76.25 + 76.26 +# Status functions. 76.27 +status() 76.28 +{ 76.29 + local CHECK=$? 76.30 + echo -en "\\033[70G[ " 76.31 + if [ $CHECK = 0 ]; then 76.32 + echo -en "\\033[1;33mOK" 76.33 + else 76.34 + echo -en "\\033[1;31mFailed" 76.35 + fi 76.36 + echo -e "\\033[0;39m ]" 76.37 +} 76.38 + 76.39 +# Script start. 76.40 +echo "" 76.41 +echo "Starting gztazmod.sh to build compressed kernel modules... " 76.42 +echo "" 76.43 + 76.44 +# Find all modules. 76.45 +echo -n "Searching all modules to compress them... " 76.46 +find . -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null 76.47 +status 76.48 +find . -name "*.ko" -exec rm '{}' \; 76.49 + 76.50 +# Build a new temporary modules.dep. 76.51 +echo -n "Building tmp.dep... " 76.52 +sed 's/\.ko.gz/.ko/g' modules.dep > tmp.dep 76.53 +sed -i 's/\.ko.gz/.ko/g' tmp.dep 76.54 +sed -i 's/\.ko/.ko.gz/g' tmp.dep 76.55 +status 76.56 + 76.57 +# Destroy original modules.dep 76.58 +echo -n "Destroying modules.dep... " 76.59 +rm modules.dep 76.60 +status 76.61 + 76.62 +# Remove tmp.dep to modules.dep. 76.63 +echo -n "Removing tmp.dep to modules.dep... " 76.64 +mv tmp.dep modules.dep 76.65 +status 76.66 + 76.67 +# Script end. 76.68 +echo "" 76.69 +echo "Kernel modules `basename $1` are ready." 76.70 +echo ""
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 77.2 +++ b/linux-libre/stuff/linux-libre-diff-2.6.37-libre.u Tue Mar 15 03:23:44 2011 +0100 77.3 @@ -0,0 +1,40 @@ 77.4 +--- linux-2.6.30.6/arch/x86/vdso/Makefile 77.5 ++++ linux-2.6.30.6/arch/x86/vdso/Makefile 77.6 +@@ -104,10 +104,12 @@ 77.7 + $(foreach H,$(filter-out FORCE,$^),\ 77.8 + if grep -q VDSO32_SYSENTER_RETURN $H; \ 77.9 + then diff -u $(@D)/.tmp_$(@F) $H; \ 77.10 +- else sed /VDSO32_SYSENTER_RETURN/d $(@D)/.tmp_$(@F) | \ 77.11 +- diff -u - $H; fi &&) : ;\ 77.12 ++ else sed /VDSO32_SYSENTER_RETURN/d $(@D)/.tmp_$(@F) > \ 77.13 ++ $(@D)/.tmp_$(@F).$$ ; \ 77.14 ++ diff -u $(@D)/.tmp_$(@F).$$ $H; fi &&) : ;\ 77.15 + then mv -f $(@D)/.tmp_$(@F) $@; \ 77.16 +- else rm -f $(@D)/.tmp_$(@F); exit 1; \ 77.17 ++ else rm -f $(@D)/.tmp_$(@F)*; exit 1; \ 77.18 ++ rm -f $(@D)/.tmp_$(@F)*; \ 77.19 + fi 77.20 + endef 77.21 + 77.22 + 77.23 +--- linux-2.6.34/scripts/Makefile.lib 77.24 ++++ linux-2.6.34/scripts/Makefile.lib 77.25 +@@ -204,7 +204,8 @@ 77.26 + # --------------------------------------------------------------------------- 77.27 + 77.28 + quiet_cmd_gzip = GZIP $@ 77.29 +-cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ 77.30 ++cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) && \ 77.31 ++ ( which advdef > /dev/null && advdef -z $@ ; true ) || \ 77.32 + (rm -f $@ ; false) 77.33 + 77.34 + 77.35 +@@ -238,7 +239,7 @@ 77.36 + 77.37 + quiet_cmd_lzma = LZMA $@ 77.38 + cmd_lzma = (cat $(filter-out FORCE,$^) | \ 77.39 +- lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ 77.40 ++ lzma e -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ 77.41 + (rm -f $@ ; false) 77.42 + 77.43 + quiet_cmd_lzo = LZO $@
78.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 78.2 +++ b/linux-libre/stuff/linux-libre-freeinitrd-2.6.37-libre.u Tue Mar 15 03:23:44 2011 +0100 78.3 @@ -0,0 +1,129 @@ 78.4 +--- linux-2.6.30.4/arch/x86/mm/init.c 78.5 ++++ linux-2.6.30.4/arch/x86/mm/init.c 78.6 +@@ -366,7 +366,7 @@ 78.7 + */ 78.8 + set_memory_rw(begin, (end - begin) >> PAGE_SHIFT); 78.9 + 78.10 +- printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10); 78.11 ++ if (what) printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10); 78.12 + 78.13 + for (; addr < end; addr += PAGE_SIZE) { 78.14 + ClearPageReserved(virt_to_page(addr)); 78.15 + 78.16 +--- linux-2.6.30.4/init/initramfs.c 78.17 ++++ linux-2.6.30.4/init/initramfs.c 78.18 +@@ -374,6 +374,52 @@ 78.19 + [Reset] = do_reset, 78.20 + }; 78.21 + 78.22 ++#include <linux/initrd.h> 78.23 ++#define INITRD_PAGE ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) 78.24 ++#define INITRD_DOT (1024*1024) 78.25 ++ 78.26 ++static void free_rootfs_mem(unsigned long start, unsigned long end) 78.27 ++{ 78.28 ++ free_init_pages(NULL, start, end); 78.29 ++} 78.30 ++ 78.31 ++static void _free_initrd(unsigned long initrd_start, unsigned long initrd_end, 78.32 ++ void (*free_initrd_mem)(unsigned long, unsigned long)); 78.33 ++ 78.34 ++static struct { 78.35 ++ int offset, last, inptr, freed; 78.36 ++ char *max; 78.37 ++} fill; 78.38 ++ 78.39 ++static void release_inbuf(unsigned n) 78.40 ++{ 78.41 ++ if (n >= INITRD_PAGE) { 78.42 ++ unsigned rem = n % INITRD_PAGE; 78.43 ++ unsigned end = initrd_start + n - rem; 78.44 ++ _free_initrd(initrd_start, end, free_rootfs_mem); 78.45 ++ fill.freed += n - rem; 78.46 ++ if (fill.freed >= INITRD_DOT) { 78.47 ++ fill.freed -= INITRD_DOT; 78.48 ++ printk("."); 78.49 ++ } 78.50 ++ initrd_start = end; 78.51 ++ fill.offset = rem; 78.52 ++ } 78.53 ++} 78.54 ++ 78.55 ++static int fill_buffer(void *buffer, unsigned size) 78.56 ++{ 78.57 ++ int max = fill.max - (char *) initrd_start - fill.offset; 78.58 ++ if (max > size) max = size; 78.59 ++ if (max > INITRD_PAGE) max = INITRD_PAGE; 78.60 ++ memcpy(buffer, (void *)(initrd_start + fill.offset), max); 78.61 ++ release_inbuf(fill.offset); 78.62 ++ fill.offset += max; 78.63 ++ fill.inptr += fill.last; 78.64 ++ fill.last = max; 78.65 ++ return max; 78.66 ++} 78.67 ++ 78.68 + static int __init write_buffer(char *buf, unsigned len) 78.69 + { 78.70 + count = len; 78.71 +@@ -418,6 +463,7 @@ 78.72 + decompress_fn decompress; 78.73 + const char *compress_name; 78.74 + static __initdata char msg_buf[64]; 78.75 ++ int early_free_initrd = (buf == (char *) initrd_start); 78.76 + 78.77 + header_buf = kmalloc(110, GFP_KERNEL); 78.78 + symlink_buf = kmalloc(PATH_MAX + N_ALIGN(PATH_MAX) + 1, GFP_KERNEL); 78.79 +@@ -431,11 +478,16 @@ 78.80 + message = NULL; 78.81 + while (!message && len) { 78.82 + loff_t saved_offset = this_header; 78.83 ++ fill.offset = buf - (char *) initrd_start; 78.84 ++ fill.max = buf + len; 78.85 ++ fill.inptr = fill.last = fill.freed = 0; 78.86 + if (*buf == '0' && !(this_header & 3)) { 78.87 + state = Start; 78.88 + written = write_buffer(buf, len); 78.89 + buf += written; 78.90 + len -= written; 78.91 ++ if (early_free_initrd) 78.92 ++ release_inbuf(buf - (char *) initrd_start); 78.93 + continue; 78.94 + } 78.95 + if (!*buf) { 78.96 +@@ -447,7 +497,12 @@ 78.97 + this_header = 0; 78.98 + decompress = decompress_method(buf, len, &compress_name); 78.99 + if (decompress) { 78.100 +- res = decompress(buf, len, NULL, flush_buffer, NULL, 78.101 ++ if (early_free_initrd) { 78.102 ++ res = decompress(NULL, 0, fill_buffer, 78.103 ++ flush_buffer, NULL, &my_inptr, error); 78.104 ++ my_inptr += fill.inptr; 78.105 ++ } 78.106 ++ else res = decompress(buf, len, NULL, flush_buffer, NULL, 78.107 + &my_inptr, error); 78.108 + if (res) 78.109 + error("decompressor failed"); 78.110 +@@ -488,7 +546,8 @@ 78.111 + #include <linux/initrd.h> 78.112 + #include <linux/kexec.h> 78.113 + 78.114 +-static void __init free_initrd(void) 78.115 ++static void _free_initrd(unsigned long initrd_start, unsigned long initrd_end, 78.116 ++ void (*free_initrd_mem)(unsigned long, unsigned long)) 78.117 + { 78.118 + #ifdef CONFIG_KEXEC 78.119 + unsigned long crashk_start = (unsigned long)__va(crashk_res.start); 78.120 +@@ -516,6 +574,12 @@ 78.121 + #endif 78.122 + free_initrd_mem(initrd_start, initrd_end); 78.123 + skip: 78.124 ++ ; 78.125 ++} 78.126 ++ 78.127 ++static void __init free_initrd(void) 78.128 ++{ 78.129 ++ _free_initrd(initrd_start, initrd_end, free_initrd_mem); 78.130 + initrd_start = 0; 78.131 + initrd_end = 0; 78.132 + }
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 79.2 +++ b/linux-libre/stuff/linux-libre-header-2.6.37-libre.u Tue Mar 15 03:23:44 2011 +0100 79.3 @@ -0,0 +1,469 @@ 79.4 +--- linux-2.6.30.6/arch/x86/boot/header.S 79.5 ++++ linux-2.6.30.6/arch/x86/boot/header.S 79.6 +@@ -6,7 +6,7 @@ 79.7 + * Based on bootsect.S and setup.S 79.8 + * modified by more people than can be counted 79.9 + * 79.10 +- * Rewritten as a common file by H. Peter Anvin (Apr 2007) 79.11 ++ * Rewritten Pascal Bellard (Nov 2009) 79.12 + * 79.13 + * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment 79.14 + * addresses must be multiplied by 16 to obtain their respective linear 79.15 +@@ -27,6 +27,8 @@ 79.16 + 79.17 + BOOTSEG = 0x07C0 /* original address of boot-sector */ 79.18 + SYSSEG = 0x1000 /* historical load address >> 4 */ 79.19 ++INITSEG = 0x9000 /* boot address >> 4 */ 79.20 ++SETUPSEG = 0x9020 /* setup address >> 4 */ 79.21 + 79.22 + #ifndef SVGA_MODE 79.23 + #define SVGA_MODE ASK_VGA 79.24 +@@ -40,53 +42,412 @@ 79.25 + #define ROOT_RDONLY 1 79.26 + #endif 79.27 + 79.28 ++/* some extra features */ 79.29 ++#define EDIT_CMDLINE on hotkey 79.30 ++#define SHOW_REGS show int13 status & parameters 79.31 ++ 79.32 + .code16 79.33 + .section ".bstext", "ax" 79.34 + 79.35 + .global bootsect_start 79.36 + bootsect_start: 79.37 ++ cld # assume nothing 79.38 ++stacktop = 0x9E00 # in 0x8000 .. 0xA000 79.39 ++zeroed = 48+10 # gdt + zeroed registers 79.40 ++ movw $stacktop-12-zeroed, %di # stacktop is an arbitrary value >= 79.41 ++ # length of bootsect + length of 79.42 ++ # setup + room for stack; 79.43 ++ # 12 is disk parm size. 79.44 ++ pushw $INITSEG 79.45 ++ popw %es # %es = INITSEG 79.46 ++ 79.47 ++ pushw %es 79.48 ++ popw %ss # %ss and %es already contain INITSEG 79.49 ++ movw %di, %sp # put stack at INITSEG:stacktop-... 79.50 ++ 79.51 ++# Many BIOS's default disk parameter tables will not recognize 79.52 ++# multi-sector reads beyond the maximum sector number specified 79.53 ++# in the default diskette parameter tables - this may mean 7 79.54 ++# sectors in some cases. 79.55 ++# 79.56 ++# Since single sector reads are slow and out of the question, 79.57 ++# we must take care of this by creating new parameter tables 79.58 ++# (for the first disk) in RAM. We can set the maximum sector 79.59 ++# count to 36 - the most we will encounter on an ED 2.88. 79.60 ++# 79.61 ++# High doesn't hurt. Low does. Let's use the max: 63 79.62 ++# 79.63 ++# Segments are as follows: %es = %ss = INITSEG, 79.64 ++ 79.65 ++ xorw %ax, %ax # %ax = 0 79.66 ++ movw $zeroed/2, %cx # clear gdt + offset, %ds, limits 79.67 ++ rep # don't worry about cld 79.68 ++ stosw # already done above 79.69 ++ popw %bx # offset = 0 79.70 ++ popw %ds # %ds = 0 79.71 ++ popw %gs # %gs = 0 79.72 ++ 79.73 ++ movb setup_sects+0x7C00, %al # read bootsector + setup (%ds = 0) 79.74 ++ incw %ax 79.75 ++ 79.76 ++ pushw %es 79.77 ++ pushw %di # %ds:%bx+0x78 is parameter table address 79.78 ++ ldsw 0x78(%bx), %si # %ds:%si is source 79.79 ++ movb $6, %cl # copy 12 bytes 79.80 ++ rep # don't worry about cld 79.81 ++ movsw # already done above 79.82 ++ popl %gs:0x78(%bx) # update parameter table address 79.83 ++ pushw %es 79.84 ++ popw %ds # now %ds = %es = %ss = INITSEG 79.85 ++ movb $63, 0x4-12(%di) # patch sector count, %di = stacktop 79.86 ++ cli 79.87 ++ 79.88 ++ xchg %ax, %di # sector count 79.89 ++ popw %ax # limits = 0 79.90 ++ incw %cx # cylinder 0, sector 1 79.91 ++ call read_first_sectors # read setup 79.92 ++ 79.93 ++offset_version = 0xE 79.94 ++ movw $0x200,%si 79.95 ++ addw offset_version(%si),%si # starting protocol 2.00, Kernel 1.3.73 79.96 ++ call putstr # show which kernel we are loading 79.97 ++ 79.98 ++# The cmdline can be entered and modifed at boot time. 79.99 ++# Only characters before the cursor are passed to the kernel. 79.100 ++ popw %bx # clear %bx 79.101 ++ orw cmd_line_ptr, %bx 79.102 ++ jz nocmdline 79.103 ++ pushw %bx 79.104 ++ incw %di 79.105 ++ call read_sectors 79.106 ++ popw %si 79.107 ++ call putstr 79.108 ++#ifdef EDIT_CMDLINE 79.109 ++cmdlp: 79.110 ++ movb $0x20, %al # clear end of line 79.111 ++ int $0x10 # with Space 79.112 ++ movb $8, %al # and BackSpace 79.113 ++ int $0x10 79.114 ++ decw %si 79.115 ++cmdget: 79.116 ++ call wait4key 79.117 ++ cmpb $8, %al # BackSpace ? 79.118 ++ je cmdbs 79.119 ++ movb %al, (%si) # store char 79.120 ++ lodsw # %si += 2 79.121 ++cmdbs: 79.122 ++#if 1 79.123 ++ cmpw %si,cmd_line_ptr 79.124 ++ je cmdget 79.125 ++#endif 79.126 ++ call putc # set %ah and %bx 79.127 ++ cmpb $10, %al # Enter ? 79.128 ++ jne cmdlp 79.129 ++ movb %bh,-2(%si) # set end of string and remove CR 79.130 ++endcmdline: 79.131 ++#endif 79.132 ++nocmdline: 79.133 + 79.134 +- # Normalize the start address 79.135 +- ljmp $BOOTSEG, $start2 79.136 +- 79.137 +-start2: 79.138 +- movw %cs, %ax 79.139 +- movw %ax, %ds 79.140 +- movw %ax, %es 79.141 +- movw %ax, %ss 79.142 +- xorw %sp, %sp 79.143 +- sti 79.144 +- cld 79.145 +- 79.146 +- movw $bugger_off_msg, %si 79.147 ++# This routine loads the system at address SYSSEG, making sure 79.148 ++# no 64kB boundaries are crossed. We try to load it as fast as 79.149 ++# possible, loading whole tracks whenever we can. 79.150 ++ 79.151 ++ramdisk_image = 0x0218 79.152 ++ramdisk_size = 0x021C 79.153 ++ movw %sp, %si # for bootsect_gdt 79.154 ++ decw 16(%si) # bootsect_src = 64Kb 79.155 ++ decw 24(%si) # bootsect_dst = 64Kb 79.156 ++ movw $syssize, %di 79.157 ++type_of_loader = 0x210 79.158 ++loadflags = 0x211 79.159 ++heap_end_ptr = 0x224 79.160 ++ksyssize = 500 79.161 ++ orw $0x80FF, type_of_loader-ksyssize(%di) # loader type = 0xFF 79.162 ++ movw $stacktop-0x200, heap_end_ptr-ksyssize(%di) 79.163 ++ movb $0x10, %al # destination = 0x100000 79.164 ++ movb $5, %cl 79.165 ++initrdlp: 79.166 ++ decw %ax 79.167 ++ movb $0x93,%ah 79.168 ++ movw %ax, 28(%si) # bootsect_dst_base+2 79.169 ++ movb $(SYSSEG/4096), %al # source = SYSSEG 79.170 ++ movw %ax, 20(%si) # bootsect_src_base+2 79.171 ++ cbw 79.172 ++ cwde 79.173 ++ shlw %cl, %ax 79.174 ++ decw %ax 79.175 ++ addl (%di),%eax 79.176 ++ shrl %cl, %eax 79.177 ++syslp: 79.178 ++ pushw $SYSSEG 79.179 ++ popw %es 79.180 ++ movw $128,%di # 64Kb 79.181 ++ subw %di, %ax # max 32M > int 15 limit 79.182 ++ pushf 79.183 ++ jnc not_last 79.184 ++ addw %ax, %di 79.185 ++not_last: 79.186 ++ xorw %bx, %bx # clear %bx 79.187 ++ pushw %ax 79.188 ++#if defined(SHOW_REGS) 79.189 ++ pushw %si 79.190 ++ call read_sectors 79.191 ++ popw %si 79.192 ++#else 79.193 ++ call read_sectors 79.194 ++#endif 79.195 ++ movw $0x8000, %cx # full 64K 79.196 ++ movb $0x87, %ah 79.197 ++ incb 28(%si) # bootsect_dst_base+2 79.198 ++ int $0x15 # max 16M 79.199 ++ popw %ax 79.200 ++ popf 79.201 ++ ja syslp 79.202 ++ movw ramdisk_image+2,%ax 79.203 ++ movw $ramdisk_size,%di 79.204 ++ movb $9, %cl 79.205 ++ cmpb %al,28(%si) 79.206 ++ jb initrdlp 79.207 ++ 79.208 ++# This procedure turns off the floppy drive motor, so 79.209 ++# that we enter the kernel in a known state, and 79.210 ++# don't have to worry about it later. 79.211 ++ 79.212 ++#if 1 79.213 ++kill_motor: 79.214 ++ xchgw %ax, %bx # reset FDC 79.215 ++ int $0x13 79.216 ++#else 79.217 ++kill_motor: 79.218 ++ movw $0x3f2, %dx 79.219 ++ xchgw %ax, %bx 79.220 ++ outb %al, %dx 79.221 ++#endif 79.222 + 79.223 +-msg_loop: 79.224 +- lodsb 79.225 +- andb %al, %al 79.226 +- jz bs_die 79.227 +- movb $0xe, %ah 79.228 +- movw $7, %bx 79.229 ++# After that (everything loaded), we jump to the setup-routine 79.230 ++# loaded directly after the bootblock: 79.231 ++# Segments are as follows: %ds = %ss = INITSEG 79.232 ++ 79.233 ++ ljmp $SETUPSEG, $0 79.234 ++ 79.235 ++# read_sectors reads %di sectors into %es:0 buffer. 79.236 ++# %es:0 is updated to the next memory location. 79.237 ++# First, sectors are read sector by sector until 79.238 ++# sector per track count is known. Then they are 79.239 ++# read track by track. 79.240 ++# Assume no error on first track. 79.241 ++ 79.242 ++#define FLOPPY_CYLINDERS 80 /* 80 cylinders minimum */ 79.243 ++#define FLOPPY_HEADS 2 /* 2 heads minimum */ 79.244 ++#define FLOPPY_SECTORS 18 /* 18 sectors minimum */ 79.245 ++ 79.246 ++#ifdef SHOW_REGS 79.247 ++print_loop: 79.248 ++ movb $0x6 + 'A' - 1, %al 79.249 ++ subb %cl, %al 79.250 ++ movw $regs, %si # caller %si is saved 79.251 ++ call putcs # putc(%al) + putstr(%si) 79.252 ++# it will print out all of the registers. 79.253 ++ popw %bp # load word into %si 79.254 ++ jmp print_all # print %bp (status) 79.255 ++#endif 79.256 ++check_limits: 79.257 ++#ifndef SHOW_REGS 79.258 ++ popw %dx 79.259 ++#endif 79.260 ++ cmpb $FLOPPY_SECTORS+1, %cl # 18 sectors minimum 79.261 ++ jb check_head 79.262 ++ cmpb %al, %cl # max sector known ? 79.263 ++ ja next_head # no -> store it 79.264 ++check_head: 79.265 ++ cmpb $FLOPPY_HEADS, %dh # 2 heads minimum 79.266 ++ jb check_cylinder 79.267 ++ cmpb %ah, %dh # max head known ? 79.268 ++ ja next_cylinder # no -> store it 79.269 ++check_cylinder: 79.270 ++ pushaw 79.271 ++#ifdef SHOW_REGS 79.272 ++ cmpw $0x600,%bp # disk changed ? 79.273 ++ je reset_floppy 79.274 ++ pushw %es # print %es (named EX) 79.275 ++ pushw %dx # print %dx 79.276 ++ pushw %cx # print %cx 79.277 ++ pushw %bx # print %bx 79.278 ++ xchgw %ax, %si 79.279 ++ movb $2,%ah 79.280 ++ pushw %ax # print %ax 79.281 ++ movb $6,%cl 79.282 ++print_all: 79.283 ++ movb $4, %ch # 4 hex digits 79.284 ++print_digit: 79.285 ++ rolw $4, %bp # rotate to use low 4 bits 79.286 ++ movb $0x0f, %al 79.287 ++ andw %bp, %ax # %al = mask for nybble 79.288 ++ addb $0x90, %al # convert %al to ascii hex 79.289 ++ daa # in only four instructions! 79.290 ++ adcb $0x40, %al 79.291 ++ daa 79.292 ++ call putc # set %ah and %bx 79.293 ++ decb %ch 79.294 ++ jnz print_digit 79.295 ++ movb $0x20, %al # SPACE 79.296 + int $0x10 79.297 +- jmp msg_loop 79.298 +- 79.299 +-bs_die: 79.300 +- # Allow the user to press a key, then reboot 79.301 +- xorw %ax, %ax 79.302 ++ loop print_loop 79.303 ++ call wait 79.304 ++ cbw # %ah = 0 79.305 ++reset_floppy: 79.306 ++#else 79.307 ++ cbw # %ah = 0 79.308 ++#endif 79.309 ++ int $0x13 # reset controler 79.310 ++ popaw 79.311 ++read_sectorslp: 79.312 ++ pushw %dx # some bios break dx... 79.313 ++ pushw %ax # limits 79.314 ++ subb %cl, %al # sectors remaining in track 79.315 ++ ja tolastsect 79.316 ++ movb $1, %al # 1 sector mini 79.317 ++tolastsect: 79.318 ++ cbw 79.319 ++ cmpw %di, %ax 79.320 ++ jb more1trk 79.321 ++ movw %di, %ax # sectors to read 79.322 ++more1trk: 79.323 ++ pushw %ax # save context 79.324 ++ movb $2, %ah # cmd: read chs 79.325 ++ int $0x13 79.326 ++#ifdef SHOW_REGS 79.327 ++ xchgw %ax, %bp # status 79.328 ++#endif 79.329 ++# ifdef SHOW_REGS 79.330 ++ popw %si # save %ax 79.331 ++ popw %ax # limits 79.332 ++ popw %dx 79.333 ++# else 79.334 ++ popw %dx # save %ax 79.335 ++ popw %ax # limits 79.336 ++# endif 79.337 ++ jc check_limits 79.338 ++ xchgw %ax, %bp 79.339 ++# ifdef SHOW_REGS 79.340 ++update_regs: 79.341 ++ incw %cx # next sector 79.342 ++ movw %cx, %fs 79.343 ++ addb $2,%bh # next location 79.344 ++ decw %di # update sector counter 79.345 ++ jz putcdot 79.346 ++ decw %si 79.347 ++ jnz update_regs 79.348 ++# else 79.349 ++ addw %dx,%cx # next sector 79.350 ++ addb %dl,%bh 79.351 ++ addb %dl,%bh # next location 79.352 ++ subw %dx,%di # update sector counter 79.353 ++ popw %dx 79.354 ++ jz putcdot 79.355 ++# endif 79.356 ++read_sectors: 79.357 ++ movw %fs, %cx 79.358 ++ xchgw %ax, %bp 79.359 ++ cmpb %al,%cl # reach sector limit ? 79.360 ++ jne bdendlp 79.361 ++next_head: 79.362 ++ movb %cl,%al 79.363 ++ incb %dh # next head 79.364 ++ movb $1,%cl # first sector 79.365 ++ cmpb %ah, %dh # reach head limit ? 79.366 ++ jne bdendlp 79.367 ++next_cylinder: 79.368 ++ movb %dh,%ah 79.369 ++# NOTE : support 256 cylinders max 79.370 ++ incb %ch # next cylinder 79.371 ++read_first_sectors: 79.372 ++ movb $0,%dh # first head 79.373 ++cylinder_count = 496 79.374 ++ cmpb $FLOPPY_CYLINDERS,%ch # reach cylinder limit ? 79.375 ++ jb bdendlp 79.376 ++ cmpb cylinder_count, %ch 79.377 ++ jb bdendlp 79.378 ++next_floppy: 79.379 ++ movb $0,%ch # first cylinder 79.380 ++ pushaw 79.381 ++ movw $swap_floppy,%si 79.382 ++ incb 12(%si) 79.383 ++ pushw %bx 79.384 ++ call putstr 79.385 ++ popw %bx 79.386 ++waitfloppy: 79.387 ++ call wait 79.388 ++ jne waitfloppydone 79.389 ++ pushw %dx # some bios break dx... 79.390 ++ cbw 79.391 ++ int $0x13 # reset FDC 79.392 ++ movw $0x201,%ax 79.393 ++# cwd 79.394 ++# movw $1,%cx 79.395 ++ int $0x13 # read first sector 79.396 ++ popw %dx 79.397 ++ rclb $1,%ah # floppy changed 06=>0D no error 00 79.398 ++ cmpb -2(%si), %ah # 0D then 00 79.399 ++ jne waitfloppy # no => try again 79.400 ++ incw %si 79.401 ++ orb %ah,%ah # was 00 ? 79.402 ++ jne waitfloppy 79.403 ++waitfloppydone: 79.404 ++ popaw 79.405 ++bdendlp: 79.406 ++ jmp read_sectorslp 79.407 ++ 79.408 ++putcdot: 79.409 ++ pushw %ss 79.410 ++ popw %es # restore es 79.411 ++ movb $0x2e+3, %al # loading... message 2e = . 79.412 ++putclf: 79.413 ++ subb $3, %al 79.414 ++putc: 79.415 ++ movb $0xe, %ah 79.416 ++ movw $7, %bx # one dot each 64k 79.417 ++ int $0x10 79.418 ++ cmp $0xd, %al # CR ? 79.419 ++ je putclf 79.420 ++ ret 79.421 ++ 79.422 ++putstr: 79.423 ++ movb $0xd, %al # CR 79.424 ++putcs: 79.425 ++ call putc 79.426 ++ lodsb 79.427 ++ orb %al,%al # end of string is \0 79.428 ++ jnz putcs 79.429 ++ ret 79.430 ++ 79.431 ++clock = 0x46C 79.432 ++wait: 79.433 ++wait4key: 79.434 ++ movw $clock, %di 79.435 ++#define DELAY 5 79.436 ++ movb $(DELAY*182)/10,%cl 79.437 ++ addb %gs:(%di),%cl 79.438 ++waitkbd: 79.439 ++ movw $0x10D, %ax # test keyboard, timeout => CR 79.440 ++ cmpb %gs:(%di),%cl 79.441 ++ je waitdone 79.442 + int $0x16 79.443 +- int $0x19 79.444 ++ jz waitkbd 79.445 ++ cbw 79.446 ++ int $0x16 # eat char 79.447 ++ movw %di, %gs # disable timeout 79.448 ++ incw %di # clear Z 79.449 ++waitdone: 79.450 ++ ret 79.451 + 79.452 +- # int 0x19 should never return. In case it does anyway, 79.453 +- # invoke the BIOS reset code... 79.454 +- ljmp $0xf000,$0xfff0 79.455 +- 79.456 +- .section ".bsdata", "a" 79.457 +-bugger_off_msg: 79.458 +- .ascii "Direct booting from floppy is no longer supported.\r\n" 79.459 +- .ascii "Please use a boot loader program instead.\r\n" 79.460 +- .ascii "\n" 79.461 +- .ascii "Remove disk and press any key to reboot . . .\r\n" 79.462 +- .byte 0 79.463 ++#ifdef SHOW_REGS 79.464 ++regs: .asciz "X:" 79.465 ++#endif 79.466 + 79.467 ++swap_floppy: .ascii "Insert disk 1" 79.468 ++ .ascii "." 79.469 ++ .byte 7,13,0 79.470 + 79.471 + # Kernel attributes; used by setup. This is part 1 of the 79.472 + # header, from the old boot sector.
80.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 80.2 +++ b/linux-libre/stuff/linux-libre-unlzma-2.6.37-libre.u Tue Mar 15 03:23:44 2011 +0100 80.3 @@ -0,0 +1,268 @@ 80.4 +--- linux-2.6.30.4/init/initramfs.c 80.5 ++++ linux-2.6.30.4/init/initramfs.c 80.6 +@@ -425,7 +425,8 @@ 80.7 + return len - count; 80.8 + } 80.9 + 80.10 +-static int __init flush_buffer(void *bufv, unsigned len) 80.11 ++#define flush_buffer cpio_flush_buffer 80.12 ++int __init flush_buffer(void *bufv, unsigned len) 80.13 + { 80.14 + char *buf = (char *) bufv; 80.15 + int written; 80.16 + 80.17 +--- linux-2.6.30.4/lib/decompress_unlzma.c 80.18 ++++ linux-2.6.30.4/lib/decompress_unlzma.c 80.19 +@@ -278,6 +278,10 @@ 80.20 + size_t global_pos; 80.21 + int(*flush)(void*, unsigned int); 80.22 + struct lzma_header *header; 80.23 ++ int is_cpio_flush; 80.24 ++ uint8_t **buffer_index; 80.25 ++ int next_index; 80.26 ++ int max_index; 80.27 + }; 80.28 + 80.29 + struct cstate { 80.30 +@@ -294,6 +298,14 @@ 80.31 + static inline uint8_t INIT peek_old_byte(struct writer *wr, 80.32 + uint32_t offs) 80.33 + { 80.34 ++ if (wr->is_cpio_flush) { 80.35 ++ int32_t pos; 80.36 ++ while (offs > wr->header->dict_size) 80.37 ++ offs -= wr->header->dict_size; 80.38 ++ pos = wr->buffer_pos - offs; 80.39 ++ return wr->buffer_index[pos / LZMA_IOBUF_SIZE] 80.40 ++ [pos % LZMA_IOBUF_SIZE]; 80.41 ++ } 80.42 + if (!wr->flush) { 80.43 + int32_t pos; 80.44 + while (offs > wr->header->dict_size) 80.45 +@@ -309,8 +321,41 @@ 80.46 + 80.47 + } 80.48 + 80.49 ++static inline void INIT write_byte_if_cpio(struct writer *wr, uint8_t byte) 80.50 ++{ 80.51 ++ if (wr->buffer_pos % LZMA_IOBUF_SIZE == 0) { 80.52 ++ // if the following large_malloc fails, the initramfs 80.53 ++ // whould not be load with is_cpio_flush forced 0 too. 80.54 ++ // Remember we do not allocate historic buffer. 80.55 ++ // Let's assume it will never fail ! 80.56 ++ if (wr->next_index >= wr->max_index) { 80.57 ++ // realloc wr->buffer_index 80.58 ++ uint8_t **p = wr->buffer_index; 80.59 ++ wr->buffer_index = (uint8_t **) 80.60 ++ large_malloc(LZMA_IOBUF_SIZE + 80.61 ++ sizeof(*p) * wr->max_index); 80.62 ++ if (wr->max_index) { 80.63 ++ memcpy(wr->buffer_index, p, 80.64 ++ sizeof(*p) * wr->max_index); 80.65 ++ free(p); 80.66 ++ } 80.67 ++ wr->max_index += LZMA_IOBUF_SIZE / sizeof(*p); 80.68 ++ } 80.69 ++ wr->buffer_index[wr->next_index++] = 80.70 ++ (uint8_t *) large_malloc(LZMA_IOBUF_SIZE); 80.71 ++ } 80.72 ++ wr->buffer_index[wr->buffer_pos / LZMA_IOBUF_SIZE] 80.73 ++ [wr->buffer_pos % LZMA_IOBUF_SIZE] = 80.74 ++ wr->previous_byte = byte; 80.75 ++ wr->buffer_pos++; 80.76 ++} 80.77 ++ 80.78 + static inline void INIT write_byte(struct writer *wr, uint8_t byte) 80.79 + { 80.80 ++ if (wr->is_cpio_flush) { 80.81 ++ write_byte_if_cpio(wr, byte); 80.82 ++ return; 80.83 ++ } 80.84 + wr->buffer[wr->buffer_pos++] = wr->previous_byte = byte; 80.85 + if (wr->flush && wr->buffer_pos == wr->header->dict_size) { 80.86 + wr->buffer_pos = 0; 80.87 +@@ -328,7 +373,21 @@ 80.88 + static inline void INIT copy_bytes(struct writer *wr, 80.89 + uint32_t rep0, int len) 80.90 + { 80.91 +- do { 80.92 ++ if (wr->is_cpio_flush) { 80.93 ++ int32_t pos; 80.94 ++ uint32_t offs = rep0; 80.95 ++ while (offs > wr->header->dict_size) 80.96 ++ offs -= wr->header->dict_size; 80.97 ++ pos = wr->buffer_pos - offs; 80.98 ++ do { 80.99 ++ write_byte_if_cpio(wr, 80.100 ++ wr->buffer_index[pos / LZMA_IOBUF_SIZE] 80.101 ++ [pos % LZMA_IOBUF_SIZE]); 80.102 ++ pos++; 80.103 ++ len--; 80.104 ++ } while (len != 0 && wr->buffer_pos < wr->header->dst_size); 80.105 ++ } 80.106 ++ else do { 80.107 + copy_byte(wr, rep0); 80.108 + len--; 80.109 + } while (len != 0 && wr->buffer_pos < wr->header->dst_size); 80.110 +@@ -339,6 +398,9 @@ 80.111 + int pos_state, uint16_t *prob, 80.112 + int lc, uint32_t literal_pos_mask) { 80.113 + int mi = 1; 80.114 ++ static const int state[LZMA_NUM_STATES] = 80.115 ++ { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5 }; 80.116 ++ 80.117 + rc_update_bit_0(rc, prob); 80.118 + prob = (p + LZMA_LITERAL + 80.119 + (LZMA_LIT_SIZE 80.120 +@@ -369,18 +431,13 @@ 80.121 + rc_get_bit(rc, prob_lit, &mi); 80.122 + } 80.123 + write_byte(wr, mi); 80.124 +- if (cst->state < 4) 80.125 +- cst->state = 0; 80.126 +- else if (cst->state < 10) 80.127 +- cst->state -= 3; 80.128 +- else 80.129 +- cst->state -= 6; 80.130 ++ cst->state = state[cst->state]; 80.131 + } 80.132 + 80.133 + static inline void INIT process_bit1(struct writer *wr, struct rc *rc, 80.134 + struct cstate *cst, uint16_t *p, 80.135 + int pos_state, uint16_t *prob) { 80.136 +- int offset; 80.137 ++ int offset; 80.138 + uint16_t *prob_len; 80.139 + int num_bits; 80.140 + int len; 80.141 +@@ -396,7 +453,7 @@ 80.142 + prob = p + LZMA_LEN_CODER; 80.143 + } else { 80.144 + rc_update_bit_1(rc, prob); 80.145 +- prob = p + LZMA_IS_REP_G0 + cst->state; 80.146 ++ prob += LZMA_IS_REP_G0 - LZMA_IS_REP; 80.147 + if (rc_is_bit_0(rc, prob)) { 80.148 + rc_update_bit_0(rc, prob); 80.149 + prob = (p + LZMA_IS_REP_0_LONG 80.150 +@@ -417,13 +474,13 @@ 80.151 + uint32_t distance; 80.152 + 80.153 + rc_update_bit_1(rc, prob); 80.154 +- prob = p + LZMA_IS_REP_G1 + cst->state; 80.155 ++ prob += LZMA_IS_REP_G1 - LZMA_IS_REP_G0; 80.156 + if (rc_is_bit_0(rc, prob)) { 80.157 + rc_update_bit_0(rc, prob); 80.158 + distance = cst->rep1; 80.159 + } else { 80.160 + rc_update_bit_1(rc, prob); 80.161 +- prob = p + LZMA_IS_REP_G2 + cst->state; 80.162 ++ prob += LZMA_IS_REP_G2 - LZMA_IS_REP_G1; 80.163 + if (rc_is_bit_0(rc, prob)) { 80.164 + rc_update_bit_0(rc, prob); 80.165 + distance = cst->rep2; 80.166 +@@ -444,24 +501,24 @@ 80.167 + prob_len = prob + LZMA_LEN_CHOICE; 80.168 + if (rc_is_bit_0(rc, prob_len)) { 80.169 + rc_update_bit_0(rc, prob_len); 80.170 +- prob_len = (prob + LZMA_LEN_LOW 80.171 ++ prob_len += LZMA_LEN_LOW - LZMA_LEN_CHOICE 80.172 + + (pos_state << 80.173 +- LZMA_LEN_NUM_LOW_BITS)); 80.174 ++ LZMA_LEN_NUM_LOW_BITS); 80.175 + offset = 0; 80.176 + num_bits = LZMA_LEN_NUM_LOW_BITS; 80.177 + } else { 80.178 + rc_update_bit_1(rc, prob_len); 80.179 +- prob_len = prob + LZMA_LEN_CHOICE_2; 80.180 ++ prob_len += LZMA_LEN_CHOICE_2 - LZMA_LEN_CHOICE; 80.181 + if (rc_is_bit_0(rc, prob_len)) { 80.182 + rc_update_bit_0(rc, prob_len); 80.183 +- prob_len = (prob + LZMA_LEN_MID 80.184 ++ prob_len += LZMA_LEN_MID - LZMA_LEN_CHOICE_2 80.185 + + (pos_state << 80.186 +- LZMA_LEN_NUM_MID_BITS)); 80.187 ++ LZMA_LEN_NUM_MID_BITS); 80.188 + offset = 1 << LZMA_LEN_NUM_LOW_BITS; 80.189 + num_bits = LZMA_LEN_NUM_MID_BITS; 80.190 + } else { 80.191 + rc_update_bit_1(rc, prob_len); 80.192 +- prob_len = prob + LZMA_LEN_HIGH; 80.193 ++ prob_len += LZMA_LEN_HIGH - LZMA_LEN_CHOICE_2; 80.194 + offset = ((1 << LZMA_LEN_NUM_LOW_BITS) 80.195 + + (1 << LZMA_LEN_NUM_MID_BITS)); 80.196 + num_bits = LZMA_LEN_NUM_HIGH_BITS; 80.197 +@@ -529,6 +586,7 @@ 80.198 + void(*error_fn)(char *x) 80.199 + ) 80.200 + { 80.201 ++ extern int cpio_flush_buffer(void*, unsigned int); 80.202 + struct lzma_header header; 80.203 + int lc, pb, lp; 80.204 + uint32_t pos_state_mask; 80.205 +@@ -563,6 +621,10 @@ 80.206 + wr.global_pos = 0; 80.207 + wr.previous_byte = 0; 80.208 + wr.buffer_pos = 0; 80.209 ++ wr.is_cpio_flush = 0; 80.210 ++ if (flush == cpio_flush_buffer) 80.211 ++ wr.is_cpio_flush = 1; 80.212 ++ wr.buffer_index = NULL; 80.213 + 80.214 + rc_init(&rc, fill, inbuf, in_len); 80.215 + 80.216 +@@ -596,23 +658,23 @@ 80.217 + if (header.dict_size == 0) 80.218 + header.dict_size = 1; 80.219 + 80.220 +- if (output) 80.221 ++ if (output || wr.is_cpio_flush) 80.222 + wr.buffer = output; 80.223 + else { 80.224 + wr.bufsize = MIN(header.dst_size, header.dict_size); 80.225 + wr.buffer = large_malloc(wr.bufsize); 80.226 + } 80.227 +- if (wr.buffer == NULL) 80.228 ++ if (wr.buffer == NULL && !wr.is_cpio_flush) 80.229 + goto exit_1; 80.230 + 80.231 + num_probs = LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)); 80.232 + p = (uint16_t *) large_malloc(num_probs * sizeof(*p)); 80.233 + if (p == 0) 80.234 + goto exit_2; 80.235 +- num_probs = LZMA_LITERAL + (LZMA_LIT_SIZE << (lc + lp)); 80.236 ++ num_probs += LZMA_LITERAL - LZMA_BASE_SIZE; 80.237 + for (i = 0; i < num_probs; i++) 80.238 + p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1; 80.239 +- 80.240 ++ wr.max_index = wr.next_index = 0; 80.241 + rc_init_code(&rc); 80.242 + 80.243 + while (get_pos(&wr) < header.dst_size) { 80.244 +@@ -631,12 +693,25 @@ 80.245 + 80.246 + if (posp) 80.247 + *posp = rc.ptr-rc.buffer; 80.248 +- if (wr.flush) 80.249 ++ if (wr.is_cpio_flush) { 80.250 ++ int i; 80.251 ++ for (i = 0; i < wr.next_index -1; i++) { 80.252 ++ wr.flush(wr.buffer_index[i], LZMA_IOBUF_SIZE); 80.253 ++ large_free(wr.buffer_index[i]); 80.254 ++ } 80.255 ++ if (i < wr.next_index) { 80.256 ++ wr.flush(wr.buffer_index[i], 80.257 ++ wr.buffer_pos % LZMA_IOBUF_SIZE); 80.258 ++ large_free(wr.buffer_index[i]); 80.259 ++ } 80.260 ++ large_free(wr.buffer_index); 80.261 ++ } 80.262 ++ else if (wr.flush) 80.263 + wr.flush(wr.buffer, wr.buffer_pos); 80.264 + ret = 0; 80.265 + large_free(p); 80.266 + exit_2: 80.267 +- if (!output) 80.268 ++ if (!output && !wr.is_cpio_flush) 80.269 + large_free(wr.buffer); 80.270 + exit_1: 80.271 + if (!buf)
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 81.2 +++ b/linux-libre/stuff/linux-squashfs-lzma-2.6.34.u Tue Mar 15 03:23:44 2011 +0100 81.3 @@ -0,0 +1,649 @@ 81.4 +--- linux-2.6.30.6/include/linux/decompress/bunzip2_mm.h 81.5 ++++ linux-2.6.30.6/include/linux/decompress/bunzip2_mm.h 81.6 +@@ -0,0 +1,13 @@ 81.7 ++#ifndef BUNZIP2_MM_H 81.8 ++#define BUNZIP2_MM_H 81.9 ++ 81.10 ++#ifdef STATIC 81.11 ++/* Code active when included from pre-boot environment: */ 81.12 ++#define INIT 81.13 ++#else 81.14 ++/* Compile for initramfs/initrd code only */ 81.15 ++#define INIT __init 81.16 ++static void(*error)(char *m); 81.17 ++#endif 81.18 ++ 81.19 ++#endif 81.20 + 81.21 +--- linux-2.6.30.6/include/linux/decompress/inflate_mm.h 81.22 ++++ linux-2.6.30.6/include/linux/decompress/inflate_mm.h 81.23 +@@ -0,0 +1,13 @@ 81.24 ++#ifndef INFLATE_MM_H 81.25 ++#define INFLATE_MM_H 81.26 ++ 81.27 ++#ifdef STATIC 81.28 ++/* Code active when included from pre-boot environment: */ 81.29 ++#define INIT 81.30 ++#else 81.31 ++/* Compile for initramfs/initrd code only */ 81.32 ++#define INIT __init 81.33 ++static void(*error)(char *m); 81.34 ++#endif 81.35 ++ 81.36 ++#endif 81.37 + 81.38 +#--- linux-2.6.30.6/include/linux/decompress/mm.h 81.39 +#+++ linux-2.6.30.6/include/linux/decompress/mm.h 81.40 +@@ -63,8 +63,6 @@ 81.41 + 81.42 + #define set_error_fn(x) 81.43 + 81.44 +-#define INIT 81.45 +- 81.46 + #else /* STATIC */ 81.47 + 81.48 + /* Code active when compiled standalone for use when loading ramdisk: */ 81.49 +@@ -84,10 +82,8 @@ 81.50 + #define large_malloc(a) vmalloc(a) 81.51 + #define large_free(a) vfree(a) 81.52 + 81.53 +-static void(*error)(char *m); 81.54 + #define set_error_fn(x) error = x; 81.55 + 81.56 +-#define INIT __init 81.57 + #define STATIC 81.58 + 81.59 + #include <linux/init.h> 81.60 + 81.61 +--- linux-2.6.30.6/include/linux/decompress/unlzma_mm.h 81.62 ++++ linux-2.6.30.6/include/linux/decompress/unlzma_mm.h 81.63 +@@ -0,0 +1,20 @@ 81.64 ++#ifndef UNLZMA_MM_H 81.65 ++#define UNLZMA_MM_H 81.66 ++ 81.67 ++#ifdef STATIC 81.68 ++ 81.69 ++/* Code active when included from pre-boot environment: */ 81.70 ++#define INIT 81.71 ++ 81.72 ++#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED) 81.73 ++ 81.74 ++/* Make it available to non initramfs/initrd code */ 81.75 ++#define INIT 81.76 ++#include <linux/module.h> 81.77 ++#else 81.78 ++ 81.79 ++/* Compile for initramfs/initrd code only */ 81.80 ++#define INIT __init 81.81 ++#endif 81.82 ++ 81.83 ++#endif 81.84 + 81.85 +--- linux-2.6.30.6/lib/Kconfig 81.86 ++++ linux-2.6.30.6/lib/Kconfig 81.87 +@@ -117,6 +117,9 @@ 81.88 + config DECOMPRESS_LZMA 81.89 + tristate 81.90 + 81.91 ++config DECOMPRESS_LZMA_NEEDED 81.92 ++ boolean 81.93 ++ 81.94 + config DECOMPRESS_LZO 81.95 + select LZO_DECOMPRESS 81.96 + tristate 81.97 + 81.98 +--- linux-2.6.30.6/lib/decompress_bunzip2.c 81.99 ++++ linux-2.6.30.6/lib/decompress_bunzip2.c 81.100 +@@ -52,6 +52,7 @@ 81.101 + #include <linux/slab.h> 81.102 + #endif /* STATIC */ 81.103 + 81.104 ++#include <linux/decompress/bunzip2_mm.h> 81.105 + #include <linux/decompress/mm.h> 81.106 + 81.107 + #ifndef INT_MAX 81.108 + 81.109 +--- linux-2.6.30.6/lib/decompress_inflate.c 81.110 ++++ linux-2.6.30.6/lib/decompress_inflate.c 81.111 +@@ -23,6 +23,7 @@ 81.112 + 81.113 + #endif /* STATIC */ 81.114 + 81.115 ++#include <linux/decompress/inflate_mm.h> 81.116 + #include <linux/decompress/mm.h> 81.117 + 81.118 + #define GZIP_IOBUF_SIZE (16*1024) 81.119 + 81.120 +--- linux-2.6.30.6/lib/decompress_unlzma.c 81.121 ++++ linux-2.6.30.6/lib/decompress_unlzma.c 81.122 +@@ -36,6 +36,7 @@ 81.123 + #include <linux/slab.h> 81.124 + #endif /* STATIC */ 81.125 + 81.126 ++#include <linux/decompress/unlzma_mm.h> 81.127 + #include <linux/decompress/mm.h> 81.128 + 81.129 + #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 81.130 +@@ -88,7 +89,7 @@ 81.131 + } 81.132 + 81.133 + /* Called twice: once at startup and once in rc_normalize() */ 81.134 +-static void INIT rc_read(struct rc *rc) 81.135 ++static void INIT rc_read(struct rc *rc, void(*error)(char *x)) 81.136 + { 81.137 + rc->buffer_size = rc->fill((char *)rc->buffer, LZMA_IOBUF_SIZE); 81.138 + if (rc->buffer_size <= 0) 81.139 +@@ -115,13 +116,13 @@ 81.140 + rc->range = 0xFFFFFFFF; 81.141 + } 81.142 + 81.143 +-static inline void INIT rc_init_code(struct rc *rc) 81.144 ++static inline void INIT rc_init_code(struct rc *rc, void(*error)(char *x)) 81.145 + { 81.146 + int i; 81.147 + 81.148 + for (i = 0; i < 5; i++) { 81.149 + if (rc->ptr >= rc->buffer_end) 81.150 +- rc_read(rc); 81.151 ++ rc_read(rc, error); 81.152 + rc->code = (rc->code << 8) | *rc->ptr++; 81.153 + } 81.154 + } 81.155 +@@ -134,32 +135,33 @@ 81.156 + } 81.157 + 81.158 + /* Called twice, but one callsite is in inline'd rc_is_bit_0_helper() */ 81.159 +-static void INIT rc_do_normalize(struct rc *rc) 81.160 ++static void INIT rc_do_normalize(struct rc *rc, void(*error)(char *x)) 81.161 + { 81.162 + if (rc->ptr >= rc->buffer_end) 81.163 +- rc_read(rc); 81.164 ++ rc_read(rc, error); 81.165 + rc->range <<= 8; 81.166 + rc->code = (rc->code << 8) | *rc->ptr++; 81.167 + } 81.168 +-static inline void INIT rc_normalize(struct rc *rc) 81.169 ++static inline void INIT rc_normalize(struct rc *rc, void(*error)(char *x)) 81.170 + { 81.171 + if (rc->range < (1 << RC_TOP_BITS)) 81.172 +- rc_do_normalize(rc); 81.173 ++ rc_do_normalize(rc, error); 81.174 + } 81.175 + 81.176 + /* Called 9 times */ 81.177 + /* Why rc_is_bit_0_helper exists? 81.178 + *Because we want to always expose (rc->code < rc->bound) to optimizer 81.179 + */ 81.180 +-static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p) 81.181 ++static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p, 81.182 ++ void (*error)(char *x)) 81.183 + { 81.184 +- rc_normalize(rc); 81.185 ++ rc_normalize(rc, error); 81.186 + rc->bound = *p * (rc->range >> RC_MODEL_TOTAL_BITS); 81.187 + return rc->bound; 81.188 + } 81.189 +-static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p) 81.190 ++static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p, void(*error)(char *x)) 81.191 + { 81.192 +- uint32_t t = rc_is_bit_0_helper(rc, p); 81.193 ++ uint32_t t = rc_is_bit_0_helper(rc, p, error); 81.194 + return rc->code < t; 81.195 + } 81.196 + 81.197 +@@ -177,9 +179,9 @@ 81.198 + } 81.199 + 81.200 + /* Called 4 times in unlzma loop */ 81.201 +-static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol) 81.202 ++static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol, void(*error)(char *x)) 81.203 + { 81.204 +- if (rc_is_bit_0(rc, p)) { 81.205 ++ if (rc_is_bit_0(rc, p, error)) { 81.206 + rc_update_bit_0(rc, p); 81.207 + *symbol *= 2; 81.208 + return 0; 81.209 +@@ -191,9 +193,9 @@ 81.210 + } 81.211 + 81.212 + /* Called once */ 81.213 +-static inline int INIT rc_direct_bit(struct rc *rc) 81.214 ++static inline int INIT rc_direct_bit(struct rc *rc , void(*error)(char *x)) 81.215 + { 81.216 +- rc_normalize(rc); 81.217 ++ rc_normalize(rc, error); 81.218 + rc->range >>= 1; 81.219 + if (rc->code >= rc->range) { 81.220 + rc->code -= rc->range; 81.221 +@@ -204,13 +206,14 @@ 81.222 + 81.223 + /* Called twice */ 81.224 + static inline void INIT 81.225 +-rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol) 81.226 ++rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol, 81.227 ++ void(*error)(char *x)) 81.228 + { 81.229 + int i = num_levels; 81.230 + 81.231 + *symbol = 1; 81.232 + while (i--) 81.233 +- rc_get_bit(rc, p + *symbol, symbol); 81.234 ++ rc_get_bit(rc, p + *symbol, symbol, error); 81.235 + *symbol -= 1 << num_levels; 81.236 + } 81.237 + 81.238 +@@ -406,7 +409,8 @@ 81.239 + static inline void INIT process_bit0(struct writer *wr, struct rc *rc, 81.240 + struct cstate *cst, uint16_t *p, 81.241 + int pos_state, uint16_t *prob, 81.242 +- int lc, uint32_t literal_pos_mask) { 81.243 ++ int lc, uint32_t literal_pos_mask, 81.244 ++ void(*error)(char *x)) { 81.245 + int mi = 1; 81.246 + static const int state[LZMA_NUM_STATES] = 81.247 + { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5 }; 81.248 +@@ -427,7 +431,7 @@ 81.249 + match_byte <<= 1; 81.250 + bit = match_byte & 0x100; 81.251 + prob_lit = prob + 0x100 + bit + mi; 81.252 +- if (rc_get_bit(rc, prob_lit, &mi)) { 81.253 ++ if (rc_get_bit(rc, prob_lit, &mi, error)) { 81.254 + if (!bit) 81.255 + break; 81.256 + } else { 81.257 +@@ -438,7 +442,7 @@ 81.258 + } 81.259 + while (mi < 0x100) { 81.260 + uint16_t *prob_lit = prob + mi; 81.261 +- rc_get_bit(rc, prob_lit, &mi); 81.262 ++ rc_get_bit(rc, prob_lit, &mi, error); 81.263 + } 81.264 + write_byte(wr, mi); 81.265 + cst->state = state[cst->state]; 81.266 +@@ -446,7 +453,8 @@ 81.267 + 81.268 + static inline void INIT process_bit1(struct writer *wr, struct rc *rc, 81.269 + struct cstate *cst, uint16_t *p, 81.270 +- int pos_state, uint16_t *prob) { 81.271 ++ int pos_state, uint16_t *prob, 81.272 ++ void(*error)(char *x)) { 81.273 + int offset; 81.274 + uint16_t *prob_len; 81.275 + int num_bits; 81.276 +@@ -454,7 +459,7 @@ 81.277 + 81.278 + rc_update_bit_1(rc, prob); 81.279 + prob = p + LZMA_IS_REP + cst->state; 81.280 +- if (rc_is_bit_0(rc, prob)) { 81.281 ++ if (rc_is_bit_0(rc, prob, error)) { 81.282 + rc_update_bit_0(rc, prob); 81.283 + cst->rep3 = cst->rep2; 81.284 + cst->rep2 = cst->rep1; 81.285 +@@ -464,13 +469,13 @@ 81.286 + } else { 81.287 + rc_update_bit_1(rc, prob); 81.288 + prob += LZMA_IS_REP_G0 - LZMA_IS_REP; 81.289 +- if (rc_is_bit_0(rc, prob)) { 81.290 ++ if (rc_is_bit_0(rc, prob, error)) { 81.291 + rc_update_bit_0(rc, prob); 81.292 + prob = (p + LZMA_IS_REP_0_LONG 81.293 + + (cst->state << 81.294 + LZMA_NUM_POS_BITS_MAX) + 81.295 + pos_state); 81.296 +- if (rc_is_bit_0(rc, prob)) { 81.297 ++ if (rc_is_bit_0(rc, prob, error)) { 81.298 + rc_update_bit_0(rc, prob); 81.299 + 81.300 + cst->state = cst->state < LZMA_NUM_LIT_STATES ? 81.301 +@@ -485,13 +490,13 @@ 81.302 + 81.303 + rc_update_bit_1(rc, prob); 81.304 + prob += LZMA_IS_REP_G1 - LZMA_IS_REP_G0; 81.305 +- if (rc_is_bit_0(rc, prob)) { 81.306 ++ if (rc_is_bit_0(rc, prob, error)) { 81.307 + rc_update_bit_0(rc, prob); 81.308 + distance = cst->rep1; 81.309 + } else { 81.310 + rc_update_bit_1(rc, prob); 81.311 + prob += LZMA_IS_REP_G2 - LZMA_IS_REP_G1; 81.312 +- if (rc_is_bit_0(rc, prob)) { 81.313 ++ if (rc_is_bit_0(rc, prob, error)) { 81.314 + rc_update_bit_0(rc, prob); 81.315 + distance = cst->rep2; 81.316 + } else { 81.317 +@@ -509,7 +514,7 @@ 81.318 + } 81.319 + 81.320 + prob_len = prob + LZMA_LEN_CHOICE; 81.321 +- if (rc_is_bit_0(rc, prob_len)) { 81.322 ++ if (rc_is_bit_0(rc, prob_len, error)) { 81.323 + rc_update_bit_0(rc, prob_len); 81.324 + prob_len += LZMA_LEN_LOW - LZMA_LEN_CHOICE 81.325 + + (pos_state << 81.326 +@@ -519,7 +524,7 @@ 81.327 + } else { 81.328 + rc_update_bit_1(rc, prob_len); 81.329 + prob_len += LZMA_LEN_CHOICE_2 - LZMA_LEN_CHOICE; 81.330 +- if (rc_is_bit_0(rc, prob_len)) { 81.331 ++ if (rc_is_bit_0(rc, prob_len, error)) { 81.332 + rc_update_bit_0(rc, prob_len); 81.333 + prob_len += LZMA_LEN_MID - LZMA_LEN_CHOICE_2 81.334 + + (pos_state << 81.335 +@@ -535,7 +540,7 @@ 81.336 + } 81.337 + } 81.338 + 81.339 +- rc_bit_tree_decode(rc, prob_len, num_bits, &len); 81.340 ++ rc_bit_tree_decode(rc, prob_len, num_bits, &len, error); 81.341 + len += offset; 81.342 + 81.343 + if (cst->state < 4) { 81.344 +@@ -550,7 +555,7 @@ 81.345 + << LZMA_NUM_POS_SLOT_BITS); 81.346 + rc_bit_tree_decode(rc, prob, 81.347 + LZMA_NUM_POS_SLOT_BITS, 81.348 +- &pos_slot); 81.349 ++ &pos_slot, error); 81.350 + if (pos_slot >= LZMA_START_POS_MODEL_INDEX) { 81.351 + int i, mi; 81.352 + num_bits = (pos_slot >> 1) - 1; 81.353 +@@ -563,7 +568,7 @@ 81.354 + num_bits -= LZMA_NUM_ALIGN_BITS; 81.355 + while (num_bits--) 81.356 + cst->rep0 = (cst->rep0 << 1) | 81.357 +- rc_direct_bit(rc); 81.358 ++ rc_direct_bit(rc, error); 81.359 + prob = p + LZMA_ALIGN; 81.360 + cst->rep0 <<= LZMA_NUM_ALIGN_BITS; 81.361 + num_bits = LZMA_NUM_ALIGN_BITS; 81.362 +@@ -571,7 +576,7 @@ 81.363 + i = 1; 81.364 + mi = 1; 81.365 + while (num_bits--) { 81.366 +- if (rc_get_bit(rc, prob + mi, &mi)) 81.367 ++ if (rc_get_bit(rc, prob + mi, &mi, error)) 81.368 + cst->rep0 |= i; 81.369 + i <<= 1; 81.370 + } 81.371 +@@ -588,12 +593,12 @@ 81.372 + 81.373 + 81.374 + 81.375 +-STATIC inline int INIT unlzma(unsigned char *buf, int in_len, 81.376 ++STATIC int INIT unlzma(unsigned char *buf, int in_len, 81.377 + int(*fill)(void*, unsigned int), 81.378 + int(*flush)(void*, unsigned int), 81.379 + unsigned char *output, 81.380 + int *posp, 81.381 +- void(*error_fn)(char *x) 81.382 ++ void(*error)(char *x) 81.383 + ) 81.384 + { 81.385 + extern int cpio_flush_buffer(void*, unsigned int); 81.386 +@@ -610,7 +615,6 @@ 81.387 + unsigned char *inbuf; 81.388 + int ret = -1; 81.389 + 81.390 +- set_error_fn(error_fn); 81.391 + 81.392 + if (buf) 81.393 + inbuf = buf; 81.394 +@@ -638,7 +642,7 @@ 81.395 + 81.396 + for (i = 0; i < sizeof(header); i++) { 81.397 + if (rc.ptr >= rc.buffer_end) 81.398 +- rc_read(&rc); 81.399 ++ rc_read(&rc, error); 81.400 + ((unsigned char *)&header)[i] = *rc.ptr++; 81.401 + } 81.402 + 81.403 +@@ -683,17 +687,17 @@ 81.404 + for (i = 0; i < num_probs; i++) 81.405 + p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1; 81.406 + wr.max_index = wr.next_index = 0; 81.407 +- rc_init_code(&rc); 81.408 ++ rc_init_code(&rc, error); 81.409 + 81.410 + while (get_pos(&wr) < header.dst_size) { 81.411 + int pos_state = get_pos(&wr) & pos_state_mask; 81.412 + uint16_t *prob = p + LZMA_IS_MATCH + 81.413 + (cst.state << LZMA_NUM_POS_BITS_MAX) + pos_state; 81.414 +- if (rc_is_bit_0(&rc, prob)) 81.415 ++ if (rc_is_bit_0(&rc, prob, error)) 81.416 + process_bit0(&wr, &rc, &cst, p, pos_state, prob, 81.417 +- lc, literal_pos_mask); 81.418 ++ lc, literal_pos_mask, error); 81.419 + else { 81.420 +- process_bit1(&wr, &rc, &cst, p, pos_state, prob); 81.421 ++ process_bit1(&wr, &rc, &cst, p, pos_state, prob, error); 81.422 + if (cst.rep0 == 0) 81.423 + break; 81.424 + } 81.425 +@@ -727,6 +731,9 @@ 81.426 + exit_0: 81.427 + return ret; 81.428 + } 81.429 ++#if defined(CONFIG_DECOMPRESS_LZMA_NEEDED) && !defined(PREBOOT) 81.430 ++EXPORT_SYMBOL(unlzma); 81.431 ++#endif 81.432 + 81.433 + #ifdef PREBOOT 81.434 + STATIC int INIT decompress(unsigned char *buf, int in_len, 81.435 + 81.436 +--- linux-2.6.34/fs/squashfs/Kconfig 81.437 ++++ linux-2.6.34/fs/squashfs/Kconfig 81.438 +@@ -26,6 +26,12 @@ 81.439 + 81.440 + If unsure, say N. 81.441 + 81.442 ++config SQUASHFS_LZMA 81.443 ++ bool "Include support for LZMA compressed file systems" 81.444 ++ depends on SQUASHFS 81.445 ++ select DECOMPRESS_LZMA 81.446 ++ select DECOMPRESS_LZMA_NEEDED 81.447 ++ 81.448 + config SQUASHFS_EMBEDDED 81.449 + 81.450 + bool "Additional option for memory-constrained systems" 81.451 + 81.452 +--- linux-2.6.34/fs/squashfs/Makefile 81.453 ++++ linux-2.6.34/fs/squashfs/Makefile 81.454 +@@ -5,3 +5,4 @@ 81.455 + obj-$(CONFIG_SQUASHFS) += squashfs.o 81.456 + squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o 81.457 + squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o 81.458 ++squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o 81.459 + 81.460 +--- linux-2.6.34/fs/squashfs/decompressor.c 81.461 ++++ linux-2.6.34/fs/squashfs/decompressor.c 81.462 +@@ -50,7 +50,11 @@ 81.463 + 81.464 + static const struct squashfs_decompressor *decompressor[] = { 81.465 + &squashfs_zlib_comp_ops, 81.466 ++#ifdef CONFIG_SQUASHFS_LZMA 81.467 ++ &squashfs_lzma_comp_ops, 81.468 ++#else 81.469 + &squashfs_lzma_unsupported_comp_ops, 81.470 ++#endif 81.471 + &squashfs_lzo_unsupported_comp_ops, 81.472 + &squashfs_unknown_comp_ops 81.473 + }; 81.474 + 81.475 +--- linux-2.6.34/fs/squashfs/lzma_wrapper.c 81.476 ++++ linux-2.6.34/fs/squashfs/lzma_wrapper.c 81.477 +@@ -0,0 +1,152 @@ 81.478 ++/* 81.479 ++ * Squashfs - a compressed read only filesystem for Linux 81.480 ++ * 81.481 ++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 81.482 ++ * Phillip Lougher <phillip@lougher.demon.co.uk> 81.483 ++ * 81.484 ++ * This program is free software; you can redistribute it and/or 81.485 ++ * modify it under the terms of the GNU General Public License 81.486 ++ * as published by the Free Software Foundation; either version 2, 81.487 ++ * or (at your option) any later version. 81.488 ++ * 81.489 ++ * This program is distributed in the hope that it will be useful, 81.490 ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of 81.491 ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 81.492 ++ * GNU General Public License for more details. 81.493 ++ * 81.494 ++ * You should have received a copy of the GNU General Public License 81.495 ++ * along with this program; if not, write to the Free Software 81.496 ++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 81.497 ++ * 81.498 ++ * lzma_wrapper.c 81.499 ++ */ 81.500 ++ 81.501 ++#include <asm/unaligned.h> 81.502 ++#include <linux/slab.h> 81.503 ++#include <linux/buffer_head.h> 81.504 ++#include <linux/mutex.h> 81.505 ++#include <linux/vmalloc.h> 81.506 ++#include <linux/decompress/unlzma.h> 81.507 ++ 81.508 ++#include "squashfs_fs.h" 81.509 ++#include "squashfs_fs_sb.h" 81.510 ++#include "squashfs_fs_i.h" 81.511 ++#include "squashfs.h" 81.512 ++#include "decompressor.h" 81.513 ++ 81.514 ++struct squashfs_lzma { 81.515 ++ void *input; 81.516 ++ void *output; 81.517 ++}; 81.518 ++ 81.519 ++/* decompress_unlzma.c is currently non re-entrant... */ 81.520 ++DEFINE_MUTEX(lzma_mutex); 81.521 ++ 81.522 ++/* decompress_unlzma.c doesn't provide any context in its callbacks... */ 81.523 ++static int lzma_error; 81.524 ++ 81.525 ++static void error(char *m) 81.526 ++{ 81.527 ++ ERROR("unlzma error: %s\n", m); 81.528 ++ lzma_error = 1; 81.529 ++} 81.530 ++ 81.531 ++ 81.532 ++static void *lzma_init(struct squashfs_sb_info *msblk) 81.533 ++{ 81.534 ++ struct squashfs_lzma *stream = kzalloc(sizeof(*stream), GFP_KERNEL); 81.535 ++ if (stream == NULL) 81.536 ++ goto failed; 81.537 ++ stream->input = vmalloc(msblk->block_size); 81.538 ++ if (stream->input == NULL) 81.539 ++ goto failed; 81.540 ++ stream->output = vmalloc(msblk->block_size); 81.541 ++ if (stream->output == NULL) 81.542 ++ goto failed2; 81.543 ++ 81.544 ++ return stream; 81.545 ++ 81.546 ++failed2: 81.547 ++ vfree(stream->input); 81.548 ++failed: 81.549 ++ ERROR("failed to allocate lzma workspace\n"); 81.550 ++ kfree(stream); 81.551 ++ return NULL; 81.552 ++} 81.553 ++ 81.554 ++ 81.555 ++static void lzma_free(void *strm) 81.556 ++{ 81.557 ++ struct squashfs_lzma *stream = strm; 81.558 ++ 81.559 ++ if (stream) { 81.560 ++ vfree(stream->input); 81.561 ++ vfree(stream->output); 81.562 ++ } 81.563 ++ kfree(stream); 81.564 ++} 81.565 ++ 81.566 ++ 81.567 ++static int lzma_uncompress(struct squashfs_sb_info *msblk, void **buffer, 81.568 ++ struct buffer_head **bh, int b, int offset, int length, int srclength, 81.569 ++ int pages) 81.570 ++{ 81.571 ++ struct squashfs_lzma *stream = msblk->stream; 81.572 ++ void *buff = stream->input; 81.573 ++ int avail, i, bytes = length, res; 81.574 ++ 81.575 ++ mutex_lock(&lzma_mutex); 81.576 ++ 81.577 ++ for (i = 0; i < b; i++) { 81.578 ++ wait_on_buffer(bh[i]); 81.579 ++ if (!buffer_uptodate(bh[i])) 81.580 ++ goto block_release; 81.581 ++ 81.582 ++ avail = min(bytes, msblk->devblksize - offset); 81.583 ++ memcpy(buff, bh[i]->b_data + offset, avail); 81.584 ++ buff += avail; 81.585 ++ bytes -= avail; 81.586 ++ offset = 0; 81.587 ++ put_bh(bh[i]); 81.588 ++ } 81.589 ++ 81.590 ++ lzma_error = 0; 81.591 ++ res = unlzma(stream->input, length, NULL, NULL, stream->output, NULL, 81.592 ++ error); 81.593 ++ if (res || lzma_error) 81.594 ++ goto failed; 81.595 ++ 81.596 ++ /* uncompressed size is stored in the LZMA header (5 byte offset) */ 81.597 ++ res = bytes = get_unaligned_le32(stream->input + 5); 81.598 ++ for (i = 0, buff = stream->output; bytes && i < pages; i++) { 81.599 ++ avail = min_t(int, bytes, PAGE_CACHE_SIZE); 81.600 ++ memcpy(buffer[i], buff, avail); 81.601 ++ buff += avail; 81.602 ++ bytes -= avail; 81.603 ++ } 81.604 ++ if (bytes) 81.605 ++ goto failed; 81.606 ++ 81.607 ++ mutex_unlock(&lzma_mutex); 81.608 ++ return res; 81.609 ++ 81.610 ++block_release: 81.611 ++ for (; i < b; i++) 81.612 ++ put_bh(bh[i]); 81.613 ++ 81.614 ++failed: 81.615 ++ mutex_unlock(&lzma_mutex); 81.616 ++ 81.617 ++ ERROR("lzma decompression failed, data probably corrupt\n"); 81.618 ++ return -EIO; 81.619 ++} 81.620 ++ 81.621 ++const struct squashfs_decompressor squashfs_lzma_comp_ops = { 81.622 ++ .init = lzma_init, 81.623 ++ .free = lzma_free, 81.624 ++ .decompress = lzma_uncompress, 81.625 ++ .id = LZMA_COMPRESSION, 81.626 ++ .name = "lzma", 81.627 ++ .supported = 1 81.628 ++}; 81.629 ++ 81.630 + 81.631 +--- linux-2.6.34/fs/squashfs/squashfs.h 81.632 ++++ linux-2.6.34/fs/squashfs/squashfs.h 81.633 +@@ -94,3 +94,6 @@ 81.634 + 81.635 + /* zlib_wrapper.c */ 81.636 + extern const struct squashfs_decompressor squashfs_zlib_comp_ops; 81.637 ++ 81.638 ++/* lzma wrapper.c */ 81.639 ++extern const struct squashfs_decompressor squashfs_lzma_comp_ops; 81.640 + 81.641 +--- linux-2.6.34/lib/Makefile 81.642 ++++ linux-2.6.34/lib/Makefile 81.643 +@@ -69,7 +69,7 @@ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ 81.644 + 81.645 + lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o 81.646 + lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o 81.647 +-lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o 81.648 ++obj-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o 81.649 + lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o 81.650 + 81.651 + obj-$(CONFIG_TEXTSEARCH) += textsearch.o 81.652 +
82.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 82.2 +++ b/linux-libre/stuff/list_modules.sh Tue Mar 15 03:23:44 2011 +0100 82.3 @@ -0,0 +1,43 @@ 82.4 +#!/bin/sh 82.5 +# list_modules.sh: list Linux kernel modules for SliTaz GNU/Linux. 82.6 +# 2008/06/07 <pascal.bellard@slitaz.org> - GNU General Public License. 82.7 +# 82.8 + 82.9 +find_modules() 82.10 +{ 82.11 +find $_pkg/lib/modules/*-slitaz/kernel/$1 -type f -exec basename {} \; 82.12 +} 82.13 + 82.14 +if [ -z "$1" ] ; then 82.15 + cat 1>&2 <<EOT 82.16 + 82.17 +\033[1musage:\033[0m `basename $0` path/to/kernel-modules-subtrees 82.18 +exemple `basename $0` drivers/net/wireless >list 82.19 + 82.20 +EOT 82.21 + exit 1 82.22 +fi 82.23 + 82.24 +if [ -z "$(ls -d $_pkg/lib/modules/*-slitaz/kernel/$1 2> /dev/null)" ] ; then 82.25 + cat 1>&2 <<EOT 82.26 + 82.27 +Error : $1 does not exist. 82.28 + 82.29 +EOT 82.30 + exit 1 82.31 +fi 82.32 + 82.33 +for tree in $@; do 82.34 + for module in $(find_modules $tree) ; do 82.35 + grep /$module: $_pkg/lib/modules/*-slitaz/modules.dep || 82.36 + find $_pkg/lib/modules/*-slitaz/kernel/$tree -name $module 82.37 + done | awk '{ for (i = 1; i <= NF; i++) print $i; }' 82.38 +done | sort | uniq | sed -e 's,.*slitaz/,,' -e 's,^kernel/,,' -e 's/:$//' | \ 82.39 +while read module; do 82.40 + grep -qs ^$module$ $src/modules.list && continue 82.41 + if [ ! -f $_pkg/lib/modules/*-slitaz/kernel/$module ]; then 82.42 + (cd $_pkg/lib/modules/*-slitaz/kernel; find -name $(basename $module) ) 82.43 + else 82.44 + echo $module 82.45 + fi 82.46 +done
83.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 83.2 +++ b/linux-libre/stuff/modules-2.6.37-libre.list Tue Mar 15 03:23:44 2011 +0100 83.3 @@ -0,0 +1,141 @@ 83.4 +drivers/acpi/video.ko.gz 83.5 +drivers/acpi/button.ko.gz 83.6 +drivers/char/genrtc.ko.gz 83.7 +drivers/char/i8k.ko.gz 83.8 +drivers/char/lp.ko.gz 83.9 +drivers/char/rtc.ko.gz 83.10 +drivers/hwmon/coretemp.ko.gz 83.11 +drivers/hwmon/hwmon.ko.gz 83.12 +drivers/input/mouse/inport.ko.gz 83.13 +drivers/input/mouse/logibm.ko.gz 83.14 +drivers/input/mouse/pc110pad.ko.gz 83.15 +drivers/net/3c501.ko.gz 83.16 +drivers/net/3c503.ko.gz 83.17 +drivers/net/3c505.ko.gz 83.18 +drivers/net/3c509.ko.gz 83.19 +drivers/net/3c515.ko.gz 83.20 +drivers/net/3c59x.ko.gz 83.21 +drivers/net/82596.ko.gz 83.22 +drivers/net/amd8111e.ko.gz 83.23 +drivers/net/arcnet/arcnet.ko.gz 83.24 +drivers/net/arcnet/com90xx.ko.gz 83.25 +drivers/net/arcnet/rfc1201.ko.gz 83.26 +drivers/net/atl1c/atl1c.ko.gz 83.27 +drivers/net/atl1e/atl1e.ko.gz 83.28 +drivers/net/atlx/atl2.ko.gz 83.29 +drivers/net/bnx2.ko.gz 83.30 +drivers/net/cassini.ko.gz 83.31 +drivers/net/cs89x0.ko.gz 83.32 +drivers/net/depca.ko.gz 83.33 +drivers/net/dl2k.ko.gz 83.34 +drivers/net/e1000/e1000.ko.gz 83.35 +drivers/net/e2100.ko.gz 83.36 +drivers/net/eepro.ko.gz 83.37 +drivers/net/eexpress.ko.gz 83.38 +drivers/net/eth16i.ko.gz 83.39 +drivers/net/ewrk3.ko.gz 83.40 +drivers/net/fealnx.ko.gz 83.41 +drivers/net/hp100.ko.gz 83.42 +drivers/net/hp.ko.gz 83.43 +drivers/net/hp-plus.ko.gz 83.44 +drivers/net/ipg.ko.gz 83.45 +drivers/net/lance.ko.gz 83.46 +drivers/net/lp486e.ko.gz 83.47 +drivers/net/ne.ko.gz 83.48 +drivers/net/ni52.ko.gz 83.49 +drivers/net/ni65.ko.gz 83.50 +drivers/net/pcmcia/3c574_cs.ko.gz 83.51 +drivers/net/pcmcia/3c589_cs.ko.gz 83.52 +drivers/net/pcmcia/axnet_cs.ko.gz 83.53 +drivers/net/pcmcia/fmvj18x_cs.ko.gz 83.54 +drivers/net/pcmcia/nmclan_cs.ko.gz 83.55 +drivers/net/pcmcia/pcnet_cs.ko.gz 83.56 +drivers/net/pcmcia/smc91c92_cs.ko.gz 83.57 +drivers/net/pcmcia/xirc2ps_cs.ko.gz 83.58 +drivers/net/phy/broadcom.ko.gz 83.59 +drivers/net/phy/cicada.ko.gz 83.60 +drivers/net/phy/davicom.ko.gz 83.61 +drivers/net/phy/libphy.ko.gz 83.62 +drivers/net/phy/lxt.ko.gz 83.63 +drivers/net/phy/marvell.ko.gz 83.64 +drivers/net/phy/qsemi.ko.gz 83.65 +drivers/net/phy/smsc.ko.gz 83.66 +drivers/net/dnet.ko.gz 83.67 +drivers/net/sc92031.ko.gz 83.68 +drivers/net/sis190.ko.gz 83.69 +drivers/net/skge.ko.gz 83.70 +drivers/net/sky2.ko.gz 83.71 +drivers/net/smc9194.ko.gz 83.72 +drivers/net/smc-ultra.ko.gz 83.73 +drivers/net/starfire.ko.gz 83.74 +drivers/net/sungem.ko.gz 83.75 +drivers/net/sungem_phy.ko.gz 83.76 +drivers/net/sunhme.ko.gz 83.77 +drivers/net/tg3.ko.gz 83.78 +drivers/net/tulip/tulip.ko.gz 83.79 +drivers/net/tulip/uli526x.ko.gz 83.80 +drivers/net/typhoon.ko.gz 83.81 +drivers/net/usb/asix.ko.gz 83.82 +drivers/net/usb/cdc_ether.ko.gz 83.83 +drivers/net/usb/cdc_subset.ko.gz 83.84 +drivers/net/usb/net1080.ko.gz 83.85 +drivers/net/usb/rndis_host.ko.gz 83.86 +drivers/net/usb/usbnet.ko.gz 83.87 +drivers/net/usb/zaurus.ko.gz 83.88 +drivers/net/usb/cdc_eem.ko.gz 83.89 +drivers/net/usb/dm9601.ko.gz 83.90 +drivers/net/via-velocity.ko.gz 83.91 +drivers/net/wd.ko.gz 83.92 +drivers/net/8390p.ko.gz 83.93 +drivers/net/b44.ko.gz 83.94 +drivers/net/r6040.ko.gz 83.95 +drivers/net/vmxnet3/vmxnet3.ko.gz 83.96 +drivers/net/usb/int51x1.ko.gz 83.97 +drivers/net/usb/ipheth.ko.gz 83.98 +drivers/net/usb/smsc75xx.ko.gz 83.99 +drivers/net/smsc9420.ko.gz 83.100 +drivers/ide/ide-cs.ko.gz 83.101 +drivers/watchdog/softdog.ko.gz 83.102 +drivers/parport/parport.ko.gz 83.103 +drivers/parport/parport_pc.ko.gz 83.104 +drivers/pcmcia/i82092.ko.gz 83.105 +drivers/pcmcia/i82365.ko.gz 83.106 +drivers/pcmcia/pcmcia_core.ko.gz 83.107 +drivers/pcmcia/pcmcia.ko.gz 83.108 +drivers/pcmcia/pcmcia_rsrc.ko.gz 83.109 +drivers/pcmcia/pd6729.ko.gz 83.110 +drivers/pcmcia/yenta_socket.ko.gz 83.111 +drivers/usb/class/cdc-acm.ko.gz 83.112 +drivers/usb/class/usblp.ko.gz 83.113 +drivers/usb/serial/ch341.ko.gz 83.114 +drivers/usb/serial/pl2303.ko.gz 83.115 +drivers/usb/serial/usbserial.ko.gz 83.116 +drivers/usb/mon/usbmon.ko.gz 83.117 +drivers/usb/host/xhci-hcd.ko.gz 83.118 +drivers/ssb/ssb.ko.gz 83.119 +drivers/block/floppy.ko.gz 83.120 +drivers/input/mouse/sermouse.ko.gz 83.121 +drivers/video/output.ko.gz 83.122 +fs/binfmt_misc.ko.gz 83.123 +fs/fat/msdos.ko.gz 83.124 +fs/fuse/cuse.ko.gz 83.125 +net/ipv4/netfilter/ipt_REJECT.ko.gz 83.126 +net/netfilter/nfnetlink.ko.gz 83.127 +net/netfilter/nfnetlink_log.ko.gz 83.128 +lib/crc7.ko.gz 83.129 +drivers/misc/cb710/cb710.ko.gz 83.130 +drivers/misc/tifm_core.ko.gz 83.131 +net/llc/llc.ko.gz 83.132 +drivers/mmc/core/mmc_core.ko.gz 83.133 +net/rfkill/rfkill.ko.gz 83.134 +net/sunrpc/auth_gss/auth_rpcgss.ko.gz 83.135 +net/sunrpc/auth_gss/rpcsec_gss_krb5.ko.gz 83.136 +net/netfilter/nf_conntrack.ko.gz 83.137 +drivers/input/gameport/gameport.ko.gz 83.138 +drivers/i2c/i2c-core.ko.gz 83.139 +sound/soundcore.ko.gz 83.140 +sound/ac97_bus.ko.gz 83.141 +sound/core/snd.ko.gz 83.142 +lib/libcrc32c.ko.gz 83.143 +lib/crc-itu-t.ko.gz 83.144 +lib/raid6/raid6_pq.ko.gz