summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-06 01:32:45 +0300
committerSimon Glass <sjg@chromium.org>2021-07-21 19:27:34 +0300
commitf178bebf551a43445ba8f1e1a4c1638eff8eb612 (patch)
treec36bf045cdad0eb02691bb999ba6f734e330c220 /test
parent719d286475d2df1f1d8f4413659893934f38de7d (diff)
downloadu-boot-f178bebf551a43445ba8f1e1a4c1638eff8eb612.tar.xz
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 'test')
-rw-r--r--test/image/spl_load.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/image/spl_load.c b/test/image/spl_load.c
index 851603ddd7..e7cabf5680 100644
--- a/test/image/spl_load.c
+++ b/test/image/spl_load.c
@@ -56,6 +56,7 @@ struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
static int spl_test_load(struct unit_test_state *uts)
{
+ const char *cur_prefix, *next_prefix;
struct spl_image_info image;
struct image_header *header;
struct text_ctx text_ctx;
@@ -68,7 +69,10 @@ static int spl_test_load(struct unit_test_state *uts)
load.bl_len = 512;
load.read = read_fit_image;
- ret = os_find_u_boot(fname, sizeof(fname), true);
+ cur_prefix = spl_phase_prefix(spl_phase());
+ next_prefix = spl_phase_prefix(spl_next_phase());
+ ret = os_find_u_boot(fname, sizeof(fname), true, cur_prefix,
+ next_prefix);
if (ret) {
printf("(%s not found, error %d)\n", fname, ret);
return ret;