diff options
author | Simon Glass | 2021-03-07 17:35:13 -0700 |
---|---|---|
committer | Tom Rini | 2021-03-12 09:57:31 -0500 |
commit | 01ad9f75c5ccbf2dbb30f8c630fad7e648026449 (patch) | |
tree | 7b7d512102983a4ba0e16673e76724ae0ad51caa /include/os.h | |
parent | 8482356f48c96eb49f1bd9efd53c887d09a1cf64 (diff) |
sandbox: Update os_find_u_boot() to find the .img file
At present this function can only locate the u-boot ELF file. For SPL it
is handy to be able to locate u-boot.img since this is what would normally
be loaded by SPL.
Add another argument to allow this to be selected.
While we are here, update the function to load SPL when running in TPL,
since that is the next stage.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/os.h')
-rw-r--r-- | include/os.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/os.h b/include/os.h index d2a4afeca0f..77d8bd89d0f 100644 --- a/include/os.h +++ b/include/os.h @@ -324,9 +324,10 @@ int os_jump_to_image(const void *dest, int size); * * @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 * Return: 0 if OK, -NOSPC if the filename is too large, -ENOENT if not found */ -int os_find_u_boot(char *fname, int maxlen); +int os_find_u_boot(char *fname, int maxlen, bool use_img); /** * os_spl_to_uboot() - Run U-Boot proper |