[PATCH 1/4] upl: Add a work-around for Tianocore images

Simon Glass sjg at chromium.org
Fri Jan 3 08:46:07 CET 2025


At present Tianocore uses a 'name' property to figure out what each
image is for. However this is not in the UPL spec.

For now, add a work-around so that Tianocore can boot.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 boot/upl_write.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/boot/upl_write.c b/boot/upl_write.c
index a9d25f607fe..d8211b2cf77 100644
--- a/boot/upl_write.c
+++ b/boot/upl_write.c
@@ -280,6 +280,7 @@ static int add_upl_images(const struct upl *upl, ofnode options)
 
 	alist_for_each(img, &upl->image) {
 		char buf[sizeof(u64) * 4];
+		const char *ptr = NULL;
 		ofnode subnode;
 		char name[30];
 		int len;
@@ -313,6 +314,15 @@ static int add_upl_images(const struct upl *upl, ofnode options)
 		if (ret < 0)
 			return log_msg_ret("uma", ret);
 
+		if (!strcmp(img->description, "UEFI Firmware Volume"))
+			ptr = "uefi-fv";
+		else if (!strcmp(img->description, "BDS Firmware Volume"))
+			ptr = "bds-fv";
+		if (ptr) {
+			ret = ofnode_write_string(node, "name", ptr);
+			if (ret < 0)
+				return log_msg_ret("uma", ret);
+		}
 	}
 
 	return 0;
-- 
2.43.0



More information about the U-Boot mailing list