aboutsummaryrefslogtreecommitdiff
path: root/include/image.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-06 08:52:27 -0600
committerTom Rini <trini@konsulko.com>2023-01-16 18:24:24 -0500
commit858fefd5fc3ae9006a0f545d7744e6f95270b14d (patch)
treed43237c591cc54a891fed7f45b1b0167e5a5e76f /include/image.h
parent32bab0eae51b55898d1e2804e6614d9143840581 (diff)
downloadu-boot-858fefd5fc3ae9006a0f545d7744e6f95270b14d.zip
u-boot-858fefd5fc3ae9006a0f545d7744e6f95270b14d.tar.gz
u-boot-858fefd5fc3ae9006a0f545d7744e6f95270b14d.tar.bz2
image: Add a function to find a script in an image
Split this functionality out of the 'source' command so it can be used from another place. For now leave it where it is, but a future patch will move it out of cmd/ Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h
index bed75ce..f7ebe9c 100644
--- a/include/image.h
+++ b/include/image.h
@@ -730,6 +730,20 @@ int image_source_script(ulong addr, const char *fit_uname,
const char *confname);
/**
+ * image_locate_script() - Locate the raw script in an image
+ *
+ * @buf: Address of image
+ * @size: Size of image in bytes
+ * @fit_uname: Node name of FIT image to read
+ * @confname: Node name of FIT config to read
+ * @datap: Returns pointer to raw script on success
+ * @lenp: Returns size of raw script on success
+ * @return 0 if OK, non-zero on error
+ */
+int image_locate_script(void *buf, int size, const char *fit_uname,
+ const char *confname, char **datap, uint *lenp);
+
+/**
* fit_get_node_from_config() - Look up an image a FIT by type
*
* This looks in the selected conf- node (images->fit_uname_cfg) for a