[Concept,12/13] ulib: riscv: Enable Rust demo for efi-riscv_app64
Commit Message
From: Simon Glass <simon.glass@canonical.com>
RUST_TARGET_riscv is already defined as riscv64gc-unknown-none-elf, so
the Rust demo just needs to be enabled in the defconfig.
Enable CONFIG_RUST_EXAMPLES in efi-riscv_app64_defconfig and add a QEMU
boot test that launches rust-demo-app.efi under RISC-V UEFI firmware.
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
configs/efi-riscv_app64_defconfig | 1 +
test/py/tests/test_ulib.py | 10 ++++++++++
2 files changed, 11 insertions(+)
@@ -54,4 +54,5 @@ CONFIG_CONSOLE_SCROLL_LINES=5
CONFIG_FAT_WRITE=y
CONFIG_ULIB=y
CONFIG_EXAMPLES=y
+CONFIG_RUST_EXAMPLES=y
CONFIG_CMD_DHRYSTONE=y
@@ -545,3 +545,13 @@ def test_ulib_demo_efi_riscv64(ubman):
'/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd',
'/usr/share/qemu-efi-riscv64/RISCV_VIRT_VARS.fd',
['--machine', 'virt'])
+
+@pytest.mark.localqemu
+@pytest.mark.boardspec('efi-riscv_app64')
+@pytest.mark.buildconfigspec("rust_examples")
+def test_ulib_rust_demo_efi_riscv64(ubman):
+ """Test the Rust ulib demo EFI app under QEMU RISC-V 64 with UEFI."""
+ run_efi_rust_demo(ubman, 'qemu-system-riscv64',
+ '/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd',
+ '/usr/share/qemu-efi-riscv64/RISCV_VIRT_VARS.fd',
+ ['--machine', 'virt'])