wok-next annotate linux/receipt @ rev 881
linux: minimize lzma memory footprint
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 06 23:15:25 2008 +0000 (2008-06-06) |
parents | 8e1dfc3bad57 |
children | 04b68c6ffdfa |
rev | line source |
---|---|
pankso@3 | 1 # SliTaz package receipt. |
pankso@3 | 2 |
pankso@3 | 3 PACKAGE="linux" |
pascal@214 | 4 VERSION="2.6.24.2" |
pankso@3 | 5 CATEGORY="base-system" |
pankso@3 | 6 SHORT_DESC="The Linux kernel and modules." |
pankso@289 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pankso@3 | 8 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@3 | 9 WEB_SITE="http://www.kernel.org/" |
pankso@3 | 10 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL" |
pankso@3 | 11 |
pankso@3 | 12 # Rules to configure and make the package. |
pankso@3 | 13 compile_rules() |
pankso@3 | 14 { |
erjo@253 | 15 cd $src |
erjo@253 | 16 # lzma and boot patch from pascal |
pascal@521 | 17 while read patch_file; do |
pascal@521 | 18 echo "Apply $patch_file" |
pascal@881 | 19 patch -p1 < ../stuff/$patch_file || return 1 |
pascal@521 | 20 done <<EOT |
pascal@521 | 21 boot-kernel.u |
pascal@521 | 22 $PACKAGE-lzma-$VERSION.u |
pascal@521 | 23 decompress_unlzma.u |
pascal@521 | 24 EOT |
erjo@253 | 25 make mrproper |
erjo@253 | 26 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config |
pascal@521 | 27 while read patch_file; do |
pascal@521 | 28 echo "Apply $patch_file" |
pascal@881 | 29 patch -p1 < ../stuff/$patch_file || return 1 |
pascal@521 | 30 done <<EOT |
pascal@521 | 31 config-acpi-$VERSION.u |
pascal@521 | 32 linux-utf8-$VERSION.u |
pascal@521 | 33 config-ieee1394-$VERSION.u |
pascal@521 | 34 linux-lzma-export.u |
pascal@521 | 35 config-tun-$VERSION.u |
pascal@521 | 36 config-reiserfs-$VERSION.u |
pascal@521 | 37 config-wireless-$VERSION.u |
pascal@881 | 38 $PACKAGE-lzma-loram-$VERSION.u |
pascal@521 | 39 EOT |
erjo@253 | 40 make oldconfig |
erjo@253 | 41 make bzImage |
erjo@253 | 42 make modules |
erjo@253 | 43 make INSTALL_MOD_PATH=$PWD/_pkg modules_install |
erjo@253 | 44 } |
erjo@253 | 45 |
pankso@3 | 46 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@3 | 47 genpkg_rules() |
pankso@3 | 48 { |
pascal@521 | 49 local path |
pankso@3 | 50 mkdir $fs/boot |
pascal@214 | 51 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz |
pascal@881 | 52 rdev $fs/boot/vmlinuz-$VERSION-slitaz /dev/ram0 |
pankso@3 | 53 # Compress all modules. |
pankso@3 | 54 # Package module-init-tools is compiled with zlib support. |
pankso@3 | 55 # |
pascal@521 | 56 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz |
pascal@521 | 57 path=$fs/lib/modules/$VERSION-slitaz/kernel |
pascal@521 | 58 mkdir -p $path |
pascal@521 | 59 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz |
pascal@521 | 60 while read module; do |
pascal@521 | 61 dir=$(dirname $module) |
pankso@535 | 62 [ -d $path/$dir ] || mkdir -p $path/$dir |
pankso@535 | 63 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
pascal@521 | 64 done < stuff/modules-$VERSION.list |
pascal@397 | 65 # Remove unresolved links |
pascal@397 | 66 rm -f $fs/lib/modules/$VERSION-slitaz/build |
pascal@397 | 67 rm -f $fs/lib/modules/$VERSION-slitaz/source |
pankso@871 | 68 # Packages all linux pkgs |
pankso@872 | 69 for i in acpi ieee1394 reiserfs sound wireless |
pankso@871 | 70 do |
pankso@871 | 71 tazwok genpkg linux-$i |
pankso@871 | 72 done |
pankso@3 | 73 } |
pankso@3 | 74 |
pankso@3 | 75 # Pre and post install commands for Tazpkg. |
pankso@3 | 76 # GRUB stuf. |
pankso@3 | 77 post_install() |
pankso@3 | 78 { |
pascal@521 | 79 echo "Processing post-install commands..." |
pascal@881 | 80 depmod -a -b "$1/" |
pascal@521 | 81 echo "----" |
pascal@521 | 82 echo "If you have GRUB installed, you can add tree lines to boot SliTaz." |
pascal@521 | 83 echo "Example /boot/grub/menu.lst" |
pascal@521 | 84 echo -e " |
pankso@3 | 85 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@3 | 86 root(hd0,0) |
pankso@3 | 87 kernel /boot/vmlinuz-$VERSION-slitaz root=/dev/hda1 vga=771\n" |
pascal@521 | 88 echo "----" |
pankso@3 | 89 } |