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"
|
cd "$_where"
|
||||||
|
|
||||||
case "$_basever" in
|
if [ "$_basever" = "54" ]; then
|
||||||
"57")
|
opt_ver="4.19-5.4"
|
||||||
|
elif [ "$_basever" = "57" ]; then
|
||||||
opt_ver="5.7"
|
opt_ver="5.7"
|
||||||
opt_alternative_url="true"
|
opt_alternative_url="true"
|
||||||
;;
|
elif [[ "$_basever" =~ ^(58|59|510|511|512|513|514)$ ]]; then
|
||||||
"58")
|
|
||||||
opt_ver="5.8-5.14"
|
opt_ver="5.8-5.14"
|
||||||
;;
|
else
|
||||||
"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")
|
|
||||||
opt_ver="5.15+"
|
opt_ver="5.15+"
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "$opt_ver" ]; then
|
if [ -n "$opt_ver" ]; then
|
||||||
msg2 "Downloading Graysky2's CPU optimisations patch"
|
msg2 "Downloading Graysky2's CPU optimisations patch"
|
||||||
|
@@ -385,9 +385,7 @@ _tkg_patcher() {
|
|||||||
patch -Np1 -i "$tkgpatch" >> "$_where"/prepare.log || error "An error was encountered applying patches. It was logged to the prepare.log file."
|
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
|
echo -e "\n" >> "$_where"/prepare.log
|
||||||
else
|
else
|
||||||
if [[ $_msg != *graysky* ]]; then
|
msg2 "Skipping patch ${tkgpatch##*/}...\n (unavailable for this kernel version)"
|
||||||
msg2 "Skipping patch ${tkgpatch##*/}...\n (unavailable for this kernel version)"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,23 +436,29 @@ _tkg_srcprep() {
|
|||||||
if [ -z $_debug ]; then
|
if [ -z $_debug ]; then
|
||||||
|
|
||||||
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
|
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
|
||||||
if [ "${_distro}" = "Arch" ]; then
|
if [ "$_basever" != "57" ]; then
|
||||||
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
# Newer version of the patches
|
||||||
elif [ "${_distro}" = "Void" ]; then
|
if [ "${_distro}" = "Arch" ]; then
|
||||||
tkgpatch="${wrksrc}/more-uarches-for-kernel-${opt_ver}.patch"
|
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
||||||
else
|
elif [ "${_distro}" = "Void" ]; then
|
||||||
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
tkgpatch="${wrksrc}/more-uarches-for-kernel-${opt_ver}.patch"
|
||||||
fi
|
else
|
||||||
_msg="Applying graysky's cpu opts patch" && _tkg_patcher
|
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
||||||
|
fi
|
||||||
|
_msg="Applying graysky's cpu opts patch" && _tkg_patcher
|
||||||
|
|
||||||
if [ "${_distro}" = "Arch" ]; then
|
|
||||||
tkgpatch="$srcdir/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v${opt_ver}.patch"
|
|
||||||
elif [ "${_distro}" = "Void" ]; then
|
|
||||||
tkgpatch="${wrksrc}/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v${opt_ver}.patch"
|
|
||||||
else
|
else
|
||||||
tkgpatch="$srcdir/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v${opt_ver}+.patch"
|
# 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
|
||||||
|
tkgpatch="${wrksrc}/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v${opt_ver}.patch"
|
||||||
|
else
|
||||||
|
tkgpatch="$srcdir/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v${opt_ver}+.patch"
|
||||||
|
fi
|
||||||
|
_msg="Applying graysky's cpu opts patch (legacy)" && _tkg_patcher
|
||||||
|
|
||||||
fi
|
fi
|
||||||
_msg="Applying graysky's cpu opts patch (legacy)" && _tkg_patcher
|
|
||||||
|
|
||||||
# PREEMPT_RT patch
|
# PREEMPT_RT patch
|
||||||
if [ "${_preempt_rt}" = "1" ]; then
|
if [ "${_preempt_rt}" = "1" ]; then
|
||||||
|
Reference in New Issue
Block a user