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