From: Simon Glass <simon.glass@canonical.com> This series extends the ulib demo to ARM64 and RISC-V64, following the existing x86 pattern. Each architecture re-links U-Boot with the example objects so the demo's main() overrides the weak default. RISC-V requires an additional prelink-riscv step to resolve GOT entries in the static PIE binary. EFI app builds are also supported on all three architectures, producing a demo-app.efi binary that can boot under QEMU with UEFI firmware. A build_api.py fix handles empty archives that appear in cross-compiled EFI builds. All new demos have pytests that boot under QEMU and verify the expected output. A new 'localqemu' pytest marker skips these tests in lab mode, since they launch their own QEMU rather than using the lab's managed U-Boot instance. This also updates the build-qemu script to support RISC-V. Simon Glass (17): ulib: Skip empty archives in build_api.py objcopy step ulib: Build the static test binary by default ulib: test: Add localqemu marker to skip tests in lab ulib: test: Detect clang instead of checking binaries ulib: Extract common example build rules for demo ulib: x86: Add demo pytest for qemu-x86_64_nospl ulib: arm: Add demo binary and examples for qemu_arm64 ulib: riscv: Add demo binary and examples for qemu-riscv64 ulib: efi: Use ulib_has_main() in efi_main() ulib: x86: Add demo-app.efi target for EFI app builds ulib: x86: Enable examples for efi-x86_app64 ulib: test: Add a pytest for efi-x86_app64 demo ulib: arm: Enable demo EFI binary for efi-arm_app64 ulib: riscv: Enable demo EFI binary for efi-riscv_app64 ulib: test: Add EFI demo pytest for arm64 ulib: test: Add EFI demo pytest for riscv64 ulib: scripts: Add RISC-V support to build-qemu Makefile | 3 + arch/arm/Makefile | 6 + arch/riscv/Makefile | 7 + arch/x86/Makefile | 31 +--- configs/efi-arm_app64_defconfig | 2 + configs/efi-riscv_app64_defconfig | 2 + configs/efi-x86_app64_defconfig | 2 + configs/qemu-riscv64_defconfig | 2 + configs/qemu-x86_64_nospl_defconfig | 2 + configs/qemu_arm64_defconfig | 2 + doc/develop/pytest/usage.rst | 9 ++ examples/ulib/Kbuild | 2 +- lib/efi_client/efi_main.c | 3 +- scripts/Makefile.ulib-example | 63 ++++++++ scripts/build-qemu | 23 ++- scripts/build_api.py | 6 + test/py/conftest.py | 15 ++ test/py/pytest.ini | 1 + test/py/tests/test_ulib.py | 237 ++++++++++++++++++++++++---- 19 files changed, 351 insertions(+), 67 deletions(-) create mode 100644 scripts/Makefile.ulib-example -- 2.43.0 base-commit: a0102ffa945d6a92b52167d11faa06a4e52edd31 branch: ulibb