Device tree compiler binary
Hello,
This is a draft that I will enhance with details as I make some progress.
I've seen that mount -t configfs none /sys/kernel/config makes the /sys/kernel/config/device-tree/overlays folder appear on this stock raspbian : Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux Raspbian GNU/Linux 10 (buster).
In its current state, this PR adds the dtc binary via BR2_PACKAGE_DTC_PROGRAMS.
It also adds CONFIG_OF_OVERLAY=y, but :
- this doesn't solve the problem
- I then learned that this directive is auto-included if CONFIG_OF_CONFIGFS=y is included.
So I'm trying various things to make progress. Thought I'd open the PR to see if someone has an idea.
The official Raspberry Pi way is to load overlays via the dtoverlay command. Its source is at https://github.com/raspberrypi/userland/tree/master/host_applications/linux/apps/dtoverlay. dtoverlay is included in the system and should work. I tested it on other Raspberry Pis. CONFIG_OF_OVERLAY=y isn't needed here since OF_CONFIGFS=y selects it. (This isn't obvious unless you read kernel source or run make linux-menuconfig and look.)
Enabling BR2_PACKAGE_DTC_PROGRAMS=y to compile and load overlays without dtoverlay seems like a good change to me, fwiw.
@fhunleth sorry for the lost time. I don't know what exactly failed in my last test, but on-device compilation & loading of an overlay worked this morning, just with the DTC_PROGRAMS line. So I'm resuming work on the DTS loader assistant :^).
Hi @fhunleth, would you be okay with the inclusion of BR2_PACKAGE_DTC_PROGRAMS=y to the mainline rpi3 system so we have the dtc command available ?
Yes, so sorry that I dropped the ball on this. Merged! Thank you!
Thanks ! Don't worry for the delay, I had no Nerves work for a few months.