What's the expected behavior of uname -p and -i for arm64? I see that they are documented to support "unknown": -p, --processor print the processor type or "unknown" -i, --hardware-platform print the hardware platform or "unknown" but that doesn't seem ideal: localhost ~ # uname -p unknown localhost ~ # uname -i unknown On a related note, upstream Linux reintroduced support for "model name" in /proc/cpuinfo on ARM64, but only for processes whose personality is set to PER_LINUX32: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e47b020a323d1b2a7b1e9aac86e99eae19463630 This obviously doesn't work well in general. I'd consider patching upstream Linux to, for instance, keep the 'model name' line for all processes, but I wanted to see if there's any opinion here first.
This patch seems to be in limbo: https://patchwork.kernel.org/patch/9144983/
i don't have an arm64 system to test with. can you attach a /proc/cpuinfo file here from a board you have ? one with 32-bit personality & one with 64-bit personality please. note: don't just cat the file and then copy & paste the terminal ... best to scp the file directly off and attach (so as to not mangle whitespace).
Created attachment 439262 [details] ssh root@MYDEVICE cat /proc/cpuinfo > aarch64-cpuinfo.txt
Created attachment 439264 [details] ssh root@MYDEVICE setarch linux32 cat /proc/cpuinfo > aarch64-linux32-cpuinfo.txt Attached both. The 'model name' is not super-informative, but it's nice to have something there. Incidentally, this means that (if I get a new enough kernel that patched in the PER_LINUX32 compatibility), Gentoo's patched `uname` already gets things right when run with PER_LINUX32: localhost ~ # setarch linux32 uname -a Linux localhost 4.4.4 #65 SMP PREEMPT Thu Jun 30 16:27:07 PDT 2016 armv8l ARMv8 Processor rev 4 (v8l) GNU/Linux localhost ~ # setarch linux32 uname -p ARMv8 Processor rev 4 (v8l) localhost ~ # setarch linux32 uname -i unknown localhost ~ # uname -a Linux localhost 4.4.4 #65 SMP PREEMPT Thu Jun 30 16:27:07 PDT 2016 aarch64 GNU/Linux localhost ~ # uname -p unknown localhost ~ # uname -i unknown (Note that the "4.4.4" kernel above is patched with many subsequent upstream features, including the aforementioned PER_LINUX32 patch.) I still have yet to figure out why the ARM64 folks hate 'model name'.
to clarify, the fact that -p/-i shows something useful on Gentoo is because we carry a patch to try and parse extended fields. upstream GNU coreutils shows "unknown" pretty much everywhere, as do most distros. a few carry x86-specific hacks, but rarely do they venture outside of that. looking at both of those files, there's no useful information we can even extract to display. so there's really only two routes: (1) get the upstream kernel guys to include the fields all the time for arm64 (2) find a different datastore in /proc or /sys for us to parse
Understood on all points. I was just curious if there was any additional context or motivations, to help while trying to address upstream kernel folks. Let me see where I get with (1).