aboutsummaryrefslogtreecommitdiff
path: root/include/bootm.h
diff options
context:
space:
mode:
authorSimon Glass2023-11-18 14:05:16 -0700
committerTom Rini2023-12-13 11:51:24 -0500
commit3ac85bdc6a6cc5bc8a93ad91b330015ad8355cb2 (patch)
tree94ba6d2923df10971f27a98dd2ff9296e6b1ecb3 /include/bootm.h
parentb020254d71ed0873baddb9b9bc6ec5bf1e82b26c (diff)
bootm: Adjust the parameters of bootm_find_images()
Rather than passing it all the command-line args, pass in the pieces that it needs. These are the image address, the ramdisk address/name and the FDT address/name. Ultimately this will allow usage of this function without being called from the command line. Move the function comment to the header file and tidy it a little. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootm.h')
-rw-r--r--include/bootm.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/include/bootm.h b/include/bootm.h
index 10a1bd65a75..f5229ea90b3 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -52,9 +52,29 @@ int boot_selected_os(int argc, char *const argv[], int state,
ulong bootm_disable_interrupts(void);
-/* This is a special function used by booti/bootz */
-int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
- ulong size);
+/**
+ * bootm_find_images() - find and locate various images
+ *
+ * @img_addr: Address of image being loaded
+ * @conf_ramdisk: Indicates the ramdisk to use (typically second arg of bootm)
+ * @conf_fdt: Indicates the FDT to use (typically third arg of bootm)
+ * @start: OS image start address
+ * @size: OS image size
+ *
+ * boot_find_images() will attempt to load an available ramdisk,
+ * flattened device tree, as well as specifically marked
+ * "loadable" images (loadables are FIT only)
+ *
+ * Note: bootm_find_images will skip an image if it is not found
+ *
+ * This is a special function used by booti/bootz
+ *
+ * Return:
+ * 0, if all existing images were loaded correctly
+ * 1, if an image is found but corrupted, or invalid
+ */
+int bootm_find_images(ulong img_addr, const char *conf_ramdisk,
+ const char *conf_fdt, ulong start, ulong size);
/*
* Measure the boot images. Measurement is the process of hashing some binary