This is needed because multiple plugins will soon be consuming the system FDT,
and we don't want to either parse this multiple times, or duplicate the loading
logic.
Some parsers are ignoring the magic when using _FLAG_IGNORE_CHECKSUM
(which is wrong; fuzzers have no problem with enforcing a static prefix)
and other either disregard the offset or check the magic in an unsafe
way. Also, use FWUPD_ERROR_INVALID_FILE consistently for magic failure.
Add a vfunc, and move all the clever code into one place.
This adds the logic for the VBE plugin. It supports reading information
from the system to determine which VBE method (a device in fwupd) is in
use, then creating those devices to handle the actual update.
Verified Boot for Embedded (VBE) relies on FIT files to operate.
FIT is a way of packaging multiple images along with information about
them.
Signed-off-by: Simon Glass <sjg@chromium.org>