This adds the concept of a VBE method to U-Boot, along with an implementation of the 'VBE simple' method, basically a simple way of updating firmware in MMC from userspace and monitoring it from U-Boot.
VBE simple is implemented in fwupd. U-Boot's role is to set up the device tree with the required firmware-update properties and provide the developer with information about the current VBE state. To that end this series includes a new 'vbe' command that allows VBE methods to be listed and examined. As part of this work, support for doing FDT fixups via the event interface is provided, along with the ability to write to the device tree via the ofnode interface. Further work is needed to pull everything together, but this is a step along the way. Simon Glass (19): video: Renname vbe.h to vesa.h video: Rename structs and functions to avoid VBE dm: core: Split out the declaration of ofnode ofnode: Add a note about how livetree updates work ofnode: Introduce support for multiple trees dm: core: Move ofnode-writing test to ofnode dm: core: Swap parameters of ofnode_write_prop() dm: core: Tidy up ofnode-writing test dm: core: Prepare for updating the device tree with ofnode ofnode: Allow writing to a flat tree dm: core: Add support for writing u32 with ofnode event: Add an event for device tree fixups read: Support sandbox bootstd: Fix comment in bootmeth test bootstd: Detect empty bootmeth ordering bootstd: Provide a bootmeth method to obtain state info vbe: Add initial support for VBE vbe: Support VBE simple vbe: Add a new vbe command arch/sandbox/dts/sandbox.dtsi | 13 ++ arch/sandbox/dts/test.dts | 15 ++ arch/x86/lib/bios.c | 12 +- arch/x86/lib/coreboot_table.c | 2 +- arch/x86/lib/fsp/fsp_graphics.c | 4 +- boot/Kconfig | 21 ++ boot/Makefile | 3 + boot/bootmeth-uclass.c | 12 + boot/bootmeth_distro.c | 14 ++ boot/image-fdt.c | 11 + boot/vbe.c | 119 ++++++++++ boot/vbe_simple.c | 304 ++++++++++++++++++++++++++ cmd/Kconfig | 10 + cmd/Makefile | 1 + cmd/elf.c | 2 +- cmd/read.c | 3 +- cmd/vbe.c | 87 ++++++++ common/event.c | 3 + doc/develop/driver-model/livetree.rst | 60 ++++- drivers/bios_emulator/atibios.c | 18 +- drivers/core/of_access.c | 57 ++++- drivers/core/ofnode.c | 81 +++---- drivers/pci/pci_rom.c | 14 +- drivers/video/broadwell_igd.c | 4 +- drivers/video/coreboot.c | 4 +- drivers/video/efi.c | 4 +- drivers/video/ivybridge_igd.c | 4 +- drivers/video/vesa.c | 4 +- include/bios_emul.h | 6 +- include/bootmeth.h | 38 +++- include/bootstd.h | 2 + include/dm/of_access.h | 22 +- include/dm/ofnode.h | 122 +++++------ include/dm/ofnode_decl.h | 85 +++++++ include/event.h | 14 ++ include/of_live.h | 16 ++ include/test/test.h | 2 + include/vbe.h | 146 ++++--------- include/vesa.h | 116 ++++++++++ lib/elf.c | 2 +- lib/of_live.c | 14 +- test/boot/Makefile | 4 + test/boot/bootflow.c | 53 +++-- test/boot/bootmeth.c | 31 ++- test/boot/vbe_simple.c | 115 ++++++++++ test/dm/ofnode.c | 132 +++++++++++ test/dm/test-fdt.c | 53 ----- test/py/tests/test_event_dump.py | 1 + test/test-main.c | 3 +- 49 files changed, 1503 insertions(+), 360 deletions(-) create mode 100644 boot/vbe.c create mode 100644 boot/vbe_simple.c create mode 100644 cmd/vbe.c create mode 100644 include/dm/ofnode_decl.h create mode 100644 include/vesa.h create mode 100644 test/boot/vbe_simple.c -- 2.37.0.170.g444d1eabd0-goog