summaryrefslogtreecommitdiff
path: root/doc/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:56:07 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:41 +0800
commit189882c9337bd4fa0a6b2c5de3031cd6f4b8e262 (patch)
treee66d566ec146c814cd00492eba44af00f18e37a6 /doc/arch
parent37a1cf9c9c4c670e074feb8fb2fc6b4a40a80b1b (diff)
downloadu-boot-189882c9337bd4fa0a6b2c5de3031cd6f4b8e262.tar.gz
sandbox: Add a -T flag to use the test device tree
U-Boot already supports using -D to indicate that it should use the normal device tree. It is sometimes useful to run with the test device tree, e.g. when running a test. Add a -T option for this along with some documentation. It can be used like this: /tmp/b/sandbox/u-boot -T -c "ut dm pci_busdev" (this will use /tmp/b/sandbox/arch/sandbox/dts/test.dtb as the DT) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'doc/arch')
-rw-r--r--doc/arch/sandbox.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst
index 5c0caebcbf..54933b5675 100644
--- a/doc/arch/sandbox.rst
+++ b/doc/arch/sandbox.rst
@@ -103,6 +103,8 @@ A device tree binary file can be provided with -d. If you edit the source
(it is stored at arch/sandbox/dts/sandbox.dts) you must rebuild U-Boot to
recreate the binary file.
+To use the default device tree, use -D. To use the test device tree, use -T.
+
To execute commands directly, use the -c option. You can specify a single
command, or multiple commands separated by a semicolon, as is normal in
U-Boot. Be careful with quoting as the shell will normally process and
@@ -499,6 +501,13 @@ run natively on your board if desired (and enabled).
To run all tests use "make check".
+To run a single test in an existing sandbox build, you can use -T to use the
+test device tree, and -c to select the test:
+
+ /tmp/b/sandbox/u-boot -T -c "ut dm pci_busdev"
+
+This runs dm_test_pci_busdev() which is in test/dm/pci.c
+
Memory Map
----------