diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2022-05-11 10:55:40 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-06-22 11:35:47 -0400 |
commit | bfef72e4dd1c1d6dfc680867bf24a78597ab0438 (patch) | |
tree | d403ba89ce489bb4a0e56acd7342ecdff45a95de /doc | |
parent | a47ce34403f27178c1264bf60496bbb9a21e5842 (diff) | |
download | u-boot-bfef72e4dd1c1d6dfc680867bf24a78597ab0438.tar.gz |
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 'doc')
-rw-r--r-- | doc/usage/cmd/loadm.rst | 49 | ||||
-rw-r--r-- | doc/usage/index.rst | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/doc/usage/cmd/loadm.rst b/doc/usage/cmd/loadm.rst new file mode 100644 index 0000000000..b657114043 --- /dev/null +++ b/doc/usage/cmd/loadm.rst @@ -0,0 +1,49 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +loadm command +============= + +Synopsis +-------- + +:: + + loadm <src_addr> <dst_addr> <len> + +Description +----------- + +The loadm command is used to copy memory content from source address +to destination address and, if efi is enabled, will setup a "Mem" efi +boot device. + +The number of transferred bytes must be set by bytes parameter + +src_addr + start address of the memory location to be loaded + +dst_addr + destination address of the byte stream to be loaded + +len + number of bytes to be copied in hexadecimal. Can not be 0 (zero). + +Example +------- + +:: + + => loadm ${kernel_addr} ${kernel_addr_r} ${kernel_size} + loaded bin to memory: size: 12582912 + +Configuration +------------- + +The command is only available if CONFIG_CMD_LOADM=y. + +Return value +------------ + +The return value $? is set 0 (true) if the loading is succefull, and +is set to 1 (false) in case of error. + diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 770418434a..8d08ea14b0 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -44,6 +44,7 @@ Shell commands cmd/fatload cmd/for cmd/load + cmd/loadm cmd/loady cmd/mbr cmd/md |