diff --git a/PKGBUILD b/PKGBUILD index c2f5516..4195f6d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -59,7 +59,7 @@ else fi pkgname=("${pkgbase}" "${pkgbase}-headers") pkgver="${_basekernel}"."${_sub}" -pkgrel=164 +pkgrel=165 pkgdesc='Linux-tkg' arch=('x86_64') # no i686 in here url="http://www.kernel.org/" @@ -73,10 +73,10 @@ options=('!strip' 'docs') case $_basever in 54) - opt_ver="4.19-5.4" + #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" + #"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 @@ -101,8 +101,8 @@ case $_basever in 0012-linux-hardened.patch ) sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491' - '1f0285e744e2a8fc9a2c8be7f0d882c5db95111487b1e538c36fa99c9878988e' - 'SKIP' + 'dcc86c957eee2f4e46896fe6553c1d933126f1489a10564969b9680176ee2fea' + #'SKIP' '83d7d518dc9592ffcd79511163c49e50b767f539bc552b636810a8ca67ddca7d' '1f4a20d6eaaa0d969af93152a65191492400c6aa838fc1c290b0dd29bb6019d8' '1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898' @@ -315,7 +315,7 @@ case $_basever in 0012-misc-additions.patch ) sha256sums=('dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43' - 'c424275d9dea08448d58424ee8cfbab0ed91dfbe920691b5911be1892087a5cb' + '3985b7a55cb603a45003996cb04b5d87b33b6f4c33b172a54da2da26647a1da0' 'SKIP' 'e78e683b9a8c15003d91f810cfe576c6266f330f3b8fe13eb52226c50070e87f' 'eb1da1a028a1c967222b5bdac1db2b2c4d8285bafd714892f6fc821c10416341' @@ -447,7 +447,7 @@ case $_basever in 0002-mm-Support-soft-dirty-flag-read-with-reset.patch ) sha256sums=('7d0df6f2bf2384d68d0bd8e1fe3e071d64364dcdc6002e7b5c87c92d48fac366' - 'b844ec7be25f915578e322838b03c2780c4b1185fbab5e84a8d52db7341804e8' + '034eb39ad49f3a26fc1b4ef799ef481ce35fe03e2b24131e9cd3d2805a99ad19' 'SKIP' 'c14e6820460eec990ada09ac1a2e504c60047d8fab76ae24724bacd450697aa1' '1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898' diff --git a/install.sh b/install.sh index 13bc817..becfb9b 100755 --- a/install.sh +++ b/install.sh @@ -221,12 +221,7 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then cd "$_where" - msg2 "Downloading Graysky2's CPU optimisations patch" - case "$_basever" in - "54") - opt_ver="4.19-v5.4" - ;; "57") opt_ver="5.7" opt_alternative_url="true" @@ -251,10 +246,13 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then ;; esac - 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" + 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 # Follow Ubuntu install isntructions in https://wiki.ubuntu.com/KernelTeam/GitKernelBuild diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index fdb4aa2..63c2166 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -5,13 +5,13 @@ _supported_kernels=("5.13" "5.12" "5.11" "5.10" "5.9" "5.8" "5.7" "5.4") typeset -A _kver_subver_map _kver_subver_map=( - ["5.4"]="124" + ["5.4"]="125" ["5.7"]="19" ["5.8"]="18" ["5.9"]="16" - ["5.10"]="42" + ["5.10"]="43" ["5.11"]="22" - ["5.12"]="9" + ["5.12"]="10" ["5.13"]="rc5" ) @@ -688,55 +688,57 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r fi # cpu opt - _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") + 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") - 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 - 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}" + 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 - else - if [[ "$_march" = "generic"* ]]; then - _disable "${_march_upper}" - else - _disable "M${_march_upper}" + if ! [[ "${_cpu_marchs[@]}" =~ "$_processor_opt" ]]; then + warning "the setup _processor_opt=\"${_processor_opt}\" not recognized. Prompting..." + _processor_opt="" fi fi - done + + 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 + fi # Disable some debugging if [ "${_debugdisable}" = "true" ]; then