aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-05 16:32:45 -0600
committerSimon Glass <sjg@chromium.org>2021-07-21 10:27:34 -0600
commitf178bebf551a43445ba8f1e1a4c1638eff8eb612 (patch)
treec36bf045cdad0eb02691bb999ba6f734e330c220 /arch/sandbox/include
parent719d286475d2df1f1d8f4413659893934f38de7d (diff)
sandbox: Support executables for more phases
The SPL header has a function for obtaining the phase in capital letters, e.g. 'SPL'. Add one for lower-case also, as used by sandbox. Use this to generalise the sandbox logic for determining the filename of the next sandbox executable. This can provide support for VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/spl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/spl.h b/arch/sandbox/include/asm/spl.h
index 51e9d95d55..d25dc7c82a 100644
--- a/arch/sandbox/include/asm/spl.h
+++ b/arch/sandbox/include/asm/spl.h
@@ -12,4 +12,17 @@ enum {
BOOT_DEVICE_BOARD,
};
+/**
+ * sandbox_find_next_phase() - Find the next phase of U-Boot
+ *
+ * This function is intended to be called from within sandbox SPL. It uses
+ * a few rules to find the filename of the next U-Boot phase. See also
+ * os_find_u_boot().
+ *
+ * @fname: place to put full path to U-Boot
+ * @maxlen: maximum size of @fname
+ * @use_img: select the 'u-boot.img' file instead of the 'u-boot' ELF file
+ */
+int sandbox_find_next_phase(char *fname, int maxlen, bool use_img);
+
#endif