cpu uarch patches: move download code to prepare (#462)

And update to new naming scheme

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
This commit is contained in:
Adel Kara Slimane
2022-03-15 21:40:38 +01:00
committed by GitHub
parent a7843dd8c5
commit 5a6f3d921b
3 changed files with 65 additions and 126 deletions

View File

@@ -208,28 +208,6 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then
# Git clone (if necessary) and checkout the asked branch by the user
_linux_git_branch_checkout
cd "$_where"
if [ "$_basever" = "54" ]; then
opt_ver="4.19-5.4"
elif [ "$_basever" = "57" ]; then
opt_ver="5.7"
opt_alternative_url="true"
elif [[ "$_basever" =~ ^(58|59|510|511|512|513|514)$ ]]; then
opt_ver="5.8-5.14"
else
opt_ver="5.15+"
fi
if [ -n "$opt_ver" ]; then
msg2 "Downloading Graysky2's CPU optimisations patch"
if [ "$opt_alternative_url" != "true" ]; then
wget "https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-${opt_ver}.patch"
else
wget "https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/outdated_versions/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v${opt_ver}.patch"
fi
fi
# cd into the linux-src folder is important before calling _tkg_srcprep
cd "$_where/linux-src-git"
_tkg_srcprep