summaryrefslogtreecommitdiff
path: root/test/py/tests/fit_util.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-11 09:47:20 -0600
committerSimon Glass <sjg@chromium.org>2022-10-17 21:17:13 -0600
commitae0bf2214b81b56a5670819958234947443680be (patch)
treef3c7995afe7ca2f175bdf577be6e10bbe08a4a57 /test/py/tests/fit_util.py
parente7a18f751117ab38567d3929eacdcd9f3d6f5693 (diff)
vbe: Add a test for VBE device tree fixups
When a FIT includes some OS requests, U-Boot should process these and add the requested info to corresponding subnodes of the /chosen node. Add a pytest for this, which sets up the FIT, runs bootm and then uses a C unit test to check that everything looks OK. The test needs to run on sandbox_flattree since we don't support device tree fixups on sandbox (live tree) yet. So enable BOOTMETH_VBE and disable bootflow_system(), since EFI is not supported on sandbox_flattree. Add a link to the initial documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/tests/fit_util.py')
-rw-r--r--test/py/tests/fit_util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/py/tests/fit_util.py b/test/py/tests/fit_util.py
index fcec4c43c3c..79718d431a0 100644
--- a/test/py/tests/fit_util.py
+++ b/test/py/tests/fit_util.py
@@ -36,7 +36,7 @@ def make_its(cons, base_its, params, basename='test.its'):
print(base_its % params, file=outf)
return its
-def make_fit(cons, mkimage, base_its, params, basename='test.fit'):
+def make_fit(cons, mkimage, base_its, params, basename='test.fit', base_fdt=None):
"""Make a sample .fit file ready for loading
This creates a .its script with the selected parameters and uses mkimage to
@@ -55,6 +55,9 @@ def make_fit(cons, mkimage, base_its, params, basename='test.fit'):
fit = make_fname(cons, basename)
its = make_its(cons, base_its, params)
util.run_and_log(cons, [mkimage, '-f', its, fit])
+ if base_fdt:
+ with open(make_fname(cons, 'u-boot.dts'), 'w') as fd:
+ fd.write(base_fdt)
return fit
def make_kernel(cons, basename, text):