You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
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+:
root@oc1:/proc# head /boot/meson8b_odroidc.dts
/dts-v1/;
/{
compatible = "AMLOGIC,8726_M8B";
model = "AMLOGIC";
interrupt-parent = <&gic>;
#address-cells = <1>;
#size-cells = <1>;
cpus {
#address-cells = <1>;
root@oc1:/proc# od -c /proc/device-tree/compatible
0000000 A M L O G I C , 8 7 2 6 _ M 8 B
0000020 \0
0000021
root@oc1:/proc# od -c /proc/device-tree/model
0000000 A M L O G I C \0
0000010
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:
model = "Hardkernel odroid-xu3 board based on EXYNOS5422";
compatible = "Hardkernel,odroid-xu3";
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:
tve@base:~$ od -c /proc/device-tree/model
0000000 T I A M 3 3 5 x B e a g l e
0000020 B o n e \0
0000025
tve@base:~$ od -c /proc/device-tree/compatible
0000000 t i , a m 3 3 5 x - b o n e \0 t
0000020 i , a m 3 3 x x \0
0000031
Looks like on rPi /proc/device-tree/model should be one of:
arch/arm/boot/dts/bcm2708-rpi-b-plus.dts: model = "Raspberry Pi Model B+";
arch/arm/boot/dts/bcm2708-rpi-b.dts: model = "Raspberry Pi Model B";
arch/arm/boot/dts/bcm2708-rpi-cm.dts: model = "Raspberry Pi Compute Module";
arch/arm/boot/dts/bcm2709-rpi-2-b.dts: model = "Raspberry Pi 2 Model B";
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts: compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts: model = "Raspberry Pi Model B+";
arch/arm/boot/dts/bcm2835-rpi-b.dts: compatible = "raspberrypi,model-b", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b.dts: model = "Raspberry Pi Model B";
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".
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:
The text was updated successfully, but these errors were encountered: