nerves_system_rpi3 icon indicating copy to clipboard operation
nerves_system_rpi3 copied to clipboard

Device tree compiler binary

Open Lucassifoni opened this issue 2 years ago • 2 comments

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.

Lucassifoni avatar Jan 30 '24 09:01 Lucassifoni

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 avatar Jan 30 '24 14:01 fhunleth

@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 avatar Feb 02 '24 08:02 Lucassifoni

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 ?

Lucassifoni avatar Sep 18 '24 09:09 Lucassifoni

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

fhunleth avatar Sep 18 '24 13:09 fhunleth

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

Lucassifoni avatar Sep 19 '24 06:09 Lucassifoni