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)
Fri, Mar 29, 12:15 PM
Unknown Object (File)
Mar 11 2024, 9:25 AM
Unknown Object (File)
Mar 11 2024, 9:24 AM
Unknown Object (File)
Mar 11 2024, 9:20 AM
Unknown Object (File)
Mar 7 2024, 11:10 PM
Unknown Object (File)
Jan 9 2024, 6:19 AM
Unknown Object (File)
Jan 6 2024, 11:15 PM
Unknown Object (File)
Jan 6 2024, 11:15 PM
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 Not Applicable
Unit
Tests Not Applicable

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.