Fix cpu-opt patch in "install.sh" and make "prepare" verbose about it (#439)
Closes: #438 Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
This commit is contained in:
committed by
GitHub
parent
38513e05b4
commit
5f36c6353e
32
install.sh
32
install.sh
@@ -210,36 +210,16 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then
|
||||
|
||||
cd "$_where"
|
||||
|
||||
case "$_basever" in
|
||||
"57")
|
||||
if [ "$_basever" = "54" ]; then
|
||||
opt_ver="4.19-5.4"
|
||||
elif [ "$_basever" = "57" ]; then
|
||||
opt_ver="5.7"
|
||||
opt_alternative_url="true"
|
||||
;;
|
||||
"58")
|
||||
elif [[ "$_basever" =~ ^(58|59|510|511|512|513|514)$ ]]; then
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"59")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"510")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"511")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"512")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"513")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"514")
|
||||
opt_ver="5.8-5.14"
|
||||
;;
|
||||
"515")
|
||||
else
|
||||
opt_ver="5.15+"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "$opt_ver" ]; then
|
||||
msg2 "Downloading Graysky2's CPU optimisations patch"
|
||||
|
@@ -385,10 +385,8 @@ _tkg_patcher() {
|
||||
patch -Np1 -i "$tkgpatch" >> "$_where"/prepare.log || error "An error was encountered applying patches. It was logged to the prepare.log file."
|
||||
echo -e "\n" >> "$_where"/prepare.log
|
||||
else
|
||||
if [[ $_msg != *graysky* ]]; then
|
||||
msg2 "Skipping patch ${tkgpatch##*/}...\n (unavailable for this kernel version)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_tkg_srcprep() {
|
||||
@@ -438,6 +436,8 @@ _tkg_srcprep() {
|
||||
if [ -z $_debug ]; then
|
||||
|
||||
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
|
||||
if [ "$_basever" != "57" ]; then
|
||||
# Newer version of the patches
|
||||
if [ "${_distro}" = "Arch" ]; then
|
||||
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
||||
elif [ "${_distro}" = "Void" ]; then
|
||||
@@ -447,6 +447,8 @@ _tkg_srcprep() {
|
||||
fi
|
||||
_msg="Applying graysky's cpu opts patch" && _tkg_patcher
|
||||
|
||||
else
|
||||
# Edge case for 5.7
|
||||
if [ "${_distro}" = "Arch" ]; then
|
||||
tkgpatch="$srcdir/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v${opt_ver}.patch"
|
||||
elif [ "${_distro}" = "Void" ]; then
|
||||
@@ -456,6 +458,8 @@ _tkg_srcprep() {
|
||||
fi
|
||||
_msg="Applying graysky's cpu opts patch (legacy)" && _tkg_patcher
|
||||
|
||||
fi
|
||||
|
||||
# PREEMPT_RT patch
|
||||
if [ "${_preempt_rt}" = "1" ]; then
|
||||
if [ ${_rt_subver_map[$_basekernel]+_} = "_" ]; then
|
||||
|
Reference in New Issue
Block a user