diff options
| author | Simon Glass <[email protected]> | 2024-11-15 16:19:14 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-15 08:48:42 -0600 |
| commit | adc621bf15cf7478e2ac46985216703219ebe778 (patch) | |
| tree | 2f2abd90ad2c480c2ee6d918278c6f40b3f1f780 /include/bootflow.h | |
| parent | 8a6bf2fb31b6a02227818e679d567ae012494467 (diff) | |
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 <[email protected]>
Diffstat (limited to 'include/bootflow.h')
| -rw-r--r-- | include/bootflow.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index f407bb356b4..e09cff285e4 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -613,4 +613,19 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg); * Return: Image name, or "unknown" if not known */ const char *bootflow_img_type_name(enum bootflow_img_t type); + +/** + * bootflow_img_add() - Add a new image to a bootflow + * + * @bflow: Bootflow to add to + * @fname: Image filename (will be allocated) + * @type: Image type + * @addr: Address the image was loaded to, or 0 if not loaded + * @size: Image size + * Return: pointer to the added image, or NULL if out of memory + */ +struct bootflow_img *bootflow_img_add(struct bootflow *bflow, const char *fname, + enum bootflow_img_t type, ulong addr, + ulong size); + #endif |
