K 10 svn:author V 6 kevans K 8 svn:date V 27 2018-01-13T21:27:36.022185Z K 7 svn:log V 1206 MFC (conceptually) r327376, r327416: Improve libfdt compatibility This is a direct commit to stable/11 due to restructuring of sys/boot => stand in -HEAD. The diff remains the same and it is simply applied to the previous location. MFC r327376: stand/fdt: Swap libfdt include order libfdt.h should be included before fdt.h, as hinted at by all of libfdt/; standard include order being libfdt.h, libfdt_env.h, fdt.h. The current include order also causes problems when libfdt gets updated, as fdt.h requires some definitions from libfdt.h. MFC r327416: stand/fdt: Make fdt_overlay_apply signature-compatible with libfdt libfdt will assume a writable fdt overlay blob has been passed in, so make ours compatible to allow easier review when we try to drop libfdt into place. overlay from the calling context is writable, making it safe to simply rip out everything related to copying the overlay blob in fdt_overlay_apply. I note here that we still have problems: fdt_overlay_apply, both our version and libfdt's, may fail and have already clobbered the base fdt to some extent. Future work will make sure we don't apply a potentially bogus fdt, instead discarding the base fdt if we had an error. END