]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand/fdt: Consolidate overlay handling a little further
authorkevans <kevans@FreeBSD.org>
Sun, 28 Jan 2018 01:22:15 +0000 (01:22 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 28 Jan 2018 01:22:15 +0000 (01:22 +0000)
commit275d0b202e98503af1dcec073849ebaf7eeed757
tree256a0ea3d3f1ababca0ac03bc2a939c5722c3875
parent26987c92025e4fa6f76f1071d19749055df67f4a
stand/fdt: Consolidate overlay handling a little further

This should have been done as part of r327350, but due to lack of foresight
it came later. In the different places we apply overlays, we duplicate the
bits that check for fdt_overlays in the environment and supplement that with
any other places we need to check for overlays to load. These "other places"
will be loader specific and are not candidates for consolidation.

Provide an fdt_load_dtb_overlays to capture the common logic, allow passing
in an additional list of overlays to be loaded. This additional list of
overlays is used in practice for ubldr to pull in any fdt_overlays passed to
it from U-Boot environment, but it can be used for any other source of
overlays.

These additional overlays supplement loader.conf(5) fdt_overlays, rather
than replace, so that we're not restricted to specifying overlays in only
one place. This is a change from previous behavior where loader.conf(5)
supplied fdt_overlays would cause us to ignore U-Boot environment, and this
seems nonsensical- user should have sufficient control over both of these
aspects, or lack of control for good reasons.

A knob could be considered in the future to ignore U-Boot supplied overlays,
but the supplemental treatment seems like a good start.

Reviewed by: imp (earlier version), gonzo (earlier version)
Differential Revision: https://reviews.freebsd.org/D13993
stand/efi/fdt/efi_fdt.c
stand/fdt/fdt_loader_cmd.c
stand/fdt/fdt_platform.h
stand/uboot/fdt/uboot_fdt.c