Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix support for ARM, RISC-V, LoongArch detection #2139

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

saeziae
Copy link

@saeziae saeziae commented Jun 25, 2022

Description

Use lscpu to get name of ARM CPU, tested on HiSilicon and Phytium machines.

cpuinfo shows ARM CPU implementer and model as binary information stored at cpuid register, e.g. 0x48 means HiSilicon, lscpu uses a lookup table to decode that, utilising lscpu could avoid maintaining the lookup table ourselves.

image

image

Update 20220731

  • added detection for Android, which shows CPU as string in cpuinfo.
  • added Loongarch (tested on Loongson 3A5000), RISC-V (to show the uarch, tested on StarFive).

Update 20220909

  • Moved LoongArch and RISC-V to fallback detection, making it more universal.

P.S.:

small bugfix: fixed the bug of that the scripts deleting postfixes not matching those CPUs saying with Radeon Graphics

@Icenowy
Copy link

Icenowy commented Jun 25, 2022

图片
On a big.LITTLE machine (RK3399)

The CPU frequency is also wrong (it shows only the little core freq, not the big core one)

@hykilpikonna
Copy link

圈子好小 qwq

hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Jul 30, 2022
… ARM CPU

Upstream PR: dylanaraps/neofetch#2139
Thanks to @saeziae

Co-authored-by: Estela Xu <i@estela.cn>
@hykilpikonna
Copy link

合并到 HyFetch 里面啦。会加入到下一个版本的 neowofetch 里面w

(看 neofetch 半年没接过 PR 了我要借机 take over!

hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Jul 31, 2022
@satmandu
Copy link

satmandu commented Aug 1, 2022

This is working on a Raspberry Pi.

image

@hykilpikonna
Copy link

Found a bug: This method fails to detect cpu for riscv on QEMU.

It can be solved by moving the fallback cpu detection outside the switch-case block. (i.e. if no cpu is detected with platform-specific methods, try using the /proc/cpuinfo method)

image

@saeziae saeziae changed the title Use lscpu to get name of ARM CPU FIx support for ARM, RISC-V, LoongArch detection Sep 10, 2022
@saeziae saeziae changed the title FIx support for ARM, RISC-V, LoongArch detection Fix support for ARM, RISC-V, LoongArch detection Sep 10, 2022
hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Sep 10, 2022
…C-V, LoongArch detection

Upstream PR: dylanaraps/neofetch#2139
Thanks to @saeziae

Co-authored-by: Estela Xu <i@estela.cn>
hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Sep 20, 2022
peeweep added a commit to peeweep/gentoo that referenced this pull request Nov 17, 2022
peeweep added a commit to peeweep/gentoo that referenced this pull request Nov 17, 2022
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Nov 23, 2022
Closes: https://bugs.gentoo.org/881591
Upstream: dylanaraps/neofetch#2139
Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
Closes: #28305
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
@aaronfranke
Copy link

What is the status of this PR? I would like to make a PR to improve neofetch on RISC-V, but I don't want to conflict with this work.

mrquantumoff added a commit to mrquantumoff/nexfetch that referenced this pull request Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants