diff options
| author | Simon Glass <sjg@chromium.org> | 2024-08-07 16:47:35 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2024-08-09 16:03:20 -0600 |
| commit | b3cb1c4c0b6b48543542dcb736e30b22b0796815 (patch) | |
| tree | 1390a984c6d12799135fbeaf186a1f9861e20eeb /test/py/tests | |
| parent | 0fc406ab20e6fa1e92e68a2c51b73fc4d59b057f (diff) | |
sandbox_vpl: Enable Universal Payload
Use the sandbox_vpl build to test UPL since it supports a real devicetree
in SPL. The sandbox_spl build uses OF_PLATDATA.
Enable writing the UPL handoff in SPL and reading it in U-Boot proper.
Provide a test to check that this handoff works.
Note that the test uses the standard devicetree rather than the test one,
since it is a lot smaller and fits in the existing bloblist.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/tests')
| -rw-r--r-- | test/py/tests/test_upl.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/py/tests/test_upl.py b/test/py/tests/test_upl.py new file mode 100644 index 00000000000..171079f8dba --- /dev/null +++ b/test/py/tests/test_upl.py @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright 2024 Google LLC +# +# Test addition of Universal Payload + +import os + +import pytest +import u_boot_utils + +@pytest.mark.boardspec('sandbox_vpl') +def test_upl_handoff(u_boot_console): + cons = u_boot_console + ram = os.path.join(cons.config.build_dir, 'ram.bin') + fdt = os.path.join(cons.config.build_dir, 'u-boot.dtb') + + # Remove any existing RAM file, so we don't have old data present + if os.path.exists(ram): + os.remove(ram) + flags = ['-m', ram, '-d', fdt] + cons.restart_uboot_with_flags(flags, use_dtb=False) + + # Make sure that Universal Payload is detected in U-Boot proper + output = cons.run_command('upl info') + assert output == 'UPL state: active' |
