johnshearing
Posts: 13
Joined: Sun Jun 11, 2017 6:12 am

Making a Custom Device Tree - Not an Overlay

Wed Oct 11, 2017 12:32 am

Hi All,
I am using a custom overlay such that the pi will halt when gpio-5 is shorted to gpio-6.
The overlay works great except if the user hasn't yet logged in - in other words, when the GDM3 login screen is showing.
In that case shorting pin 5 to pin 6 does nothing.

Assuming the problem is that the overlays don't change the device tree until after user logs in:
I had hoped to find a way to load the overlays before the login screen but was unable to find anything on the internet about this.
This makes me think perhaps it can not be done.

So now I am wondering if I can modify the device tree itself rather than changing it with an overlay.
My hope is that the device tree loads before the login screen where as perhaps the overlays change the device tree after the user logs in.
If so, I will need to know:
Where the device tree source is located,
What programming language is used to change it,
How is it compiled,
What directory should the new compiled device tree be placed in, and
What should it be named?

On the other hand, it may be that the overlays change the device tree before login and then the GDM3 display manager locks them out and prevents them from being used. This actually makes sense for security reasons in which case I could play with the device tree for the rest of my life and still not solve my problem.

If anyone has information on this topic I would be grateful to have it.
Thanks, John

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1419
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Making a Custom Device Tree - Not an Overlay

Wed Oct 11, 2017 9:41 am

Assuming the problem is that the overlays don't change the device tree until after user logs in:
That's an invalid assumption - unless you are talking about run-time overlay application using the Raspbian "dtoverlay" command, overlays are applied by the firmware before the kernel is started. As far as the ARM cores are concerned, the overlays are part of the DTB.

Return to “Device Tree”

Who is online

Users browsing this forum: No registered users and 2 guests