nerves-project / nerves_system_rpi3

Base Nerves system configuration for the Raspberry Pi 3
Apache License 2.0
94 stars 72 forks source link

Device tree compiler binary #311

Closed Lucassifoni closed 1 month ago

Lucassifoni commented 9 months ago

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 :

So I'm trying various things to make progress. Thought I'd open the PR to see if someone has an idea.

fhunleth commented 9 months ago

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.

Lucassifoni commented 9 months ago

@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 :^).

Lucassifoni commented 1 month ago

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 ?

fhunleth commented 1 month ago

Yes, so sorry that I dropped the ball on this. Merged! Thank you!

Lucassifoni commented 1 month ago

Thanks ! Don't worry for the delay, I had no Nerves work for a few months.