[Concept,13/13] ulib: arm64: Enable Rust demo for qemu_arm64

Message ID 20260220001926.2366140-14-sjg@u-boot.org
State New
Headers
Series ulib: Enable the Rust demo on more architectures |

Commit Message

Simon Glass Feb. 20, 2026, 12:19 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

RUST_TARGET_arm is defined as aarch64-unknown-none and the Rust source
no longer generates undefined panic symbols, so the Rust demo can now
build and link for the ARM64 QEMU target.

Enable CONFIG_RUST_EXAMPLES in qemu_arm64_defconfig and add a QEMU boot
test that launches rust-demo.bin under qemu-system-aarch64.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 configs/qemu_arm64_defconfig | 1 +
 test/py/tests/test_ulib.py   | 7 +++++++
 2 files changed, 8 insertions(+)
  

Patch

diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index 507c08bc514..5c25bd313c6 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -78,3 +78,4 @@  CONFIG_UTHREAD=y
 CONFIG_UNIT_TEST=y
 CONFIG_ULIB=y
 CONFIG_EXAMPLES=y
+CONFIG_RUST_EXAMPLES=y
diff --git a/test/py/tests/test_ulib.py b/test/py/tests/test_ulib.py
index 65485118812..f4234253b7d 100644
--- a/test/py/tests/test_ulib.py
+++ b/test/py/tests/test_ulib.py
@@ -392,6 +392,13 @@  def test_ulib_demo_arm64(ubman):
     """Test the ulib demo binary under QEMU ARM64."""
     run_bios_demo(ubman, 'qemu-system-aarch64', ['-cpu', 'cortex-a57'])
 
+@pytest.mark.localqemu
+@pytest.mark.boardspec('qemu_arm64')
+@pytest.mark.buildconfigspec("rust_examples")
+def test_ulib_rust_demo_arm64(ubman):
+    """Test the Rust ulib demo binary under QEMU ARM64."""
+    run_bios_rust_demo(ubman, 'qemu-system-aarch64', ['-cpu', 'cortex-a57'])
+
 @pytest.mark.localqemu
 @pytest.mark.boardspec('qemu-riscv64')
 @pytest.mark.buildconfigspec("examples")