Drop broken Void Linux explicit support. Void Linux users should use the Generic install as a replacement.
Fixes https://github.com/Frogging-Family/linux-tkg/issues/655
This commit is contained in:
11
README.md
11
README.md
@@ -121,17 +121,6 @@ cd path/to/linux-tkg
|
|||||||
```
|
```
|
||||||
The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`.
|
The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`.
|
||||||
|
|
||||||
#### Void Linux
|
|
||||||
```shell
|
|
||||||
git clone -b tkg https://github.com/Hyper-KVM/void-packages/
|
|
||||||
cd void-packages
|
|
||||||
./xbps-src binary-bootstrap
|
|
||||||
# Optional: edit customization.cfg located in srcpkgs/linux-tkg/files
|
|
||||||
# Optional: add custom userpatches with the ".mypatch" extension to srcpkgs/linux-tkg/files/mypatches
|
|
||||||
./xbps-src pkg -j$(nproc) linux-tkg
|
|
||||||
```
|
|
||||||
If you have to restart the build for any reason, run `./xbps-src clean linux-tkg` first.
|
|
||||||
|
|
||||||
#### Generic install
|
#### Generic install
|
||||||
The interactive `install.sh` script can be used to perform a "Generic" install by choosing `Generic` when prompted. It git clones the kernel tree in the `linux-src-git` folder, patches the code and edits a `.config` file in it. The commands to do are the following:
|
The interactive `install.sh` script can be used to perform a "Generic" install by choosing `Generic` when prompted. It git clones the kernel tree in the `linux-src-git` folder, patches the code and edits a `.config` file in it. The commands to do are the following:
|
||||||
```shell
|
```shell
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# linux-TkG config file
|
# linux-TkG config file
|
||||||
|
|
||||||
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
|
# Linux distribution you are using, options are "Arch", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
|
||||||
# It is automatically set to "Arch" when using PKGBUILD.
|
# It is automatically set to "Arch" when using PKGBUILD.
|
||||||
# If left empty, the script will prompt
|
# If left empty, the script will prompt
|
||||||
_distro=""
|
_distro=""
|
||||||
|
@@ -485,11 +485,7 @@ _tkg_initscript() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# create build dir early
|
# create build dir early
|
||||||
if [ "$_distro" = "Void" ]; then
|
|
||||||
_path="${XBPS_BUILDDIR}/${wrksrc}"
|
|
||||||
else
|
|
||||||
_path="${_where}"
|
_path="${_where}"
|
||||||
fi
|
|
||||||
|
|
||||||
# Clean the logs folder
|
# Clean the logs folder
|
||||||
[ -e "${_where}/logs" ] && rm -rf "${_where}/logs"
|
[ -e "${_where}/logs" ] && rm -rf "${_where}/logs"
|
||||||
@@ -501,13 +497,8 @@ _tkg_initscript() {
|
|||||||
# Select CPU scheduler
|
# Select CPU scheduler
|
||||||
_set_cpu_scheduler
|
_set_cpu_scheduler
|
||||||
|
|
||||||
if [ "$_distro" != "Void" ]; then
|
|
||||||
cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_where" # copy patches inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
|
cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_where" # copy patches inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
|
||||||
cp "$_where"/linux-tkg-config/${_basekernel}/* "$_where" # copy config files and hooks inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
|
cp "$_where"/linux-tkg-config/${_basekernel}/* "$_where" # copy config files and hooks inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
|
||||||
else
|
|
||||||
cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_path"
|
|
||||||
cp "$_where"/linux-tkg-config/${_basekernel}/* "$_path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set compiler
|
# Set compiler
|
||||||
_set_compiler
|
_set_compiler
|
||||||
@@ -601,9 +592,6 @@ _tkg_srcprep() {
|
|||||||
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt
|
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt
|
||||||
echo "" > localversion.20-pkgname
|
echo "" > localversion.20-pkgname
|
||||||
fi
|
fi
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
pkgver="${version}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Hardened Patches
|
# Hardened Patches
|
||||||
if [ "${_configfile}" = "config_hardened.x86_64" ] && [ "${_cpusched}" = "cfs" ]; then
|
if [ "${_configfile}" = "config_hardened.x86_64" ] && [ "${_cpusched}" = "cfs" ]; then
|
||||||
@@ -619,9 +607,6 @@ _tkg_srcprep() {
|
|||||||
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
|
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
|
||||||
|
|
||||||
_patch_location="$srcdir"
|
_patch_location="$srcdir"
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
_patch_location="${wrksrc}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$_kver" = "504" ]; then
|
if [ "$_kver" = "504" ]; then
|
||||||
_patch_name="more-uarches-for-kernel-4.19-5.4"
|
_patch_name="more-uarches-for-kernel-4.19-5.4"
|
||||||
@@ -791,16 +776,6 @@ _tkg_srcprep() {
|
|||||||
tkgpatch="$srcdir/0009-glitched-bmq.patch" && _tkg_patcher
|
tkgpatch="$srcdir/0009-glitched-bmq.patch" && _tkg_patcher
|
||||||
elif [ "${_cpusched}" = "cacule" ]; then
|
elif [ "${_cpusched}" = "cacule" ]; then
|
||||||
_msg="Applying cacule patch"
|
_msg="Applying cacule patch"
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
if [[ $_kver -lt 515 ]]; then
|
|
||||||
wget -P "$wrksrc" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
|
|
||||||
elif [[ $_kver = 515 ]]; then
|
|
||||||
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
|
|
||||||
else
|
|
||||||
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
|
|
||||||
fi
|
|
||||||
tkgpatch="$wrksrc/cacule-${_basekernel}.patch" && _tkg_patcher
|
|
||||||
else
|
|
||||||
if [[ $_kver -lt 515 ]]; then
|
if [[ $_kver -lt 515 ]]; then
|
||||||
wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
|
wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
|
||||||
elif [[ $_kver = 515 ]]; then
|
elif [[ $_kver = 515 ]]; then
|
||||||
@@ -810,35 +785,19 @@ _tkg_srcprep() {
|
|||||||
fi
|
fi
|
||||||
tkgpatch="$srcdir/cacule-${_basekernel}.patch" && _tkg_patcher
|
tkgpatch="$srcdir/cacule-${_basekernel}.patch" && _tkg_patcher
|
||||||
tkgpatch="$srcdir/0001-cacULE-${_basekernel}.patch" && _tkg_patcher
|
tkgpatch="$srcdir/0001-cacULE-${_basekernel}.patch" && _tkg_patcher
|
||||||
fi
|
|
||||||
elif [ "${_cpusched}" = "tt" ]; then
|
elif [ "${_cpusched}" = "tt" ]; then
|
||||||
_msg="Applying TT patch"
|
_msg="Applying TT patch"
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$wrksrc"/tt.patch
|
|
||||||
tkgpatch="$wrksrc/tt.patch" && _tkg_patcher
|
|
||||||
else
|
|
||||||
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$srcdir"/tt.patch
|
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$srcdir"/tt.patch
|
||||||
tkgpatch="$srcdir/tt.patch" && _tkg_patcher
|
tkgpatch="$srcdir/tt.patch" && _tkg_patcher
|
||||||
fi
|
|
||||||
if [ "$_tt_high_hz" = "true" ] && [ $_kver = 515 ]; then
|
if [ "$_tt_high_hz" = "true" ] && [ $_kver = 515 ]; then
|
||||||
_msg="Applying TT High HZ patch"
|
_msg="Applying TT High HZ patch"
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$wrksrc"/tt_high_hz.patch
|
|
||||||
tkgpatch="$wrksrc/tt_high_hz.patch" && _tkg_patcher
|
|
||||||
else
|
|
||||||
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$srcdir"/tt_high_hz.patch
|
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$srcdir"/tt_high_hz.patch
|
||||||
tkgpatch="$srcdir/tt_high_hz.patch" && _tkg_patcher
|
tkgpatch="$srcdir/tt_high_hz.patch" && _tkg_patcher
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
elif [ "${_cpusched}" = "bore" ]; then
|
elif [ "${_cpusched}" = "bore" ]; then
|
||||||
_msg="Applying BORE patch"
|
_msg="Applying BORE patch"
|
||||||
if [ "${_distro}" = "Void" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$wrksrc"/0001-bore.patch
|
|
||||||
tkgpatch="$wrksrc/0001-bore.patch" && _tkg_patcher
|
|
||||||
else
|
|
||||||
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$srcdir"/0001-bore.patch
|
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$srcdir"/0001-bore.patch
|
||||||
tkgpatch="$srcdir/0001-bore.patch" && _tkg_patcher
|
tkgpatch="$srcdir/0001-bore.patch" && _tkg_patcher
|
||||||
fi
|
|
||||||
elif [ "${_cpusched}" = "cfs" ]; then
|
elif [ "${_cpusched}" = "cfs" ]; then
|
||||||
_msg="Applying Glitched CFS additions patch"
|
_msg="Applying Glitched CFS additions patch"
|
||||||
tkgpatch="$srcdir/0003-glitched-cfs-additions.patch" && _tkg_patcher
|
tkgpatch="$srcdir/0003-glitched-cfs-additions.patch" && _tkg_patcher
|
||||||
@@ -909,8 +868,7 @@ _tkg_srcprep() {
|
|||||||
|
|
||||||
# ccache fix
|
# ccache fix
|
||||||
if [ "$_noccache" != "true" ]; then
|
if [ "$_noccache" != "true" ]; then
|
||||||
if { [ "$_distro" = "Arch" ] && pacman -Qq ccache &> /dev/null; } || { [ "$_distro" = "Ubuntu" ] && dpkg -l ccache > /dev/null; }\
|
if { [ "$_distro" = "Arch" ] && pacman -Qq ccache &> /dev/null; } || { [ "$_distro" = "Ubuntu" ] && dpkg -l ccache > /dev/null; }; then
|
||||||
|| { [ "$_distro" = "Void" ] && xbps-query -s ccache > /dev/null; } ; then
|
|
||||||
_disable "GCC_PLUGINS"
|
_disable "GCC_PLUGINS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -1642,7 +1600,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
|
|||||||
rm -f "$_where"/linux"$_basever"-tkg-userpatches/$_p
|
rm -f "$_where"/linux"$_basever"-tkg-userpatches/$_p
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$_distro" = "Arch" ] || [ "$_distro" = "Void" ]; then
|
if [ "$_distro" = "Arch" ]; then
|
||||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
|
||||||
@@ -1711,17 +1669,12 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set _menuconfig early for Void
|
|
||||||
if [ "$_distro" = "Void" ]; then
|
|
||||||
_menuconfig="Void"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# rewrite configuration
|
# rewrite configuration
|
||||||
msg2 "Setting config"
|
msg2 "Setting config"
|
||||||
make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt
|
make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt
|
||||||
|
|
||||||
# menuconfig / nconfig
|
# menuconfig / nconfig
|
||||||
if [ -z "$_menunconfig" ] && [ "$_distro" != "Void" ]; then
|
if [ -z "$_menunconfig" ]; then
|
||||||
plain ""
|
plain ""
|
||||||
plain "*Optional* For advanced users - Do you want to use make menuconfig or nconfig"
|
plain "*Optional* For advanced users - Do you want to use make menuconfig or nconfig"
|
||||||
plain "to configure the kernel before building it?"
|
plain "to configure the kernel before building it?"
|
||||||
@@ -1884,7 +1837,5 @@ exit_cleanup() {
|
|||||||
sed -i 's/\x1b(B//g' "$_where"/logs/shell-output.log.txt
|
sed -i 's/\x1b(B//g' "$_where"/logs/shell-output.log.txt
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# Void has its own clean function, this breaks it so ignore it
|
|
||||||
if [ "$_distro" != "Void" ]; then
|
|
||||||
trap exit_cleanup EXIT
|
trap exit_cleanup EXIT
|
||||||
fi
|
|
||||||
|
Reference in New Issue
Block a user