[U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader

Rob Clark robdclark at gmail.com
Sun Aug 6 16:10:28 UTC 2017


Signed-off-by: Rob Clark <robdclark at gmail.com>
---
Kinda works, but since we don't have an 'exit' command like grub, we
have to reboot, which leaves the "board" in a bad state (I guess,
since the next test fails).  I haven't tackled the travis bits to get
travis to download OpenBSD's bootloader, or other little details like
that.

So suggestions welcome ;-)

 test/py/tests/test_efi_loader.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 5d7f5dbfb2..376f6442a3 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -193,3 +193,22 @@ def test_efi_grub_net(u_boot_console):
 
     # And give us our U-Boot prompt back
     u_boot_console.run_command('')
+
+ at pytest.mark.buildconfigspec('cmd_bootefi')
+def test_efi_openbsd_net(u_boot_console):
+    """Run OpenBSD's bootloader via TFTP.
+
+    The bootaa64.efi file is downloaded from the TFTP server and
+    gets executed.
+    """
+
+    addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_openbsd_file')
+
+    u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False)
+
+    # Check that bootloader loads properly:
+    u_boot_console.wait_for('boot>')
+
+    # There is no exit, but there is a reboot cmd.. maybe we need to do
+    # more than this to get u-boot running again??
+    u_boot_console.run_command('reboot', wait_for_prompt=False, wait_for_echo=False)
-- 
2.13.0



More information about the U-Boot mailing list