cmd: load: add load command for memory mapped
authorRui Miguel Silva <rui.silva@linaro.org>
Wed, 11 May 2022 09:55:40 +0000 (10:55 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jun 2022 15:35:47 +0000 (11:35 -0400)
commitbfef72e4dd1c1d6dfc680867bf24a78597ab0438
treed403ba89ce489bb4a0e56acd7342ecdff45a95de
parenta47ce34403f27178c1264bf60496bbb9a21e5842
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>
14 files changed:
README
cmd/Kconfig
cmd/bootefi.c
cmd/load.c
configs/sandbox64_defconfig
configs/sandbox_defconfig
doc/usage/cmd/loadm.rst [new file with mode: 0644]
doc/usage/index.rst
include/efi_loader.h
include/test/suites.h
lib/efi_loader/efi_device_path.c
test/cmd/Makefile
test/cmd/loadm.c [new file with mode: 0644]
test/cmd_ut.c