Hi Bas,

> On 21 Jan 2023, at 22:53, Bas Mevissen <ab...@basmevissen.nl> wrote:
> 
>> On 2023-01-21 22:42, Lukas Zeller wrote:
>> That really looks like a great solution with all advantages combined!
>> I agree this is better than patching, I just did not realize it was
>> possible at all to modularize dt overlay functionality this way.
> 
> It is a thing very commonly done on RPi "hats" to change the pin config on 
> the extension header.

Yes, RPi has DT overlays, but AFAIK these are merged by the rpi-specific 
bootloader according to what config.txt says, before starting the linux kernel. 
I don't think RPi offers a way to add overlays after boot via configfs by 
default.

Many other platforms don't have a bootloader which allows that pre-boot overlay 
loading. U-boot can do it [1], but it depends on how it is built, and replacing 
u-boot on a given target is more demanding than installing a kernel module.

So the dtbocfg loadable module as recommended by Tomasz enables DT overlays 
even for targets which don't have such functionality in the boot loader, just 
by installing a package, which is nice and a pretty generic solution. It is not 
totally generic because it requires the kernel to be built with 
CONFIG_OF_OVERLAY set, which seems not to be the default in most targets.

> You may find some documentation and examples there that may help you.

Indeed, due to the popularity of overlays in the RPi space, there are a lot of 
examples.

Lukas

[1] : https://u-boot.readthedocs.io/en/latest/usage/fdt_overlays.html

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to