#!/usr/bin/awk -f BEGIN { while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1 if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1 if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2 if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3 if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4 print ""; if (level == 1) { print "...This CPU is a x86_64-v1 processor."; } if (level == 2) { print "...This CPU is a x86_64-v2 processor."; } if (level == 3) { print "...This CPU is a x86_64-v3 processor."; } if (level == 4) { print "...This CPU is a x86_64-v4 processor."; } print ""; print "The following versions of AlmaLinux will run on processors shown below:"; print " AlmaLinux8.x --> v1 and following cpu."; print " AlmaLinux9.x --> v2 and following cpu."; print " AlmaLinux10.x --> v3 and following cpu by default."; print " (apparently there will be a version of 10.x to run on v2.)"; exit 1 }