Closed tve closed 1 year ago
Was it fixed by 69e0d9cc801a539984b24dd54bad848af42e14b5?
The CHIP and odroid_c1 platform detection uses the device tree. It appears more stable across OS distributions and more specific than /proc/cpuinfo and /proc/os-release.
It may be good to change the other platforms too, but perhaps "don't fix what isn't broken"? IN that case, I'd say "yes".
Some of the work was done, in particular https://pkg.go.dev/periph.io/x/host/v3/distro. I don't plan to do more work in this area so I'll close. If changes are needed, let's file an issue at https://github.com/periph/host.
Currently most processors and platforms are detected using /proc/cpuinfo, which seems to vary a lot from distro to distro. The device tree seems to vary less, specifically the "model" and "compatible" info found in
/proc/device-tree/{model,compatible}
. The purpose of this issue is to validate this assumption and to switch the detection accordingly. The following is some data gathered in a ticket in the old dlibox repo.Here's an ODROID-C1+:
Looking at a -C1+ running arch linux I see the same in /proc/device-tree, that's encouraging. A -C1 (non-plus) shows the same.
On the ODROID-XU4:
Aha, the xu3 and xu4 use the same SoC so hardkernel doesn't bother producing two different device trees.
An old BBB running Ubuntu 14.04:
Looks like on rPi /proc/device-tree/model should be one of:
All on Raspbian Jessie Lite
RPi3:
RPi2:
RPI1:
On Pine64 on Armbian: