Add support for MNATIVE_INTEL and MNATIVE_AMD config options in graysky's cpu opts patchset and default to prompt
This commit is contained in:
parent
65d4260b27
commit
064e5484bb
@ -137,12 +137,13 @@ _zenify="true"
|
|||||||
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
|
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
|
||||||
_compileroptlevel="1"
|
_compileroptlevel="1"
|
||||||
|
|
||||||
# CPU compiler optimizations - Defaults to generic optimizations if left empty
|
# CPU compiler optimizations - Defaults to prompt at kernel config if left empty
|
||||||
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2"
|
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2"
|
||||||
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake"
|
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake"
|
||||||
# Other options :
|
# Other options :
|
||||||
# - "generic" (to share the package between machines with different CPUs)
|
# - "generic" (to share the package between machines with different CPUs)
|
||||||
# - "native" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
|
# - "native_amd" (use compiler autodetection - Selecting your arch manually in the list above is recommended instead of this option)
|
||||||
|
# - "native_intel" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
|
||||||
_processor_opt=""
|
_processor_opt=""
|
||||||
|
|
||||||
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
|
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
|
||||||
|
@ -648,33 +648,33 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n
|
|||||||
|
|
||||||
# cpu opt
|
# cpu opt
|
||||||
|
|
||||||
if [ -n "$_processor_opt" ] && [ "$_processor_opt" != "native" ]; then
|
if [ -n "$_processor_opt" ] && [[ "$_processor_opt" != native* ]]; then
|
||||||
echo "# CONFIG_MNATIVE is not set" >> ./.config
|
echo "# CONFIG_MNATIVE is not set" >> ./.config
|
||||||
|
echo "# CONFIG_MNATIVE_AMD is not set" >> ./.config
|
||||||
|
echo "# CONFIG_MNATIVE_INTEL is not set" >> ./.config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$_processor_opt" ] && [ "$_processor_opt" != "generic" ]; then
|
if [ -n "$_processor_opt" ] && [ "$_processor_opt" != "generic" ]; then
|
||||||
sed -i -e 's/CONFIG_GENERIC_CPU=y/# CONFIG_GENERIC_CPU is not set/' ./.config
|
sed -i -e 's/CONFIG_GENERIC_CPU=y/# CONFIG_GENERIC_CPU is not set/' ./.config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_processor_opt" = "native" ]; then
|
|
||||||
echo "CONFIG_MNATIVE=y" >> ./.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
_cpu_marchs=("k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver")
|
_cpu_marchs=("k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver")
|
||||||
_cpu_marchs+=("steamroller" "excavator" "zen" "zen2" "mpsc" "atom" "core2" "nehalem" "westmere")
|
_cpu_marchs+=("steamroller" "excavator" "zen" "zen2" "mpsc" "atom" "core2" "nehalem" "westmere")
|
||||||
_cpu_marchs+=("silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake")
|
_cpu_marchs+=("silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake")
|
||||||
_cpu_marchs+=("skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake")
|
_cpu_marchs+=("skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake")
|
||||||
_cpu_marchs+=("cooperlake" "tigerlake")
|
_cpu_marchs+=("cooperlake" "tigerlake" "native" "native_amd" "native_intel")
|
||||||
|
|
||||||
for _march in "${_cpu_marchs[@]}"
|
if [ ! -z "$_processor_opt" ]; then # Don't populate when the config variable is empty
|
||||||
do
|
for _march in "${_cpu_marchs[@]}"
|
||||||
_march_upper=`echo ${_march} | tr '[:lower:]' '[:upper:]'`
|
do
|
||||||
if [ "$_processor_opt" = "$_march" ]; then
|
_march_upper=`echo ${_march} | tr '[:lower:]' '[:upper:]'`
|
||||||
echo "CONFIG_M${_march_upper}=y/" >> ./.config
|
if [ "$_processor_opt" = "$_march" ]; then
|
||||||
else
|
echo "CONFIG_M${_march_upper}=y/" >> ./.config
|
||||||
echo "# CONFIG_M${_march_upper} is not set" >> ./.config
|
else
|
||||||
fi
|
echo "# CONFIG_M${_march_upper} is not set" >> ./.config
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Disable some debugging
|
# Disable some debugging
|
||||||
if [ "${_debugdisable}" = "true" ]; then
|
if [ "${_debugdisable}" = "true" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user