summaryrefslogtreecommitdiff
path: root/test/cmd_ut.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2022-05-11 10:55:40 +0100
committerTom Rini <trini@konsulko.com>2022-06-22 11:35:47 -0400
commitbfef72e4dd1c1d6dfc680867bf24a78597ab0438 (patch)
treed403ba89ce489bb4a0e56acd7342ecdff45a95de /test/cmd_ut.c
parenta47ce34403f27178c1264bf60496bbb9a21e5842 (diff)
cmd: load: add load command for memory mapped
cp.b is used a lot as a way to load binaries to memory and execute them, however we may need to integrate this with the efi subsystem to set it up as a bootdev. So, introduce a loadm command that will be consistent with the other loadX commands and will call the efi API's. ex: loadm $kernel_addr $kernel_addr_r $kernel_size with this a kernel with CONFIG_EFI_STUB enabled will be loaded and then subsequently booted with bootefi command. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test/cmd_ut.c')
-rw-r--r--test/cmd_ut.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index 67a13ee32b8..d70b72678ae 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -74,6 +74,9 @@ static struct cmd_tbl cmd_ut_sub[] = {
#ifdef CONFIG_CMD_ADDRMAP
U_BOOT_CMD_MKENT(addrmap, CONFIG_SYS_MAXARGS, 1, do_ut_addrmap, "", ""),
#endif
+#ifdef CONFIG_CMD_LOADM
+ U_BOOT_CMD_MKENT(loadm, CONFIG_SYS_MAXARGS, 1, do_ut_loadm, "", ""),
+#endif
};
static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -156,6 +159,9 @@ static char ut_help_text[] =
#ifdef CONFIG_CMD_ADDRMAP
"ut addrmap - Very basic test of addrmap command\n"
#endif
+#ifdef CONFIG_CMD_LOADM
+ "ut loadm [test-name]- test of parameters and load memory blob\n"
+#endif
;
#endif /* CONFIG_SYS_LONGHELP */