1

Add x86-64-v3 support detection to personalizer

This commit is contained in:
Jessie Hildebrandt 2023-06-02 13:20:46 -04:00
parent ade938c169
commit 5e99f1da50

View File

@ -161,13 +161,6 @@ until prompt_chassis_type; do : ; done
echo "Setting chassis type to ${system_chassis}"
sudo hostnamectl chassis "${system_chassis}"
# Add "mobile" package pattern for mobile chassis types
case "${system_chassis}" in
"latop"|"convertible"|"tablet")
PATTERNS+=('patterns-desktop-mobile')
;;
esac
########################################
# Prompt for system name
@ -262,7 +255,20 @@ until prompt_optional_additions; do : ; done
#
################################################################################
detected_features=()
# Mobile system detection
case "${system_chassis}" in
"latop"|"convertible"|"tablet")
PATTERNS+=('patterns-desktop-mobile')
;;
esac
# x86-64-v3 CPU support detection
CPU_FLAGS=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2)
if
echo CPU_FLAGS | awk '/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}'
then
PATTERNS+=('patterns-glibc-hwcaps-x86_64_v3')
fi
# Touchpad detection
if