Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
a032067e
Commit
a032067e
authored
Jun 22, 2017
by
Herdiansyah
Committed by
GitHub
Jun 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #757 from konimex/arm
CPU [Linux]: Fix inaccurate ARM CPU on SoC systems
parents
681208fa
633a0517
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
CHANGELOG.md
CHANGELOG.md
+5
-0
neofetch
neofetch
+18
-20
No files found.
CHANGELOG.md
View file @
a032067e
## Contributors
## Info
**CPU**
-
[
Linux
]
Fixed inaccurate output on ARM SoC devices.
neofetch
View file @
a032067e
...
...
@@ -828,26 +828,22 @@ 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
)
"
;;
"s390"
*)
cpu=
"
$(
awk
-F
'='
'/machine/ {print $4; exit}'
/proc/cpuinfo
)
"
;;
"ia64"
|
"m32r"
)
cpu=
"
$(
awk
-F
':'
'/model/ {print $2; exit}'
/proc/cpuinfo
)
"
[[ -z
"
$cpu
"
]] && cpu=
"
$(
awk
-F
':'
'/family/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
*)
cpu=
"
$(
awk
-F
': | @'
'/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
esac
;;
esac
case
"
$machine_arch
"
in
"frv"
|
"hppa"
|
"m68k"
|
"openrisc"
|
"or"
* |
"powerpc"
|
"ppc"
* |
"sparc"
*)
cpu=
"
$(
awk
-F
':'
'/^cpu\t|^CPU/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
"s390"
*)
cpu=
"
$(
awk
-F
'='
'/machine/ {print $4; exit}'
/proc/cpuinfo
)
"
;;
"ia64"
|
"m32r"
)
cpu=
"
$(
awk
-F
':'
'/model/ {print $2; exit}'
/proc/cpuinfo
)
"
[[ -z
"
$cpu
"
]] && cpu=
"
$(
awk
-F
':'
'/family/ {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
speed_dir=
"/sys/devices/system/cpu/cpu0/cpufreq"
temp_dir=
"/sys/class/hwmon/hwmon0/temp1_input"
...
...
@@ -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
/@*
}
"
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment