mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-28 03:01:54 +08:00
20 lines
721 B
Diff
20 lines
721 B
Diff
--- a/autocore/files/cpuinfo
|
|
+++ b/autocore/files/cpuinfo
|
|
@@ -7,7 +7,7 @@ CPUFREQ_PATH="/sys/devices/system/cpu/cpufreq"
|
|
THERMAL_PATH="/sys/class/thermal"
|
|
|
|
cpu_arch="$(awk -F ': ' '/model name/ {print $2}' "$CPUINFO_PATH" | head -n1)"
|
|
-[ -n "${cpu_arch}" ] || cpu_arch="?"
|
|
+[ -n "${cpu_arch}" ] || cpu_arch="ARMv8 Processor"
|
|
|
|
case "$DISTRIB_TARGET" in
|
|
"x86"/*)
|
|
@@ -43,6 +43,7 @@ case "$DISTRIB_TARGET" in
|
|
elif grep -q "AuthenticAMD" "/proc/cpuinfo"; then
|
|
cpu_temp="$(sensors "k10temp-*" 2>"/dev/null" | awk '/Tctl|Tdie/ {print $2}' | head -n1 | tr -d "+")"
|
|
fi
|
|
+ [ -n "${cpu_temp}" ] || cpu_temp="$(sensors 2>/dev/null | grep 'Core 0' | cut -c12-)"
|
|
;;
|
|
*)
|
|
[ ! -e "$THERMAL_PATH/thermal_zone0/temp" ] || \
|