wok-current annotate linux64/receipt @ rev 24130

Add tnylpo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 18 14:47:15 2021 +0000 (2021-10-18)
parents 708b5293dd29
children a23978bfa665
rev   line source
pankso@12285 1 # SliTaz package receipt.
pankso@12285 2
pankso@12285 3 PACKAGE="linux64"
pascal@20261 4 VERSION="3.16.55"
pankso@12285 5 CATEGORY="base-system"
pankso@12285 6 SHORT_DESC="The Linux 64 bits kernel and modules."
pankso@12285 7 MAINTAINER="devel@slitaz.org"
pascal@14657 8 LICENSE="GPL2"
pascal@20421 9 WEB_SITE="https://www.kernel.org/"
pankso@12285 10 WANTED="linux"
pankso@12285 11 PROVIDE="linux"
pankso@15866 12
pankso@15866 13 # We want it regenerated on each kernel/module install
pascal@17028 14 #CONFIG_FILES="/lib/modules/$VERSION-slitaz64/modules.dep"
pankso@12285 15
pascal@19638 16 DEPENDS="kmod"
pankso@12285 17
pankso@12285 18 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@12285 19 genpkg_rules()
pankso@12285 20 {
al@18741 21 local path
al@18741 22 install=$install/linux64
al@18741 23 src=$WOK/$PACKAGE/source/tmp
al@18741 24 cp -a $install/boot $fs
al@18741 25 path=$fs/lib/modules/$VERSION-slitaz64/kernel
al@18741 26 mkdir -p $path
al@18741 27 cp -a $install/lib/modules/$VERSION-slitaz64/mo* \
pascal@17032 28 $fs/lib/modules/$VERSION-slitaz64
pankso@15866 29
al@18741 30 # Get the base modules
al@18741 31 export src
al@18741 32 export install
al@18741 33 mkdir -p $WOK/$PACKAGE/source/tmp
al@18741 34 $wanted_stuff/list_modules.sh \
pascal@13937 35 $(cat $stuff/modules64.list) > $WOK/$PACKAGE/source/tmp/modules.list
al@18741 36 while read module; do
al@18741 37 dir=$(dirname $module)
al@18741 38 [ -d $path/$dir ] || mkdir -p $path/$dir
al@18741 39 cp -a $install/lib/modules/$VERSION-slitaz64/kernel/$module $path/$dir
al@18741 40 done < $WOK/$PACKAGE/source/tmp/modules.list
al@18741 41 # Remove unresolved links
al@18741 42 rm -f $fs/lib/modules/$VERSION-slitaz64/build
al@18741 43 rm -f $fs/lib/modules/$VERSION-slitaz64/source
al@18741 44 # Cook all packages with a kernel module
al@18741 45 for i in $(cd $WOK; grep -l 'cook linux64$' */receipt); do
al@18741 46 echo cook ${i%/receipt}
al@18741 47 done
al@18741 48 # Fixed modules.dep to use right path
al@18741 49 # saves 100kb of space too
al@18741 50 sed -i "s|$install||g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
al@18741 51 sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
al@18741 52 # Check and echo any module in kernel .config that's not added to
al@18741 53 # one of linux-* pkgs
pascal@13941 54 $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list
pankso@12285 55 }
pankso@12285 56
pankso@12285 57 # Pre and post install commands for Tazpkg.
pankso@12285 58 post_install()
pankso@12285 59 {
al@18741 60 chroot "$root/" depmod -a $VERSION-slitaz64
al@18741 61 # GRUB stuff.
al@18741 62 if [ -f "$root/boot/grub/menu.lst" ]; then
al@18741 63 root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1)
pankso@15866 64 grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1)
pankso@12285 65 # Add new kernel entry in case of upgrade for installed system.
pascal@18730 66 if ! grep -q $PACKAGE-$VERSION-slitaz64 "$1/boot/grub/menu.lst"; then
al@18741 67 cat >> "$1/boot/grub/menu.lst" <<EOT
pankso@12285 68
pascal@17032 69 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
pankso@12285 70 $grub_dev
pascal@17032 71 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
pankso@12285 72 EOT
pankso@12285 73 fi
pankso@12285 74 # Display information message.
al@18741 75 cat <<EOT
pankso@12285 76 ----
pankso@12285 77 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
pankso@12285 78
pascal@17032 79 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
pankso@12285 80 $grub_dev
pascal@17032 81 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
pankso@12285 82 ----
pankso@12285 83 EOT
pankso@12285 84 fi
pankso@12285 85 }