Device Tree Overlay


Um Device Tree Overlays nutzen zu können, muss U-Boot mit dem Flag CONFIG_OF_LIBFDT_OVERLAY compiliert werden, was normallerweise der Fall ist.

Nun erstellt man eine Overlay-Datei, zum Beispiel will man auf dem Allwinner A20 CAN0 aktivieren:

/dts-v1/;
/plugin/;
&can0 { pinctrl-names = "default"; pinctrl-0 = <&can0_pins_a>; status = "okay"; };
;

Die Datei wird a20_can0.dts abgespeichert und muss anschließend compiliert werden:

dtc -O dtb -o a20_can0.dtbo -@ a20_can0.dts

Danach legt man die a20_can0.dtbo neben der eigentlichen DTB-Datei und muss sie nur noch beim Booten mitgeben…

 

https://www.linux4sam.org/bin/view/Linux4SAM/PatchingDTinUboot

https://gist.github.com/geekman/4ab2c074201efd76994a38dab36b23b9

—> https://docs.u-boot.org/en/latest/usage/fdt_overlays.html

https://irq5.io/2018/07/24/boot-time-device-tree-overlays-with-u-boot/

https://linux-sunxi.org/Mainline_Kernel_Howto

https://pine64.org/documentation/ROCKPro64/Software/Device_Tree_Overlays_on_Mainline/