[PATCH v2 17/28] doc: smh: Update semihosting documentation
Sean Anderson
sean.anderson at seco.com
Thu Mar 10 21:50:47 CET 2022
This documents the new semihosting features added in the past few
commits. It also describes how to migrate any out-of-tree users of
smhload.
Signed-off-by: Sean Anderson <sean.anderson at seco.com>
---
Changes in v2:
- Add migration instructions for smhload
doc/usage/semihosting.rst | 38 ++++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/doc/usage/semihosting.rst b/doc/usage/semihosting.rst
index ed16e4d582..e3cb88724f 100644
--- a/doc/usage/semihosting.rst
+++ b/doc/usage/semihosting.rst
@@ -34,10 +34,40 @@ Foundation and Base fastmodel simulators.
Loading files
-------------
-The semihosting code adds a "hostfs"::
+The semihosting code adds a "semihosting filesystem"::
- smhload <image> <address> [env var]
+ load hostfs <address> <image>
That will load an image from the host filesystem into RAM at the specified
-address and optionally store the load end address in the specified
-environment variable.
+address. If you are using U-Boot SPL, you can also use ``BOOT_DEVICE_SMH``
+which will load ``CONFIG_SPL_FS_LOAD_PAYLOAD_NAME``.
+
+Host console
+------------
+
+U-Boot can use the host's console instead of a physical serial device by
+enabling ``CONFIG_SERIAL_SEMIHOSTING``. If you don't have
+``CONFIG_DM_SERIAL`` enabled, make sure you disable any other serial
+drivers.
+
+Migrating from ``smhload``
+--------------------------
+
+If you were using the ``smhload`` command, you can migrate commands like::
+
+ smhload <file> <address> [<end var>]
+
+to a generic load command like::
+
+ load hostfs <address> <file>
+
+The ``load`` command will set the ``filesize`` variable with the size of
+the file. The ``fdt chosen`` command has been updated to take a size
+instead of an end address. If you were adding the initramfs to your device
+tree like::
+
+ fdt chosen <address> <end var>
+
+you can now run::
+
+ fdt chosen <address> $filesize
--
2.25.1
More information about the U-Boot
mailing list