Skip to content

Conversation

@JamiKettunen
Copy link
Contributor

@JamiKettunen JamiKettunen commented Feb 21, 2022

Turns detected CPU in output from Unknown to Qualcomm on my OnePlus 5 :)

Void 5.17.0-rc4 aarch64-musl Qualcomm uptodate rFF

@JamiKettunen
Copy link
Contributor Author

This may need some more work for 32-bit ARM as reportedly RPi shows ARM instead of Broadcom (is there a proper way to even detect this correctly?)

@leahneukirchen
Copy link
Owner

I mean 32 vs 64bit we see in the architecture already, so not sure if this is such a great improvement.

@JamiKettunen
Copy link
Contributor Author

I mean 32 vs 64bit we see in the architecture already, so not sure if this is such a great improvement.

I just thought it would be nice to see the CPU vendor in the output like we do on x86 systems (GenuineIntel / AuthenticAMD) especially when consider there's a lot more vendors on non-x86 arches

This should be able to detect a variety of CPU vendors from the ARM
family for example which otherwise were shown as Unknown before.
@JamiKettunen
Copy link
Contributor Author

JamiKettunen commented Sep 13, 2022

Would trying awk '/^Hardware/{print $NF;exit}' /proc/cpuinfo before env LC_ALL=C lscpu | sed -n 's/^Vendor ID:[[:space:]]*//p' for the CPU detection be fine? If there's spaces on the Hardware field this would ofc only grab the last part and I'm not sure if that could be problematic.

On RPi 4 for example it should result in BCM2835, so your xuname output would look something like:

Void 5.15.61_1 aarch64-musl BCM2835 uptodate rFFF

@dkwo
Copy link

dkwo commented Jan 25, 2025

This also works on apple silicon, produces Apple instead of Unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants