neofetch icon indicating copy to clipboard operation
neofetch copied to clipboard

Fix support for ARM, RISC-V, LoongArch detection

Open saeziae opened this issue 2 years ago • 5 comments

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

saeziae avatar Jun 25 '22 17:06 saeziae

图片 On a big.LITTLE machine (RK3399)

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

Icenowy avatar Jun 25 '22 17:06 Icenowy

圈子好小 qwq

hykilpikonna avatar Jul 30 '22 21:07 hykilpikonna

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

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

hykilpikonna avatar Jul 30 '22 21:07 hykilpikonna

This is working on a Raspberry Pi.

image

satmandu avatar Aug 01 '22 00:08 satmandu

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

hykilpikonna avatar Sep 06 '22 16:09 hykilpikonna

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.

aaronfranke avatar Jan 06 '23 23:01 aaronfranke