various fixes

This commit is contained in:
shelldweller 2023-06-12 18:29:45 -05:00
parent 7ee7ce4ed1
commit 8706462a36
4 changed files with 17 additions and 18 deletions

View File

@ -1,5 +1,5 @@
A project in the works to convert an installed Slackware-15.0 system into a Freenix-15.0 system.
Both 64-bit and 32-bit versions are covered.
Both 64-bit and 32-bit versions can be converted.
There are 4 scripts in total:
@ -23,7 +23,6 @@ BLACKLISTFILE = the location of your slackpkg blacklist file (default = /etc/sla
This builds and installs the Linux-Libre kernel, headers, modules.
Modifies stock kernel-configs and SlackBuild files.
If the new kernel is much newer than the stock kernel, the build script will propmpt for new kernel configs.
arguments:

View File

@ -19,19 +19,19 @@ CWD0=$(pwd)
# future proof the release version number
# to-do: make this work on -current?
RELEASE=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
RELEASE=${RELEASE:-$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')}
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
REPOURL='https://mirrors.slackware.com'
REPOURL=${REPOURL:-'https://mirrors.slackware.com'}
# prepare for kernel building
BUILDDIR='/tmp/linux-libre-4-freenix'
BUILDDIR=${BUILDDIR:-'/tmp/linux-libre-4-freenix'}
# Set blacklist file, just in case...
BLACKLISTFILE='/etc/slackpkg/blacklist'
BLACKLISTFILE=${BLACKLISTFILE:-'/etc/slackpkg/blacklist'}
# Set variable to 'yes' to install package after building:
INSTALL_FIRMWARE='no'
INSTALL_FIRMWARE=${INSTALL_FIRMWARE:-'no'}
# download linux-libre firmware
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@ -70,7 +70,7 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "% Building Linux-Libre firmware"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
./kernel-firmware-gnu.SlackBuild
TMP=${BUILDDIR}/firmware ./kernel-firmware-gnu.SlackBuild
if [ $INSTALL_FIRMWARE == 'no' ]; then
@ -95,7 +95,7 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "% Installing Linux-Libre firmware"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
installpkg /tmp/kernel-firmware-gnu*
installpkg ${BUILDDIR}/firmware/kernel-firmware-gnu*
# Add non-free packages to blacklist if not already blacklisted
if ! grep -q "kernel-firmware" $BLACKLISTFILE ; then

View File

@ -18,25 +18,25 @@
CWD0=$(pwd)
# Set blacklist file, just in case...
BLACKLISTFILE='/etc/slackpkg/blacklist'
BLACKLISTFILE=${BLACKLISTFILE:-'/etc/slackpkg/blacklist'}
# Set variable to 'yes' to install packages after building:
INSTALL_KERNEL='no'
INSTALL_KERNEL=${INSTALL_KERNEL:-'no'}
# future proof the release version number
# to-do: make this work on -current?
RELEASE=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
RELEASE=${RELEASE:-$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')}
# prepare for kernel building
BUILDDIR='/tmp/linux-libre-4-freenix'
BUILDDIR=${BUILDDIR:-'/tmp/linux-libre-4-freenix'}
rm -r ${BUILDDIR}
mkdir ${BUILDDIR}
cd ${BUILDDIR}
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
REPOURL='https://mirrors.slackware.com'
REPOURL=${REPOURL:-'https://mirrors.slackware.com'}
# Set latest stock version here
STOCKVERSION=$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)')
STOCKVERSION=${STOCKVERSION:-$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)')}
# download kernel SlackBuild scripts
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@ -54,7 +54,7 @@ sed -i 's/oldconfig/olddefconfig/' kernel-modules.SlackBuild
sed -i 's/oldconfig/olddefconfig/' kernel-source.SlackBuild
# use MAJORVERSION to change branches if you wish
MAJORVERSION=$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)' | sed 's/\.[^.]*$//')
MAJORVERSION=${MAJORVERSION:-$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)' | sed 's/\.[^.]*$//')}
# download latest Linux-Libre source in the same branch as the stock kernel
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@ -65,7 +65,7 @@ wget -r -l1 -np -nd "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATES
wget http://linux-libre.fsfla.org/pub/linux-libre/SIGNING-KEY.linux-libre
gpg --import SIGNING-KEY.linux-libre
gpg --verify *tar.lz.sign
LIBREVERSION=$(ls linux-libre-*-gnu.tar.lz | sed 's/[^0-9.]*//g' | sed 's/..$//')
LIBREVERSION=${LIBREVERSION:-$(ls linux-libre-*-gnu.tar.lz | sed 's/[^0-9.]*//g' | sed 's/..$//')}
ln -s linux-libre-${LIBREVERSION}-gnu.tar.lz linux-${LIBREVERSION}.tar.lz

View File

@ -18,7 +18,7 @@
####################################################################################
# Set blacklist file, just in case...
BLACKLISTFILE="/etc/slackpkg/blacklist"
BLACKLISTFILE=${BLACKLISTFILE:-"/etc/slackpkg/blacklist"}
# Remove non-free stock packages from full stock installation
# Comment out any you'd like to keep