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:
committed by
GitHub
parent
a7843dd8c5
commit
5a6f3d921b
36
PKGBUILD
36
PKGBUILD
@@ -73,10 +73,8 @@ options=('!strip' 'docs')
|
||||
|
||||
case $_basever in
|
||||
54)
|
||||
#opt_ver="4.19-5.4"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
#"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-4.19-5.4.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -103,7 +101,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491'
|
||||
'c596cee4b82dd1e7660b0d6c1535d1a78eaf2e1dd39294f1c60a1214093382bd'
|
||||
#'SKIP'
|
||||
'b0c4c60669f47ba4d3d1388368a5f9790aa697af42c917ed2ef177f111336d8b'
|
||||
'1f4a20d6eaaa0d969af93152a65191492400c6aa838fc1c290b0dd29bb6019d8'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -126,10 +123,8 @@ case $_basever in
|
||||
'aeb31404c26ee898d007b1f66cb9572c9884ad8eca14edc4587d68f6cba6de46')
|
||||
;;
|
||||
57)
|
||||
opt_ver="5.7"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/outdated_versions/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.7.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -156,7 +151,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0'
|
||||
'66a0173a13cd58015f5bf1b14f67bfa15dc1db5d8e7225fcd95ac2e9a5341653'
|
||||
'SKIP'
|
||||
'357a0db541f7de924ed89c21f5a6f3de4889b134c5d05d5e32ccd234bd81eedf'
|
||||
'15ce09447b7e9b28425c1df5961c955378f2829e4115037337eef347b1db3d9d'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -180,10 +174,8 @@ case $_basever in
|
||||
'6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d')
|
||||
;;
|
||||
58)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
#'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -211,7 +203,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5'
|
||||
'5b558a40c2fdad2c497fe0b1a64679313fd5a7ccbaecef8803d49b3baaccbacd'
|
||||
'SKIP'
|
||||
'f4754fbe2619ef321e49a7b560fad058b2459d17cff0b90e839cb475f46e8b63'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
@@ -231,10 +222,8 @@ case $_basever in
|
||||
'f5dbff4833a2e3ca94c202e5197894d5f1006c689ff149355353e77d2e17c943')
|
||||
;;
|
||||
59)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
$patch_site
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
"config.x86_64" # stock Arch config
|
||||
#$hardened_config_file # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -262,7 +251,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('3239a4ee1250bf2048be988cc8cb46c487b2c8a0de5b1b032d38394d5c6b1a06'
|
||||
'46c520da2db82d8f9a15c2117d3a50e0faaaf98f05bd4ea1f3105e2724f207d6'
|
||||
'SKIP'
|
||||
'ce2711b9d628e71af62706b830c2f259a43ad1e614871dd90bcb99d8709e1dab'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
@@ -285,10 +273,8 @@ case $_basever in
|
||||
'0d5fe3a9050536fe431564b221badb85af7ff57b330e3978ae90d21989fcad2d')
|
||||
;;
|
||||
510)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -320,7 +306,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43'
|
||||
'cc976d8d7bd5b26ef9ffcf836f9d20377e878462219cf4f9a5499edfaf02e8b4'
|
||||
'SKIP'
|
||||
'13a39ab2be1301b60565cb6a4bedb2bca16b6b12427407c099a81169feb367d6'
|
||||
'eb1da1a028a1c967222b5bdac1db2b2c4d8285bafd714892f6fc821c10416341'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -349,10 +334,8 @@ case $_basever in
|
||||
'7fb1104c167edb79ec8fbdcde97940ed0f806aa978bdd14d0c665a1d76d25c24')
|
||||
;;
|
||||
511)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -386,7 +369,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('04f07b54f0d40adfab02ee6cbd2a942c96728d87c1ef9e120d0cb9ba3fe067b4'
|
||||
'07aac31956d3f483a91506524befd45962f3bbfda2f8d43cf90713caf872d9ba'
|
||||
'SKIP'
|
||||
'fc08ac33e3bc47ed0ee595a2e4b84bc45b02682b383db6acfe281792e88f6231'
|
||||
'837ad05b68d0443580f78f5eb316db46c6b67abfefa66c22b6cb94f4915a52ba'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -416,10 +398,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
512)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
#'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -454,7 +434,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('7d0df6f2bf2384d68d0bd8e1fe3e071d64364dcdc6002e7b5c87c92d48fac366'
|
||||
'a41e4a4eb50c670a48f9c9bcc32ccb2195c02e3caa823a6aaed04537fdd8b73d'
|
||||
'SKIP'
|
||||
'0a7c40402715f8817c4f40173ca1fa8af84c56f7658be281e5424319000370b6'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
@@ -480,10 +459,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
513)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -517,7 +494,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('3f6baa97f37518439f51df2e4f3d65a822ca5ff016aa8e60d2cc53b95a6c89d9'
|
||||
'6fadc31348a0c0bbce86b067811d1dadae307bbde5b712c688b3193d73f0fb71'
|
||||
'SKIP'
|
||||
'06ad99b810943f7ce4650fe656156f4b40d11fabd9b89e2b1beff06c46836efc'
|
||||
'49a34dfc8ee7663a8a20c614f086e16ec70e8822db27a91050fd6ffebf87a650'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -547,10 +523,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
514)
|
||||
opt_ver="5.8-5.14"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.8-5.14.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
#'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -581,7 +555,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('7e068b5e0d26a62b10e5320b25dce57588cbbc6f781c090442138c9c9c3271b2'
|
||||
'578be613998d8aa7e5460d6d5448799e422198d31e157c67eec2e5e58abb9c60'
|
||||
'SKIP'
|
||||
'f5d3635520c9eb9519629f6df0d9a58091ed4b1ea4ddb1acd5caf5822d91a060'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
@@ -605,10 +578,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
515)
|
||||
opt_ver="5.15%2B"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -638,7 +609,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8'
|
||||
'1019709aa85b87904e901aca141f8ade27b3719333be8a3e9d3b2cb0e05ad345'
|
||||
'SKIP'
|
||||
'24be2e8863e265195a24d7082804cd4328fd9f0a31b88672c884b9fd42469ed8'
|
||||
'6e3ef6bc4779ae3b7154642147d5ab3ece6e38e3e08bdb30f86d89d2b4855fa9'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
@@ -664,10 +634,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
516)
|
||||
opt_ver="5.15%2B"
|
||||
source=("$kernel_site"
|
||||
"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
#'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -696,7 +664,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
|
||||
'b937799c9a78417161b3f40a4fae99d6a9ed7fe653a4b84d9908cd11a6ab62ca'
|
||||
'SKIP'
|
||||
'5b54e733edceca75df8d7c44aee4a811f3d058861ce54ab0839a7705d47e59df'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
@@ -719,10 +686,8 @@ case $_basever in
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
517)
|
||||
opt_ver="5.15%2B"
|
||||
source=("$kernel_site"
|
||||
#"$patch_site"
|
||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/more-uarches-for-kernel-5.15%2B.patch"
|
||||
'config.x86_64' # stock Arch config
|
||||
#'config_hardened.x86_64' # hardened Arch config
|
||||
90-cleanup.hook
|
||||
@@ -751,7 +716,6 @@ case $_basever in
|
||||
)
|
||||
sha256sums=('32293e5747e7623c7ea1fcc55b7bb37918206629353f38d1ee5623852ad428ed'
|
||||
#upcoming_kernel_patch_sha256
|
||||
'SKIP'
|
||||
'961c380f74b9e28a47a21001fc330460dcd639f7580b7a178472e40af8f4dcd4'
|
||||
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
|
22
install.sh
22
install.sh
@@ -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
|
||||
|
@@ -436,30 +436,28 @@ _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
|
||||
tkgpatch="${wrksrc}/more-uarches-for-kernel-${opt_ver}.patch"
|
||||
else
|
||||
tkgpatch="$srcdir/more-uarches-for-kernel-${opt_ver}.patch"
|
||||
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
|
||||
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
|
||||
|
||||
_patch_location="$srcdir"
|
||||
if [ "${_distro}" = "Void" ]; then
|
||||
_patch_location="${wrksrc}"
|
||||
fi
|
||||
|
||||
if [ "$_basever" = "54" ]; then
|
||||
_patch_name="more-uarches-for-kernel-4.19-5.4"
|
||||
elif [ "$_basever" = "57" ]; then
|
||||
_patch_name="outdated_versions/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.7"
|
||||
elif (( 58 <= "$_basever" && "$_basever" <= 514 )); then
|
||||
_patch_name="more-uarches-for-kernel-5.8-5.14"
|
||||
elif [[ "$_basever" =~ ^(515|516)$ ]]; then
|
||||
_patch_name="more-uarches-for-kernel-5.15-5.16"
|
||||
else
|
||||
_patch_name="more-uarches-for-kernel-5.17%2B"
|
||||
fi
|
||||
|
||||
wget -P "${_patch_location}" "https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master/${_patch_name}.patch"
|
||||
tkgpatch="${_patch_location}/${_patch_name}.patch"
|
||||
_msg="Applying graysky's cpu opts patch" && _tkg_patcher
|
||||
|
||||
# PREEMPT_RT patch
|
||||
if [ "${_preempt_rt}" = "1" ]; then
|
||||
if [ ${_rt_subver_map[$_basekernel]+_} = "_" ]; then
|
||||
@@ -731,58 +729,57 @@ _tkg_srcprep() {
|
||||
fi
|
||||
|
||||
# cpu opt
|
||||
if [ -n "$opt_ver" ]; then
|
||||
_cpu_marchs=("native_amd" "native_intel" "generic_cpu" "generic_cpu2" "generic_cpu3" "generic_cpu4")
|
||||
_cpu_marchs+=("k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver")
|
||||
_cpu_marchs+=("steamroller" "excavator" "zen" "zen2" "zen3" "mpsc" "atom" "core2" "nehalem" "westmere")
|
||||
_cpu_marchs+=("bonnell" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake")
|
||||
_cpu_marchs+=("skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake")
|
||||
_cpu_marchs+=("cooperlake" "tigerlake" "sapphirerapids" "rocketlake" "alderlake")
|
||||
_cpu_marchs=("native_amd" "native_intel" "generic_cpu" "generic_cpu2" "generic_cpu3" "generic_cpu4")
|
||||
_cpu_marchs+=("k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver")
|
||||
_cpu_marchs+=("steamroller" "excavator" "zen" "zen2" "zen3" "mpsc" "atom" "core2" "nehalem" "westmere")
|
||||
_cpu_marchs+=("bonnell" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake")
|
||||
_cpu_marchs+=("skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake")
|
||||
_cpu_marchs+=("cooperlake" "tigerlake" "sapphirerapids" "rocketlake" "alderlake")
|
||||
|
||||
typeset -A _generic_march_map
|
||||
_generic_march_map=(
|
||||
["generic"]="generic_cpu"
|
||||
["generic_v2"]="generic_cpu2"
|
||||
["generic_v3"]="generic_cpu3"
|
||||
["generic_v4"]="generic_cpu4"
|
||||
)
|
||||
if [ -n "$_processor_opt" ]; then
|
||||
# Replace customization.cfg convention with .config convention for generic
|
||||
if [[ "${!_generic_march_map[@]}" =~ "$_processor_opt" ]]; then
|
||||
_processor_opt="${_generic_march_map[$_processor_opt]}"
|
||||
fi
|
||||
if ! [[ "${_cpu_marchs[@]}" =~ "$_processor_opt" ]]; then
|
||||
warning "the setup _processor_opt=\"${_processor_opt}\" not recognized. Prompting..."
|
||||
_processor_opt=""
|
||||
fi
|
||||
typeset -A _generic_march_map
|
||||
_generic_march_map=(
|
||||
["generic"]="generic_cpu"
|
||||
["generic_v2"]="generic_cpu2"
|
||||
["generic_v3"]="generic_cpu3"
|
||||
["generic_v4"]="generic_cpu4"
|
||||
)
|
||||
if [ -n "$_processor_opt" ]; then
|
||||
# Replace customization.cfg convention with .config convention for generic
|
||||
if [[ "${!_generic_march_map[@]}" =~ "$_processor_opt" ]]; then
|
||||
_processor_opt="${_generic_march_map[$_processor_opt]}"
|
||||
fi
|
||||
|
||||
if [ -z "$_processor_opt" ]; then
|
||||
msg2 "Please select the desired CPU micro-architecture"
|
||||
_default_index="2"
|
||||
_prompt_from_array "${_cpu_marchs[@]}"
|
||||
_processor_opt="${_selected_value}"
|
||||
if ! [[ "${_cpu_marchs[@]}" =~ "$_processor_opt" ]]; then
|
||||
warning "the setup _processor_opt=\"${_processor_opt}\" not recognized. Prompting..."
|
||||
_processor_opt=""
|
||||
fi
|
||||
|
||||
for _march in "${_cpu_marchs[@]}"
|
||||
do
|
||||
_march_upper=`echo "$_march" | tr '[a-z]' '[A-Z]'`
|
||||
if [ "$_processor_opt" = "$_march" ]; then
|
||||
if [[ "$_march" = "generic"* ]]; then
|
||||
_enable "${_march_upper}"
|
||||
else
|
||||
_enable "M${_march_upper}"
|
||||
fi
|
||||
else
|
||||
if [[ "$_march" = "generic"* ]]; then
|
||||
_disable "${_march_upper}"
|
||||
else
|
||||
_disable "M${_march_upper}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$_processor_opt" ]; then
|
||||
msg2 "Please select the desired CPU micro-architecture"
|
||||
_default_index="2"
|
||||
_prompt_from_array "${_cpu_marchs[@]}"
|
||||
_processor_opt="${_selected_value}"
|
||||
fi
|
||||
|
||||
for _march in "${_cpu_marchs[@]}"
|
||||
do
|
||||
_march_upper=`echo "$_march" | tr '[a-z]' '[A-Z]'`
|
||||
if [ "$_processor_opt" = "$_march" ]; then
|
||||
if [[ "$_march" = "generic"* ]]; then
|
||||
_enable "${_march_upper}"
|
||||
else
|
||||
_enable "M${_march_upper}"
|
||||
fi
|
||||
else
|
||||
if [[ "$_march" = "generic"* ]]; then
|
||||
_disable "${_march_upper}"
|
||||
else
|
||||
_disable "M${_march_upper}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Disable some debugging
|
||||
if [ "${_debugdisable}" = "true" ]; then
|
||||
_disable "SLUB_DEBUG" "PM_DEBUG" "PM_ADVANCED_DEBUG" "PM_SLEEP_DEBUG" "ACPI_DEBUG" "SCHED_DEBUG" "LATENCYTOP" "DEBUG_PREEMPT"
|
||||
|
Reference in New Issue
Block a user