1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-01-15 15:41:54 +01:00
slackware-current/source/installer/sources/initrd/usr/lib/setup/SeTkernel
Patrick J Volkerding 41196c6ff1 Fri Dec 6 22:22:58 UTC 2024
a/kernel-generic-6.12.3-x86_64-1.txz:  Upgraded.
a/mkinitrd-1.4.11-x86_64-53.txz:  Rebuilt.
  /etc/default/geninitrd: added option AUTO_UPDATE_GRUB=true to run update-grub
  after generating the initrd.
  Move the remove-orphaned-initrds section from geninitrd to setup.01.mkinitrd.
  setup.01.mkinitrd: support AUTO_UPDATE_GRUB. Suppress warnings from
  libdevmapper when setup.01.mkinitrd is run within upgradepkg's flock locking.
a/pkgtools-15.1-noarch-20.txz:  Rebuilt.
  pkgtool: set INSIDE_INSTALLER in the Setup section to match the expected
  behavior. Thanks to Mechanikx.
  upgradepkg: allow text produced by install scripts to reach the console in
  --terse mode.
d/kernel-headers-6.12.3-x86-1.txz:  Upgraded.
k/kernel-source-6.12.3-noarch-1.txz:  Upgraded.
l/PyQt-builder-1.17.0-x86_64-1.txz:  Upgraded.
l/sof-firmware-2024.09.2-noarch-1.txz:  Upgraded.
l/xapian-core-1.4.27-x86_64-1.txz:  Upgraded.
x/mesa-24.3.1-x86_64-2.txz:  Rebuilt.
  Revert commit 4c065158927d7bacc5eb1e4f2491b1db93f1dc12:
  [PATCH] dri: revert INVALID modifier special-casing.
  This fixes a crash with AMD RX 470 through 590.
  Thanks to genss for the bug report.
xfce/xfce4-pulseaudio-plugin-0.4.9-x86_64-1.txz:  Upgraded.
isolinux/initrd.img:  Rebuilt.
kernels/*:  Upgraded.
usb-and-pxe-installers/usbboot.img:  Rebuilt.
2024-12-07 00:44:23 +01:00

109 lines
3.8 KiB
Bash

#!/bin/sh
TMP=/var/log/setup/tmp
T_PX="`cat $TMP/SeTT_PX`"
# First, determine our slackware kernel name:
for ELEMENT in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
if $(cat /proc/cmdline | cut -f $ELEMENT -d ' ' | grep -q SLACK_KERNEL) ; then
SLACK_KERNEL=$(cat /proc/cmdline | cut -f $ELEMENT -d ' ' | cut -f 2 -d =)
fi
done
unset ELEMENT
# Next, find the kernel's release version:
VERSION=$(uname -r | tr - _)
# If someone tries to install kernels from a CD that doesn't contain any,
# we'll give them one chance to find a disc that does.
swapdisks() {
if [ -r ${T_PX}/var/log/setup/tmp/SeTCDdev ]; then
CDDEVICE=$(cat ${T_PX}/var/log/setup/tmp/SeTCDdev)
elif [ -r /tmp/SeTCDdev ]; then
CDDEVICE=$(cat /tmp/SeTCDdev)
else
return 1
fi
umount $CDDEVICE 1> /dev/null 2> /dev/null
eject -s $CDDEVICE
dialog --title "REINSERT KERNEL DISC" --msgbox \
"Please reinsert the Slackware disc containing the collection \
of Linux kernels. Usually this is disc number one (the disc \
that you boot from). Once you've inserted the disc, hit ENTER \
to continue." \
8 61
mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null
if [ ! $? = 0 ]; then
sleep 1
mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null
if [ ! $? = 0 ]; then
sleep 11
mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null
fi
fi
}
# Determine if we need the .x64 suffix for x86_64 config files:
if [ "$(uname -m)" = "x86_64" ]; then
CONFIGSUFFIX=".x64"
else
unset CONFIGSUFFIX
fi
( cd boot
if [ "$SLACK_KERNEL" = "generic.s" ]; then
if [ -r vmlinuz-generic-$VERSION ]; then
ln -sf vmlinuz-generic-$VERSION vmlinuz
ln -sf config-generic-${VERSION}${CONFIGSUFFIX} config
ln -sf System.map-huge-$VERSION System.map
fi
elif [ "$SLACK_KERNEL" = "huge.s" ]; then
if [ -r vmlinuz-huge-$VERSION ]; then
ln -sf vmlinuz-huge-$VERSION vmlinuz
ln -sf config-huge-${VERSION}${CONFIGSUFFIX} config
ln -sf System.map-huge-$VERSION System.map
fi
elif [ "$SLACK_KERNEL" = "hugesmp.s" ]; then
if [ -r vmlinuz-huge-smp-$VERSION ]; then
ln -sf vmlinuz-huge-smp-$VERSION vmlinuz
ln -sf config-huge-smp-$VERSION config
ln -sf System.map-huge-smp-$VERSION System.map
fi
elif [ "$SLACK_KERNEL" = "gensmp.s" ]; then
if [ -r vmlinuz-generic-smp-$VERSION ]; then
ln -sf vmlinuz-generic-smp-$VERSION vmlinuz
ln -sf config-generic-smp-$VERSION config
ln -sf System.map-generic-smp-$VERSION System.map
fi
elif [ "$SLACK_KERNEL" = "speakup.s" ]; then
# This assumes symlinks /nfs and /cdrom both pointing to /var/log/mount:
if $(mount | grep -q "type nfs") ; then
PLINK=nfs
else
PLINK=cdrom
fi
if [ $PLINK = cdrom -a ! -d /$PLINK/kernels ]; then
swapdisks
fi
if [ ! -d /$PLINK/kernels ]; then
dialog --title "ERROR ATTEMPTING TO INSTALL KERNEL" --msgbox "Sorry, but the directory /$PLINK/kernels \
was not found. You may need to install the requested kernel $SLACK_KERNEL manually \
and then install LILO \
before your system will be able to boot correctly." \
0 0
else
rm -f $T_PX/boot/vmlinuz $T_PX/boot/config $T_PX/boot/System.map
cp -a /$PLINK/kernels/$SLACK_KERNEL/bzImage $T_PX/boot/vmlinuz-$SLACK_KERNEL-$VERSION
cp -a /$PLINK/kernels/$SLACK_KERNEL/config $T_PX/boot/config-$SLACK_KERNEL-${VERSION}${CONFIGSUFFIX}
cp -a /$PLINK/kernels/$SLACK_KERNEL/System.map.gz $T_PX/boot
( cd $T_PX/boot
gzip -d System.map.gz
mv System.map System.map-$SLACK_KERNEL-$VERSION
ln -sf vmlinuz-$SLACK_KERNEL-$VERSION vmlinuz
ln -sf config-$SLACK_KERNEL-${VERSION}${CONFIGSUFFIX} config
ln -sf System.map-$SLACK_KERNEL-$VERSION System.map
)
fi
fi
)
# and after all that hard work