Closed andypiper closed 3 months ago
Wow, nice PC! cpufetch does have a lot of ways to infer the SoC, but in this case it seems to be not enough. The only (kind of) portable way I can see here is using /proc/device-tree/compatible
as I already do for RISC-V SoC detection. This hasn't been implemented for ARM yet, but now I have a good motivation to do so. I'll schedule some time to work on this :+1:
The information online is a bit confusing:
Please let me know if my understanding is correct. I have pushed a patch in branch i261
. If you are happy with it then I'll create the NXP logo and merge it into master :+1:
PS: Can I have the output of hexdump -C /proc/device-tree/compatible
? cat is not showing all the truth here.
Yes, I've been referring to it in the same way that MNT have done (mostly in IRC chats), so your approach looks right on the naming.
$ hexdump -C /proc/device-tree/compatible
00000000 6d 6e 74 72 65 2c 70 6f 63 6b 65 74 2d 72 65 66 |mntre,pocket-ref|
00000010 6f 72 6d 00 62 6f 75 6e 64 61 72 79 2c 69 6d 78 |orm.boundary,imx|
00000020 38 6d 70 2d 6e 69 74 72 6f 67 65 6e 38 6d 70 2d |8mp-nitrogen8mp-|
00000030 73 6f 6d 00 66 73 6c 2c 69 6d 78 38 6d 70 00 |som.fsl,imx8mp.|
0000003f
Branch i261
results
$ ./cpufetch
SoC: NXP i.MX 8M Plus
Technology: 14nm
Microarchitecture: Cortex-A53
Max Frequency: 2.000 GHz
Cores: 4 cores
Features: NEON,SHA1,SHA2,AES,CRC32
Peak Performance: 64.00 GFLOP/s
Looks good to me, the logo is optional as the generic ARM logo was fine in my opinion! 👍🏻 thanks for the effort here.
The Pocket Reform (and mainline Reform) support alternative CPU modules as well, including the Banana Pi CM4 which is an A311D (which I have access to) and the Rockchip RK3588 (which I have coming in the future), so I'll be happy to see how those show up in cpufetch
as well.
Nice work.
Awesome! I have added the NXP logo (feedback is welcomed) and merged this into master. The ARM logo is a fallback when cpufetch knows it's an ARM CPU but does not know the specific SoC.
Closing this, and looking forward your report for the hardware you mentioned in case it does not work. I expect the Banana Pi CM4 not to work and the RK3588 to work (I have a Rockchip as well so I try to give a good support for RK SoCs). Thanks! :+1:
PS: I'd also be interested in adding support for other NXP SoCs such as i.MX 6/7/8 but cannot find a good source to find the corresponding value in /proc/device-tree/compatible
...
Noted that new features / platforms should be submitted as issues rather than sending a PR.
Currently, the above SoC shows as Unknown.
It's a Cortex A53 and I'm running Debian unstable (which is what ships on the Pocket Reform)
Here is some additional system information that may be useful:
Let me know if I can provide any other diagnostic information that would help here.