# SliTaz package receipt. PACKAGE="linux64" VERSION="4.19.294" CATEGORY="base-system" SHORT_DESC="The Linux 64 bits kernel and modules." MAINTAINER="devel@slitaz.org" LICENSE="GPL2" WEB_SITE="https://www.kernel.org/" WANTED="linux" PROVIDE="linux" # We want it regenerated on each kernel/module install #CONFIG_FILES="/lib/modules/$VERSION-slitaz64/modules.dep" DEPENDS="kmod" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { local path install=$install/linux64 src=$WOK/$PACKAGE/source/tmp cp -a $install/boot $fs path=$fs/lib/modules/$VERSION-slitaz64/kernel mkdir -p $path cp -a $install/lib/modules/$VERSION-slitaz64/mo* \ $fs/lib/modules/$VERSION-slitaz64 # Get the base modules export src export install mkdir -p $WOK/$PACKAGE/source/tmp $wanted_stuff/list_modules.sh \ $(cat $stuff/modules64.list) > $WOK/$PACKAGE/source/tmp/modules.list while read module; do dir=$(dirname $module) [ -d $path/$dir ] || mkdir -p $path/$dir cp -a $install/lib/modules/$VERSION-slitaz64/kernel/$module $path/$dir done < $WOK/$PACKAGE/source/tmp/modules.list # Remove unresolved links rm -f $fs/lib/modules/$VERSION-slitaz64/build rm -f $fs/lib/modules/$VERSION-slitaz64/source # Cook all packages with a kernel module for i in $(cd $WOK; grep -l '^WANTED="linux"' linux64-*/receipt); do cook ${i%/receipt} done # Fixed modules.dep to use right path # saves 100kb of space too sed -i "s|$install||g" $fs/lib/modules/$VERSION-slitaz64/modules.dep sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz64/modules.dep # Check and echo any module in kernel .config that's not added to # one of linux-* pkgs $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list } # Pre and post install commands for Tazpkg. post_install() { chroot "$root/" depmod -a $VERSION-slitaz64 # GRUB stuff. if [ -f "$root/boot/grub/menu.lst" ]; then root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1) grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1) # Add new kernel entry in case of upgrade for installed system. if ! grep -q $PACKAGE-$VERSION-slitaz64 "$1/boot/grub/menu.lst"; then cat >> "$1/boot/grub/menu.lst" <