Merge pull request #757 from konimex/arm
CPU [Linux]: Fix inaccurate ARM CPU on SoC systems
This commit is contained in:
commit
a032067e54
|
@ -1,3 +1,8 @@
|
|||
## Contributors
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
**CPU**
|
||||
|
||||
- [Linux] Fixed inaccurate output on ARM SoC devices.
|
||||
|
|
8
neofetch
8
neofetch
|
@ -828,9 +828,6 @@ get_cpu() {
|
|||
case "$os" in
|
||||
"Linux" | "MINIX" | "Windows")
|
||||
# Get CPU name.
|
||||
case "$distro" in
|
||||
"Android"*) cpu="$(getprop ro.product.board)" ;;
|
||||
*)
|
||||
case "$machine_arch" in
|
||||
"frv" | "hppa" | "m68k" | "openrisc" | "or"* | "powerpc" | "ppc"* | "sparc"*)
|
||||
cpu="$(awk -F':' '/^cpu\t|^CPU/ {printf $2; exit}' /proc/cpuinfo)"
|
||||
|
@ -844,8 +841,7 @@ get_cpu() {
|
|||
;;
|
||||
*)
|
||||
cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}' /proc/cpuinfo)"
|
||||
;;
|
||||
esac
|
||||
[[ "$cpu" == *"processor rev"* ]] && cpu="$(awk -F':' '/Hardware/ {print $2; exit}' /proc/cpuinfo)"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -1047,6 +1043,7 @@ get_cpu() {
|
|||
cpu="${cpu//, altivec supported}"
|
||||
cpu="${cpu//FPU*}"
|
||||
cpu="${cpu//Chip Revision*}"
|
||||
cpu="${cpu//Technologies, Inc}"
|
||||
|
||||
# Trim spaces from core output
|
||||
cores="${cores//[[:space:]]}"
|
||||
|
@ -1068,6 +1065,7 @@ get_cpu() {
|
|||
cpu="${cpu/AMD }"
|
||||
cpu="${cpu/Intel }"
|
||||
cpu="${cpu/Core? Duo }"
|
||||
cpu="${cpu/Qualcomm }"
|
||||
|
||||
[[ "$cpu_shorthand" == "tiny" ]] && cpu="${cpu/@*}"
|
||||
;;
|
||||
|
|
Reference in New Issue