From adc621bf15cf7478e2ac46985216703219ebe778 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 15 Nov 2024 16:19:14 -0700 Subject: bootstd: Update bootmeth_alloc_file() to record images As a first step to recording images and where they came from, update this function to do so, since it is used by two bootmeths Create a helper function in the bootflow system, since recorded images are always associated with bootflows. Signed-off-by: Simon Glass --- boot/bootmeth_script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'boot/bootmeth_script.c') diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c index c5cbf18c2e6..a2fb2899885 100644 --- a/boot/bootmeth_script.c +++ b/boot/bootmeth_script.c @@ -98,7 +98,8 @@ static int script_read_bootflow_file(struct udevice *bootstd, if (!bflow->subdir) return log_msg_ret("prefix", -ENOMEM); - ret = bootmeth_alloc_file(bflow, 0x10000, ARCH_DMA_MINALIGN); + ret = bootmeth_alloc_file(bflow, 0x10000, ARCH_DMA_MINALIGN, + (enum bootflow_img_t)IH_TYPE_SCRIPT); if (ret) return log_msg_ret("read", ret); -- cgit v1.2.3 From ff4c9a4b6fac767f28f668c708e79f3d618061a8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 15 Nov 2024 16:19:21 -0700 Subject: Update bootmeth_alloc_other() to record images Update this function to add the image to the list. Signed-off-by: Simon Glass --- boot/bootmeth_script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boot/bootmeth_script.c') diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c index a2fb2899885..020cb8a7aec 100644 --- a/boot/bootmeth_script.c +++ b/boot/bootmeth_script.c @@ -107,8 +107,8 @@ static int script_read_bootflow_file(struct udevice *bootstd, if (ret) return log_msg_ret("inf", ret); - ret = bootmeth_alloc_other(bflow, "boot.bmp", &bflow->logo, - &bflow->logo_size); + ret = bootmeth_alloc_other(bflow, "boot.bmp", BFI_LOGO, + &bflow->logo, &bflow->logo_size); /* ignore error */ return 0; -- cgit v1.2.3