diff options
author | Tom Rini <trini@konsulko.com> | 2022-08-12 12:51:14 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 12:51:14 -0400 |
commit | 6fc212779c990ff27a430e370bfb8fac01ddde7f (patch) | |
tree | 32ecaafa1d653e275683cfacac41dd2bb57efca1 /boot/bootdev-uclass.c | |
parent | f5003e0791dbe796bf7b41515d67ae5527679ec9 (diff) | |
parent | 5fe76d460d857b00d582d7cd6cea9ac740ea912b (diff) |
Merge branch '2022-08-11-verified-boot-for-embedded-initial-support'
To quote Simon:
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.
Another (significant) change is that bootmeths now have a 'global' flag,
to allow the implementation of EFI bootmgr (and VBE) to be cleaned up.
The 'system' bootdev is no-longer needed and these bootmeths are scanned
first.
Further work is needed to pull everything together, but this is a step
along the way.
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r-- | boot/bootdev-uclass.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 1ede933c2f2..13ac69eb392 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -36,7 +36,6 @@ enum { int bootdev_add_bootflow(struct bootflow *bflow) { - struct bootdev_uc_plat *ucp = dev_get_uclass_plat(bflow->dev); struct bootstd_priv *std; struct bootflow *new; int ret; @@ -52,7 +51,11 @@ int bootdev_add_bootflow(struct bootflow *bflow) memcpy(new, bflow, sizeof(*bflow)); list_add_tail(&new->glob_node, &std->glob_head); - list_add_tail(&new->bm_node, &ucp->bootflow_head); + if (bflow->dev) { + struct bootdev_uc_plat *ucp = dev_get_uclass_plat(bflow->dev); + + list_add_tail(&new->bm_node, &ucp->bootflow_head); + } return 0; } @@ -604,14 +607,14 @@ int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp) log_debug("Expected %d bootdevs, found %d using aliases\n", count, upto); - count = build_order(bootstd, order, upto); - if (count < 0) { + ret = build_order(bootstd, order, upto); + if (ret < 0) { free(order); - return log_msg_ret("build", count); + return log_msg_ret("build", ret); } + iter->num_devs = ret; iter->dev_order = order; - iter->num_devs = count; iter->cur_dev = 0; dev = *order; |