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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-01-15 08:48:42 -06:00
committed by Tom Rini
parent 8a6bf2fb31
commit adc621bf15
6 changed files with 55 additions and 6 deletions
+2 -1
View File
@@ -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);