summaryrefslogtreecommitdiff
path: root/boot/vbe_common.h
AgeCommit message (Collapse)Author
2025-02-03vbe: Add an implementation of VBE-ABrecSimon Glass
So far only VBE-simple is implemented in U-Boot. This supports a single image which can be updated in situ. It is often necessary to support two images (A and B) so that the board is not bricked if the update is interrupted or is bad. In some cases, a non-updatable recovery image is desirable, so that the board can be returned to a known-good state in the event of a serious failure. Introduce ABrec which provides these features. It supports three independent images and the logic to select the desired one on boot. While we are here, fix a debug message to indicate the function it called. Provide a maintainers entry for VBE. Note that fwupdated only supports VBE-simple so far, but supports for ABrec will appear in time. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Support loading SPL imagesSimon Glass
VBE needs to load different images from a FIT depending on the xPL phase in use. The IH_PHASE value is used to select the image to load. Add the required logic to handle this. For compatibility with the SPL-loader driver, fill out a struct spl_image_info with the details needed to boot the next phase. This is good enough for VBE-simple but ABrec will need the full set of bootstd features. So add a USE_BOOTMETH define to control this. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Split out reading a FIT into the common fileSimon Glass
Loading a FIT is useful for other VBE methods, such as ABrec. Create a new function to handling reading it. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Move reading the nvdata into the common fileSimon Glass
All VBE methods read non-volatile data, so move this function into a common file. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Move reading the version into the common fileSimon Glass
All VBE methods read a version string, so move this function into a common file. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Create a common function to get the block deviceSimon Glass
Add a vbe_get_blk() function and use it to obtain the block device used by VBE. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-22vbe: Start a common header fileSimon Glass
Move a few things into a new, common header file so that vbe-simple can share code with the upcoming abrec. Put struct simple_nvdata in it and rename it. Signed-off-by: Simon Glass <sjg@chromium.org>