Page MenuHomeFreeBSD

stand/fdt: Check /compatible property on overlay if it exists
ClosedPublic

Authored by kevans on Jan 18 2018, 4:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 5:36 AM
Unknown Object (File)
Oct 7 2024, 4:45 PM
Unknown Object (File)
Sep 25 2024, 12:16 AM
Unknown Object (File)
Sep 24 2024, 9:32 PM
Unknown Object (File)
Sep 24 2024, 8:32 PM
Unknown Object (File)
Sep 8 2024, 7:06 AM
Unknown Object (File)
Sep 8 2024, 7:06 AM
Unknown Object (File)
Sep 7 2024, 9:22 AM
Subscribers
None

Details

Summary

Example overlays seen in other places use a compatible property on root node of an overlay to specify SOC compatibility. These don't get merged into base FDT as they're not part of the fragment, but it's expected that consumers of the overlay may want to check it.

If /compatible on the overlay is missing, just apply it. This is the "I know what I'm doing" mode for those wanting to whip up a quick overlay and apply it. An overlay intended for distribution should include /compatible so as not to break a user's system.

If /compatible on the overlay exists, honor it and cross-check it with /compatible on the base FDT. If /compatible on the base FDT is missing in this case, don't apply the overlay rather than risk breaking the system.

Move the COPYOUT of overlay material to before we allocate space for next_fdtp so that we can avoid the allocation and copy into next_fdtp if we already know that the overlay can't apply.

This gives way to the possibility of autoloading overlays found in /boot/overlays, since this provides a means of filtering out overlays not applicable to the current board.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 14461

Event Timeline

This revision is now accepted and ready to land.Jan 28 2018, 12:22 AM
This revision was automatically updated to reflect the committed changes.