From: Kuan-Jui Chiu <kchiu@axiado.com>
Cc: Kuan-Jui Chiu <kchiu@axiado.com>,
mark.caveayland@nutanix.com, philmd@oss.qualcomm.com,
163wangjack@gmail.com, peter.maydell@linaro.org,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Subject: [PATCH v8 13/13] tests/functional/aarch64: Add functional test for Axiado EVKs
Date: Wed, 18 Nov 2026 23:13:53 -0800 [thread overview]
Message-ID: <20261119071355.3520249-14-kchiu@axiado.com> (raw)
In-Reply-To: <20261119071355.3520249-1-kchiu@axiado.com>
Introduce funtional test for boot process from the kernel to systemd
Add additional subtest to include ARM TrustedZone firmware into boot
process for ax3005-evb model
Signed-off-by: Kuan-Jui Chiu <kchiu@axiado.com>
---
MAINTAINERS | 2 +
tests/functional/aarch64/meson.build | 4 +
tests/functional/aarch64/test_ax3005_evb.py | 140 ++++++++++++++++++
.../functional/aarch64/test_axiado_scm3003.py | 62 ++++++++
4 files changed, 208 insertions(+)
create mode 100755 tests/functional/aarch64/test_ax3005_evb.py
create mode 100755 tests/functional/aarch64/test_axiado_scm3003.py
diff --git a/MAINTAINERS b/MAINTAINERS
index 53e15069ed..297c8685d6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1333,6 +1333,8 @@ F: hw/*/axiado*.c
F: include/hw/arm/ax3000*.h
F: include/hw/arm/ax3005*.h
F: include/hw/*/axiado*.h
+F: tests/functional/aarch64/test_axiado_scm3003.py
+F: tests/functional/aarch64/test_ax3005_evb.py
F: docs/system/arm/axiado.rst
AVR Machines
diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch64/meson.build
index f0881bed16..3e3d918486 100644
--- a/tests/functional/aarch64/meson.build
+++ b/tests/functional/aarch64/meson.build
@@ -4,6 +4,8 @@ test_aarch64_timeouts = {
'aspeed_ast2700a1' : 600,
'aspeed_ast2700a2' : 600,
'aspeed_ast2700fc' : 600,
+ 'ax3005_evb' : 180,
+ 'axiado_scm3003' : 240,
'device_passthrough' : 720,
'imx8mm_evk' : 240,
'imx8mp_evk' : 240,
@@ -33,6 +35,8 @@ tests_aarch64_system_thorough = [
'aspeed_ast2700a1',
'aspeed_ast2700a2',
'aspeed_ast2700fc',
+ 'ax3005_evb',
+ 'axiado_scm3003',
'device_passthrough',
'hotplug_pci',
'imx8mm_evk',
diff --git a/tests/functional/aarch64/test_ax3005_evb.py b/tests/functional/aarch64/test_ax3005_evb.py
new file mode 100755
index 0000000000..5ca75b1599
--- /dev/null
+++ b/tests/functional/aarch64/test_ax3005_evb.py
@@ -0,0 +1,140 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots an OpenBMC image on the Axiado AX3005 EVB
+#
+# Author: Kuan-Jui Chiu <kchiu@axiado.com>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import LinuxKernelTest, Asset, wait_for_console_pattern
+
+
+class Ax3005EvbMachine(LinuxKernelTest):
+
+ ASSET_SDK_IMAGES = Asset(
+ ('https://github.com/axiado/openbmc/releases/download/v0.1.0/'
+ 'evk-ax3005-qemu.tar.gz'),
+ 'e07e89151981fb4730223dfe399a7111a0367e3c4122e21d65ef4aa8a2ba04c7')
+
+ ATF_BASE = 0x88300000
+ OPTEE_BASE = 0x88400000
+ UBOOT_BASE = 0x80000000
+ FIT_BASE = 0x80100000
+ RAMROFS_BASE = 0x80B00000
+ RAMROFS_SIZE = 0x6400000
+
+ def setUp(self):
+ super().setUp()
+
+ sdk_image_dir = 'evk-ax3005-qemu'
+
+ self.archive_extract(self.ASSET_SDK_IMAGES)
+ self.atf_path = self.scratch_file(sdk_image_dir,
+ 'trusted-firmware-a/bl31.bin')
+ self.optee_path = self.scratch_file(sdk_image_dir, 'optee/tee-raw.bin')
+ self.uboot_path = self.scratch_file(sdk_image_dir, 'u-boot.bin')
+ self.fit_path = self.scratch_file(sdk_image_dir, 'fitImage')
+ self.kernel_path = self.scratch_file(sdk_image_dir, 'Image')
+ self.dtb_path = self.scratch_file(sdk_image_dir, 'ax3005-evb-qemu.dtb')
+ self.initrd_path = self.scratch_file(
+ sdk_image_dir, 'obmc-phosphor-initramfs-evk-ax3005-qemu.cpio.xz')
+ self.rofs_path = self.scratch_file(
+ sdk_image_dir, 'obmc-phosphor-image-evk-ax3005-qemu.squashfs-xz')
+ self.disk_path = self.scratch_file(
+ sdk_image_dir, 'obmc-phosphor-image-evk-ax3005-qemu.wic.qcow2')
+
+ def test_aarch64_ax3005_evb_boot(self):
+ self.require_accelerator('tcg')
+ self.set_machine('ax3005-evb')
+
+ ramrofs_base = 0x90000000
+
+ # The SoC has nine Cadence UARTs; the console is the fourth one.
+ self.vm.set_console(console_index=3)
+ self.vm.add_args(
+ '-kernel', self.kernel_path,
+ '-dtb', self.dtb_path,
+ '-initrd', self.initrd_path,
+ '-device', 'loader,file=%s,addr=0x%x' % (self.rofs_path,
+ ramrofs_base),
+ '-drive', 'file=%s,if=sd,format=qcow2,snapshot=on' % self.disk_path,
+ '-append', 'console=ttyPS3,115200 earlycon nr_cpus=1 '
+ 'root=/dev/ram rw '
+ 'phram.phram=ramrofs,0x%x,0x%x' % (ramrofs_base,
+ self.RAMROFS_SIZE))
+
+ self.vm.launch()
+
+ self.wait_for_console_pattern('Linux version')
+ self.wait_for_console_pattern('Machine model: Axiado AX3005 EVB QEMU')
+
+ # The reservation comes from the board's modify_dtb() hook, not from
+ # the supplied DTB, which still carries the old address.
+ self.wait_for_console_pattern(
+ 'OF: reserved mem: 0x0000000090000000..0x00000000963fffff')
+
+ # phram claims the reserved window and exposes it as an MTD device.
+ wait_for_console_pattern(
+ self, 'phram: ramrofs device: 0x6400000 at 0x90000000',
+ failure_message='phram: Failed to register new device')
+
+ self.wait_for_console_pattern('Run /init as init process')
+
+ # The initramfs prints this after probing the SD card for the rwfs.
+ self.wait_for_console_pattern('blkdev: /dev/mmcblk0 sector_size: 512')
+
+ # Reaching systemd proves the initramfs mounted the squashfs out of
+ # the phram window and switch_root'ed into it.
+ self.wait_for_console_pattern('Hostname set to <evk-ax3005-qemu>')
+
+ def test_aarch64_ax3005_evb_tzboot(self):
+ self.require_accelerator('tcg')
+ self.set_machine('ax3005-evb')
+
+ # The SoC has nine Cadence UARTs; the console is the fourth one.
+ self.vm.set_console(console_index=3)
+ self.vm.add_args(
+ '-device', 'loader,file=%s,addr=0x%x' % (self.atf_path,
+ self.ATF_BASE),
+ '-device', 'loader,file=%s,addr=0x%x' % (self.optee_path,
+ self.OPTEE_BASE),
+ '-device', 'loader,file=%s,addr=0x%x' % (self.uboot_path,
+ self.UBOOT_BASE),
+ '-device', 'loader,file=%s,addr=0x%x' % (self.fit_path,
+ self.FIT_BASE),
+ '-device', 'loader,file=%s,addr=0x%x' % (self.rofs_path,
+ self.RAMROFS_BASE),
+ '-device', 'loader,cpu-num=0,addr=0x%x' % self.ATF_BASE,
+ '-device', 'loader,cpu-num=1,addr=0x%x' % self.ATF_BASE,
+ '-device', 'loader,cpu-num=2,addr=0x%x' % self.ATF_BASE,
+ '-device', 'loader,cpu-num=3,addr=0x%x' % self.ATF_BASE,
+ '-drive', 'file=%s,if=sd,format=qcow2,snapshot=on' % self.disk_path)
+
+ self.vm.launch()
+
+ self.wait_for_console_pattern('BL31: Initializing BL32')
+ self.wait_for_console_pattern('OP-TEE version:')
+ self.wait_for_console_pattern('Primary CPU switching to normal world')
+
+ self.wait_for_console_pattern('U-Boot 2026.04')
+ self.wait_for_console_pattern('Starting kernel')
+
+ self.wait_for_console_pattern('Linux version')
+ self.wait_for_console_pattern('Machine model: Axiado AX3005 EVB QEMU')
+
+ # phram claims the reserved window and exposes it as an MTD device.
+ wait_for_console_pattern(
+ self, 'phram: ramrofs device: 0x6400000 at 0x80b00000',
+ failure_message='phram: Failed to register new device')
+
+ self.wait_for_console_pattern('Run /init as init process')
+
+ # The initramfs prints this after probing the SD card for the rwfs.
+ self.wait_for_console_pattern('blkdev: /dev/mmcblk0 sector_size: 512')
+
+ # Reaching systemd proves the initramfs mounted the squashfs out of
+ # the phram window and switch_root'ed into it.
+ self.wait_for_console_pattern('Hostname set to <evk-ax3005-qemu>')
+
+if __name__ == '__main__':
+ LinuxKernelTest.main()
diff --git a/tests/functional/aarch64/test_axiado_scm3003.py b/tests/functional/aarch64/test_axiado_scm3003.py
new file mode 100755
index 0000000000..4d80931b4d
--- /dev/null
+++ b/tests/functional/aarch64/test_axiado_scm3003.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots an OpenBMC image on the Axiado SCM3003 EVK
+#
+# Author: Kuan-Jui Chiu <kchiu@axiado.com>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import LinuxKernelTest, Asset, wait_for_console_pattern
+
+
+class AxiadoScm3003Machine(LinuxKernelTest):
+
+ ASSET_SDK_IMAGES = Asset(
+ ('https://github.com/axiado/openbmc/releases/download/v0.1.0/'
+ 'evk-axiado-qemu.tar.gz'),
+ 'a163b78ed07a43e08323395e2df63c213fbc98b8bc412083a11e94564e26548b')
+
+ def setUp(self):
+ super().setUp()
+
+ sdk_image_dir = 'evk-axiado-qemu'
+
+ self.archive_extract(self.ASSET_SDK_IMAGES)
+ self.kernel_path = self.scratch_file(sdk_image_dir, 'Image')
+ self.dtb_path = self.scratch_file(sdk_image_dir,
+ 'ax3000-scm3003-qemu.dtb')
+ self.initrd_path = self.scratch_file(
+ sdk_image_dir, 'obmc-phosphor-initramfs-evk-axiado-qemu.cpio.xz')
+ self.disk_path = self.scratch_file(
+ sdk_image_dir, 'obmc-phosphor-image-evk-axiado-qemu.wic.qcow2')
+
+ def test_aarch64_axiado_scm3003_boot(self):
+ self.require_accelerator('tcg')
+ self.set_machine('axiado-scm3003')
+
+ # The SoC has four Cadence UARTs; the console is the fourth one.
+ self.vm.set_console(console_index=3)
+ self.vm.add_args(
+ '-kernel', self.kernel_path,
+ '-dtb', self.dtb_path,
+ '-initrd', self.initrd_path,
+ '-drive', 'file=%s,if=sd,format=qcow2,snapshot=on' % self.disk_path,
+ '-append', 'console=ttyPS3,115200 earlycon nr_cpus=1 '
+ 'rootwait root=PARTLABEL=rofs-a')
+
+ self.vm.launch()
+
+ self.wait_for_console_pattern('Linux version')
+ self.wait_for_console_pattern('Machine model: Axiado AX3000-SCM3003')
+
+ self.wait_for_console_pattern('Run /init as init process')
+
+ # The initramfs prints this after probing the SD card for the rwfs.
+ self.wait_for_console_pattern('blkdev: /dev/mmcblk0 sector_size: 512')
+
+ # Reaching systemd proves the initramfs mounted the squashfs out of
+ # the phram window and switch_root'ed into it.
+ self.wait_for_console_pattern('Hostname set to <evk-axiado-qemu>')
+
+if __name__ == '__main__':
+ LinuxKernelTest.main()
--
2.34.1
prev parent reply other threads:[~2026-11-19 7:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 7:13 [PATCH v8 00/13] Add Axiado SoC AX3005 and EVB Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 01/13] hw/char/cadence_uart: Reduce the size of MMIO to 0x80 Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 02/13] hw/char/cadence_uart: Add BXRS register definition Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 03/13] hw/arm/ax3000-soc: Enable BXRS support of CADENCE UART Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 04/13] hw/arm: Rename ax3000-boards as axiado-boards Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 05/13] hw/arm/ax3000: Specify SoC name in header and variable Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 06/13] hw/arm/ax3000-boards: Add memory guard Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 07/13] hw/arm/ax3000-boards: Add modify_dtb for discontiguous memory Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 08/13] hw/arm/ax3000-boards: Remove redundant pointer from struct Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 09/13] hw/arm/ax3000-soc: Revise variables accodring to QEMU idioms Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 10/13] hw/arm: Add Axiado SoC AX3005 Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 11/13] hw/arm: Add Axiado Ax3005 EVB Kuan-Jui Chiu
2026-11-19 7:13 ` [PATCH v8 12/13] docs/system/arm: Document Axiado boards Kuan-Jui Chiu
2026-11-19 7:13 ` Kuan-Jui Chiu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119071355.3520249-14-kchiu@axiado.com \
--to=kchiu@axiado.com \
--cc=163wangjack@gmail.com \
--cc=mark.caveayland@nutanix.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.