updated slackware2freenix script suite
This commit is contained in:
parent
1524e34d76
commit
1801af77a6
|
@ -37,7 +37,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=palemoon
|
||||
VERSION=${VERSION:-32.1.1}
|
||||
VERSION=${VERSION:-32.2.0}
|
||||
SRCNAM1=${SRCNAM1:-$PRGNAM-${VERSION}_Release}
|
||||
SRCNAM2=${SRCNAM2:-uxp-RB_20230320}
|
||||
BUILD=${BUILD:-3}
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#!/bin/bash
|
||||
###################################################################################
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script, part 1:
|
||||
# Non-free package remover and blacklister
|
||||
# written by krt@beauxbead.com / krt.beauxbead.com
|
||||
# Released under the WTFPL 2.0 http://www.wtfpl.net/
|
||||
#
|
||||
# This is intended to be run ONCE as root on a fully updated stock system.
|
||||
# It removes all non-free packages (as deemed by freenix.net)
|
||||
# and optionally builds the latest 5.15.N Linux-libre kernel for your architecture.
|
||||
# Works on both 32-bit and 64-bit installations of Slackware 15.0
|
||||
# It removes all non-free packages (as deemed by freenix.net) and adds each
|
||||
# one to the system blacklist.
|
||||
#
|
||||
# Works on both 32-bit and 64-bit installations of Slackware 15.0, as well as
|
||||
# ARM-based Slackware variants and other derivatives (not fully tested).
|
||||
#
|
||||
# No guarantees are given, this script is highly experimental.
|
||||
# Feel free to make changes and share with the community.
|
||||
|
@ -17,7 +20,7 @@
|
|||
# Set blacklist file, just in case...
|
||||
BLACKLISTFILE="/etc/slackpkg/blacklist"
|
||||
|
||||
# Remove non-free stock packages from full default installation
|
||||
# Remove non-free stock packages from full stock installation
|
||||
# Comment out any you'd like to keep
|
||||
removepkg \
|
||||
amp \
|
||||
|
@ -35,7 +38,7 @@ removepkg \
|
|||
zd1211-firmware \
|
||||
|
||||
# Add non-free packages to blacklist
|
||||
# Comment out any you want to exclude from the blacklist
|
||||
# Comment out any to be excluded from blacklist
|
||||
echo "#" >> $BLACKLISTFILE
|
||||
echo "##############################################" >> $BLACKLISTFILE
|
||||
echo "# Non-free packages removed as per freenix.net" >> $BLACKLISTFILE
|
||||
|
@ -53,18 +56,6 @@ echo "unarj" >> $BLACKLISTFILE
|
|||
echo "xgames" >> $BLACKLISTFILE
|
||||
echo "zd1211-firmware" >> $BLACKLISTFILE
|
||||
|
||||
# Blacklist kernel packages here so that it only happens once
|
||||
echo "#" >> $BLACKLISTFILE
|
||||
echo "###################################################################" >> $BLACKLISTFILE
|
||||
echo "# Kernel packages removed to prevent stock kernel being reinstalled" >> $BLACKLISTFILE
|
||||
echo "kernel-firmware" >> $BLACKLISTFILE
|
||||
echo "kernel-generic.*" >> $BLACKLISTFILE
|
||||
echo "kernel-headers.*" >> $BLACKLISTFILE
|
||||
echo "kernel-huge.*" >> $BLACKLISTFILE
|
||||
echo "kernel-modules.*" >> $BLACKLISTFILE
|
||||
echo "kernel-source" >> $BLACKLISTFILE
|
||||
echo "kernel.*" >> $BLACKLISTFILE
|
||||
|
||||
# Print out new blacklist
|
||||
cat $BLACKLISTFILE
|
||||
|
||||
|
@ -72,6 +63,6 @@ cat $BLACKLISTFILE
|
|||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Non-free software is removed and blacklisted."
|
||||
echo "% To (re)build a libre kernel for your system, run: "
|
||||
echo "% ./update-freenix-kernels.sh"
|
||||
echo "% ./linux-libre-kernel-builder-installer.sh"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
exit 0
|
|
@ -0,0 +1,94 @@
|
|||
#!/bin/bash
|
||||
#######################################################################
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script, part 3
|
||||
# Linux-Libre firmware builder and installer
|
||||
# written by krt@beauxbead.com / krt.beauxbead.com
|
||||
# Released under the WTFPL 2.0 http://www.wtfpl.net/
|
||||
#
|
||||
# This is intended to be run as root. It builds the latest Linux-libre
|
||||
# firmware and upgrades the stock firmware package to the libre one.
|
||||
# Works on both 32-bit and 64-bit installations of Slackware 15.0.
|
||||
# Slackware derivatives might also work, this is untested though.
|
||||
#
|
||||
# No guarantees are given, this script is highly experimental.
|
||||
# Feel free to make changes and share with the community.
|
||||
#######################################################################
|
||||
|
||||
# where is this script being run from?
|
||||
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')
|
||||
|
||||
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
|
||||
REPOURL="https://mirrors.slackware.com"
|
||||
|
||||
# prepare for kernel building
|
||||
BUILDDIR="/tmp/linux-libre-4-freenix"
|
||||
|
||||
# Remove stock firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Removing stock firmware package"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
removepkg kernel-firmware
|
||||
|
||||
# download linux-libre firmware
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Downloading Linux-Libre firmware"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
rm -r ${BUILDDIR}/firmware
|
||||
mkdir ${BUILDDIR}/firmware
|
||||
cd ${BUILDDIR}/firmware
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/source/a/kernel-firmware/kernel-firmware.SlackBuild
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/source/a/kernel-firmware/slack-desc
|
||||
chmod a+x *.SlackBuild
|
||||
|
||||
# patch SlackBuild and slack-desc to fit linux-libre-firmware using:
|
||||
# sed -i 's/ --- / --- /' slack-desc
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Patching SlackBuild and slack-desc files for linux-libre"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
# patch kernel-firmware.SlackBuild
|
||||
sed -i 's/PKGNAM=kernel-firmware/PKGNAM=kernel-firmware-gnu/' kernel-firmware.SlackBuild
|
||||
sed -i 's/.*git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/commit\/?id=HEAD | grep " committer " | head -n 1 | rev | cut -f 3 -d.*/ DATE="$(lynx -dump -width=256 https:\/\/jxself.org\/git\/linux-libre-firmware.git | grep "Update to latest upstream \\[17\\]master" | head -n 1 | cut -f 4 -d " ")"/' kernel-firmware.SlackBuild
|
||||
sed -i 's/https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/commit\/?id=HEAD | grep " commit " | head -n 1 | cut -f 2 -d ] | cut -b 1-7/"https:\/\/jxself.org\/git\/?p=linux-libre-firmware.git;a=commit" | grep " commit " | head -n 1 | cut -b 14-20/' kernel-firmware.SlackBuild
|
||||
sed -i 's/git:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git/https:\/\/jxself.org\/git\/linux-libre-firmware.git/' kernel-firmware.SlackBuild
|
||||
sed -i 's/kernel-firmware-$/kernel-firmware-gnu-$/' kernel-firmware.SlackBuild
|
||||
sed -i 's/mv linux-firmware/mv linux-libre-firmware/' kernel-firmware.SlackBuild
|
||||
sed -i 's/kernel-firmware-${DATE}/kernel-firmware-gnu-${DATE}/' kernel-firmware.SlackBuild
|
||||
# patch slack-desc
|
||||
sed -i 's/kernel-firmware/kernel-firmware-gnu/' slack-desc
|
||||
sed -i 's/Linux/Linux-libre/' slack-desc
|
||||
sed -i 's/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/jxself.org\/git\/linux-libre-firmware.git/' slack-desc
|
||||
|
||||
# build firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Building Linux-Libre firmware"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
cp kernel-firmware.SlackBuild kernel-firmware-gnu.SlackBuild
|
||||
chmod a+x kernel-firmware-gnu.SlackBuild
|
||||
./kernel-firmware-gnu.SlackBuild
|
||||
|
||||
# install firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Installing Linux-Libre firmware"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
installpkg /tmp/kernel-firmware-gnu*
|
||||
|
||||
# Blacklist stock firmware package
|
||||
echo "kernel-firmware" >> $BLACKLISTFILE
|
||||
|
||||
# Print out new blacklist
|
||||
cat $BLACKLISTFILE
|
||||
|
||||
# that should do it!
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Linux-libre firmware has been built and installed."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
cd ${CWD0}
|
||||
|
||||
exit 0
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
#######################################################################
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script, part 2:
|
||||
# Linux-Libre kernel builder and package installer
|
||||
# written by krt@beauxbead.com / krt.beauxbead.com
|
||||
# Released under the WTFPL 2.0 http://www.wtfpl.net/
|
||||
#
|
||||
|
@ -16,6 +17,9 @@
|
|||
# where is this script being run from?
|
||||
CWD0=$(pwd)
|
||||
|
||||
# Set blacklist file, just in case...
|
||||
BLACKLISTFILE="/etc/slackpkg/blacklist"
|
||||
|
||||
# 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')
|
||||
|
@ -26,11 +30,15 @@ rm -r ${BUILDDIR}
|
|||
mkdir ${BUILDDIR}
|
||||
cd ${BUILDDIR}
|
||||
|
||||
# download kernel SlackBuild scripts
|
||||
# Uses mirrors.slackware.com to find a mirror near you, feel free to change to a local mirror
|
||||
REPOURL="https://mirrors.slackware.com"
|
||||
# Set latest stock version here
|
||||
STOCKVERSION=$(wget -q -O - $REPOURL/slackware/slackware64-$RELEASE/patches/source/ | grep -o -P '(?<=>linux-).*(?=\/<)')
|
||||
|
||||
# download kernel SlackBuild scripts
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Downloading stock kernel SlackBuild files."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/kernel-generic.SlackBuild
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/kernel-headers.SlackBuild
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/kernel-modules.SlackBuild
|
||||
|
@ -41,8 +49,13 @@ chmod a+x *.SlackBuild
|
|||
sed -i 's/oldconfig/olddefconfig/' kernel-generic.SlackBuild
|
||||
sed -i 's/oldconfig/olddefconfig/' kernel-modules.SlackBuild
|
||||
|
||||
# download latest Linux-Libre source in the same branch as the stock kernel
|
||||
# use MAJORVERSION to change branches if you wish
|
||||
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 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Downloading Linux-Libre source."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
wget -r -l1 -np -nd "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-${MAJORVERSION}.N" -A "linux-libre-${MAJORVERSION}.*-gnu.tar.lz*"
|
||||
wget -r -l1 -np -nd "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-${MAJORVERSION}.N" -A "linux-libre-${MAJORVERSION}.*-gnu.tar.sign"
|
||||
wget http://linux-libre.fsfla.org/pub/linux-libre/SIGNING-KEY.linux-libre
|
||||
|
@ -53,6 +66,9 @@ 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
|
||||
|
||||
# grab most recent stock kernel-configs and use them as latest libre-configs
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Downloading stock kernel-configs for use with libre-kernel."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
mkdir kernel-configs
|
||||
cd kernel-configs
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/kernel-configs/config-generic-${STOCKVERSION} -O config-generic-${LIBREVERSION}
|
||||
|
@ -64,6 +80,9 @@ wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION
|
|||
cd ../
|
||||
|
||||
# Grab slack-desc files for packaging later
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Downloading slack-desc files for kernel-packages."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
mkdir slack-desc
|
||||
cd slack-desc
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/slack-desc/slack-desc.kernel-generic-smp.i686
|
||||
|
@ -83,72 +102,46 @@ cd ../
|
|||
wget $REPOURL/slackware/slackware64-$RELEASE/patches/source/linux-${STOCKVERSION}/build-all-kernels.sh
|
||||
chmod +x build-all-kernels.sh
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Now building the kernels using Pat's script, this may take some time..."
|
||||
echo "% Now building the kernels using Pat's script, this may take some time."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
INSTALL_PACKAGES=NO ./build-all-kernels.sh
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% We're done with Pat's script. Thanks Pat!"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
# Upgrade kernel packages all at once
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Upgrading stock kernel packages to libre kernel packages..."
|
||||
echo "% Upgrading stock kernel packages to libre kernel packages."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
upgradepkg /tmp/output-*/kernel-*.t?z
|
||||
|
||||
# Now generate new initrd and update the bootloader
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Running genintird and lilo."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
geninitrd
|
||||
lilo
|
||||
|
||||
# what about firmware?
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Kernel packages are done, now for the firmware package..."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
removepkg kernel-firmware
|
||||
# Blacklist stock kernel packages
|
||||
echo "#" >> $BLACKLISTFILE
|
||||
echo "###################################################################" >> $BLACKLISTFILE
|
||||
echo "# Kernel packages removed to prevent stock kernel being reinstalled" >> $BLACKLISTFILE
|
||||
echo "kernel-generic.*" >> $BLACKLISTFILE
|
||||
echo "kernel-headers.*" >> $BLACKLISTFILE
|
||||
echo "kernel-huge.*" >> $BLACKLISTFILE
|
||||
echo "kernel-modules.*" >> $BLACKLISTFILE
|
||||
echo "kernel-source" >> $BLACKLISTFILE
|
||||
echo "kernel.*" >> $BLACKLISTFILE
|
||||
|
||||
# download linux-libre firmware
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Begin Firmware Stuff Here?!?!?!"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
# Print out new blacklist
|
||||
cat $BLACKLISTFILE
|
||||
|
||||
rm -r ${BUILDDIR}/firmware
|
||||
mkdir ${BUILDDIR}/firmware
|
||||
cd ${BUILDDIR}/firmware
|
||||
#wget https://jxself.org/firmware/linux-libre-firmware-1.4.tar.lz
|
||||
#wget https://jxself.org/firmware/linux-libre-firmware-1.4.tar.lz.asc
|
||||
#KEYSERVER="keyserver.ubuntu.com"
|
||||
#gpg --keyserver $KEYSERVER --recv-keys 545A3198
|
||||
#gpg --verify *asc
|
||||
#tar -xf *tar.lz
|
||||
#cp -r linux-libre-firmware/bin /lib/firmware
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/source/a/kernel-firmware/kernel-firmware.SlackBuild
|
||||
wget $REPOURL/slackware/slackware64-$RELEASE/source/a/kernel-firmware/slack-desc
|
||||
chmod a+x *.SlackBuild
|
||||
# patch SlackBuild and slack-desc to fit linux-libre-firmware
|
||||
|
||||
sed -i 's/PKGNAM=kernel-firmware/PKGNAM=kernel-firmware-gnu/' kernel-firmware.SlackBuild
|
||||
sed -i 's/.*git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/commit\/?id=HEAD | grep " committer " | head -n 1 | rev | cut -f 3 -d.*/ DATE="$(lynx -dump -width=256 https:\/\/jxself.org\/git\/linux-libre-firmware.git | grep "Update to latest upstream \\[17\\]master" | head -n 1 | cut -f 4 -d " ")"/' kernel-firmware.SlackBuild
|
||||
sed -i 's/https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/commit\/?id=HEAD | grep " commit " | head -n 1 | cut -f 2 -d ] | cut -b 1-7/"https:\/\/jxself.org\/git\/?p=linux-libre-firmware.git;a=commit" | grep " commit " | head -n 1 | cut -b 14-20/' kernel-firmware.SlackBuild
|
||||
sed -i 's/git:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git/https:\/\/jxself.org\/git\/linux-libre-firmware.git/' kernel-firmware.SlackBuild
|
||||
sed -i 's/kernel-firmware-$/kernel-firmware-gnu-$/' kernel-firmware.SlackBuild
|
||||
sed -i 's/mv linux-firmware/mv linux-libre-firmware/' kernel-firmware.SlackBuild
|
||||
sed -i 's/kernel-firmware-${DATE}/kernel-firmware-gnu-${DATE}/' kernel-firmware.SlackBuild
|
||||
#sed -i 's/ --- / --- /' kernel-firmware.SlackBuild
|
||||
|
||||
sed -i 's/kernel-firmware/kernel-firmware-gnu/' slack-desc
|
||||
sed -i 's/Linux/Linux-libre/' slack-desc
|
||||
sed -i 's/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/firmware\/linux-firmware.git\/jxself.org\/git\/linux-libre-firmware.git/' slack-desc
|
||||
#sed -i 's/ --- / --- /' slack-desc
|
||||
|
||||
echo "Making linux-libre-firmware package"
|
||||
./kernel-firmware.SlackBuild
|
||||
|
||||
# install firmware package
|
||||
echo "# Install firmware package here #"
|
||||
|
||||
installpkg /tmp/kernel-firmware-gnu*
|
||||
|
||||
# that should do it!
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% All done, you can reboot now. This script does not clean up after itself."
|
||||
echo "% If you desire, you can manually remove the files left behind in /tmp/ ."
|
||||
echo "% Stock kernel packages have been upgraded to libre kernel packages."
|
||||
echo "% The last step is to upgrade the firmware package, do this by running:"
|
||||
echo "% ./linux-libre-firmware-builder-installer.sh"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
cd ${CWD0}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
#######################################################################
|
||||
# Slackware(64)-15.0 to Freenix(64)-15.0 script, all three parts:
|
||||
# Remove nonfree packages, build & install libre kernel & firmware
|
||||
# written by krt@beauxbead.com / krt.beauxbead.com
|
||||
# Released under the WTFPL 2.0 http://www.wtfpl.net/
|
||||
#
|
||||
# This is intended to be run as root. It builds the latest Linux-libre
|
||||
# kernel for your architecture from the same branch as the upstream
|
||||
# stock kernel. Works on both 32-bit and 64-bit installations of
|
||||
# Slackware 15.0 .
|
||||
#
|
||||
# No guarantees are given, this script is highly experimental.
|
||||
# Feel free to make changes and share with the community.
|
||||
#######################################################################
|
||||
|
||||
# Banish non-free packages
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Banish Non-Free Packages"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
./banish-nonfree-packages.sh
|
||||
# Build and install linux-libre kernel packages
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Build and install Linux-libre kernel packages"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
./linux-libre-kernel-builder-installer.sh
|
||||
# Build and install linux-libre firmware package
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% Build and install Linux-libre firmware package"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
./linux-libre-firmware-builder-installer.sh
|
||||
# Say goodbye...
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "% You are now fully liberated, you can reboot the system."
|
||||
echo "% This script does not clean up after itself, you can"
|
||||
echo "% manually remove the files in /tmp/, however the packages"
|
||||
echo "% and SlackBuilds that resulted from this process are there"
|
||||
echo "% in case you want to save or share them for any reason."
|
||||
echo "% "
|
||||
echo "% Welcome to Freenix. See https://freenix.net/ for more."
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue