From: "Alex Bennée" <alex.bennee@linaro.org>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bin.meng@processmission.com>,
QEMU <qemu-devel@nongnu.org>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org
Subject: Re: [PATCH 32/33] tests/functional/aarch64: Add Phytium Pi boot tests
Date: Fri, 04 Sep 2026 15:23:53 +0100 [thread overview]
Message-ID: <87mrtxp01y.fsf@draig.linaro.org> (raw)
In-Reply-To: <CAEUhbmXDFwhJrdh6w3f9pwG29W_6-ixxNiR3-jRo+4KuEHGO+g@mail.gmail.com> (Bin Meng's message of "Fri, 4 Sep 2026 16:52:46 +0800")
Bin Meng <bmeng.cn@gmail.com> writes:
> Hi Alex,
>
> On Thu, Sep 3, 2026 at 10:38 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Bin Meng <bin.meng@processmission.com> writes:
>>
>> > The Phytium Pi machine supports both the board firmware flow from SD
>> > and direct Linux boot. Exercise both paths with an SDK image bundle so
>> > firmware handoff and kernel loading regressions are caught.
>> >
>> > Verify U-Boot, PBF relocation, the Linux handoff, and login for the
>> > firmware path. The Linux test loads the bundled kernel, DTB, and
>> > initramfs and waits for the same login prompt.
>> >
>> > Signed-off-by: Bin Meng <bin.meng@processmission.com>
>> > ---
>> >
>> > tests/functional/aarch64/meson.build | 2 +
>> > tests/functional/aarch64/test_phytium_pi.py | 77 +++++++++++++++++++++
>> > 2 files changed, 79 insertions(+)
>> > create mode 100644 tests/functional/aarch64/test_phytium_pi.py
>> >
>> > diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch64/meson.build
>> > index f0881bed16..71bf45e4ea 100644
>> > --- a/tests/functional/aarch64/meson.build
>> > +++ b/tests/functional/aarch64/meson.build
>> > @@ -7,6 +7,7 @@ test_aarch64_timeouts = {
>> > 'device_passthrough' : 720,
>> > 'imx8mm_evk' : 240,
>> > 'imx8mp_evk' : 240,
>> > + 'phytium_pi' : 600,
>> > 'raspi4' : 480,
>> > 'reverse_debug' : 180,
>> > 'rme_virt' : 1200,
>> > @@ -39,6 +40,7 @@ tests_aarch64_system_thorough = [
>> > 'imx8mp_evk',
>> > 'kvm',
>> > 'multiprocess',
>> > + 'phytium_pi',
>> > 'raspi3',
>> > 'raspi4',
>> > 'replay',
>> > diff --git a/tests/functional/aarch64/test_phytium_pi.py b/tests/functional/aarch64/test_phytium_pi.py
>> > new file mode 100644
>> > index 0000000000..4ae0392bdd
>> > --- /dev/null
>> > +++ b/tests/functional/aarch64/test_phytium_pi.py
>> > @@ -0,0 +1,77 @@
>> > +#!/usr/bin/env python3
>> > +#
>> > +# Functional tests for the Phytium Pi machine
>> > +#
>> > +# Copyright (c) 2026 Process Mission
>> > +#
>> > +# Author:
>> > +# Bin Meng <bin.meng@processmission.com>
>> > +#
>> > +# SPDX-License-Identifier: GPL-2.0-or-later
>> > +
>> > +from qemu_test import Asset, LinuxKernelTest
>> > +from qemu_test import skipBigDataTest, skipIfMissingCommands
>> > +
>> > +
>> > +class PhytiumPiMachine(LinuxKernelTest):
>> > +
>> > + ASSET_BUILDROOT = Asset(
>> > + ('https://github.com/processmission/qemu-machine-images/releases/'
>> > + 'download/v1.0.0/aarch64-phytium-pi-v1.0.0.tar.zst'),
>> > +
>> > '5219d52b862e1245b12f79ba72e9a6144f5e0cf1a50061f8fda2db0aeeb92428')
>>
>> Nice ;-)
>>
>> I've been looking into something similar to make it easy to set up
>> github projects that can build and host test assets:
>>
>> https://github.com/stsquad/buildroot-asset
>
> This is actually very close to what I have been doing with
> https://github.com/processmission/qemu-machine-images. It is intended
> to be a common repository for QEMU machine test assets.
>
> Each machine has a small description under:
>
> machine/<architecture>/<machine>/
>
> It selects the independently built components, required images and
> machine-specific QEMU launcher. The container builders, packaging,
> checksums, release manifest and GitHub Actions workflow are shared.
> The workflow also distinguishes between the main repository and forks.
> A fork can build selected machines and upload run-scoped Actions
> artifacts without publishing a release. It can optionally publish its
> own development prerelease, while the main repository publishes
> frozen, versioned assets.
>
>>
>> although my builds seem to take quite a bit longer that yours.
>
> Yeah, as I only built the minimal busybox-based buildroot
> configuration, which is enough for QEMU boot testing :)
>
>>
>> I wonder if there is a way to have a common repository set up but in a
>> way that the forks can just build their own images. Either that or a
>> core repository which everyone just forks adds their device and merges.
>
> So perhaps qemu-machine-images could serve as a starting point for the
> common repository you describe. I would be happy to accept machine
> definitions from other contributors and make the add-a-machine
> workflow simpler.
>
> Your buildroot-asset project also has useful ideas, particularly
> including enough Buildroot configuration and source metadata to
> reproduce an image manually. It would be good to align the two efforts
> instead of growing separate repositories for each maintainer or board.
I agree.
Let me see if I can port my vkmark test image to your repo and add the
metadata export to the image type.
>
>>
>> Anyway, test looks sane:
>>
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> Thanks for the review!
>
>>
>> > +
>> > + def _prepare_images(self):
>> > + self.set_machine('phytium-pi')
>> > +
>> > + archive_path = self.uncompress(
>> > + self.ASSET_BUILDROOT,
>> > + target='aarch64-phytium-pi-v1.0.0.tar',
>> > + format='zstd')
>> > + self.archive_extract(archive_path, format='tar')
>> > +
>> > + self.vm.set_console(console_index=1)
>> > + self.vm.add_args('-smp', '4',
>> > + '-m', '4G',
>> > + '-display', 'none',
>> > + '-nic', 'none',
>> > + '-no-reboot')
>> > +
>> > + @skipIfMissingCommands('zstd')
>> > + @skipBigDataTest()
>> > + def test_firmware_boot(self):
>> > + self._prepare_images()
>> > + sdcard = self.scratch_file('images', 'sdcard.img')
>> > +
>> > + self.vm.add_args(
>> > + '-snapshot',
>> > + '-drive', f'file={sdcard},format=raw,if=sd,index=0')
>> > + self.vm.launch()
>> > +
>> > + self.wait_for_console_pattern('U-Boot 2022.01')
>> > + self.wait_for_console_pattern('PBF relocate done')
>> > + self.wait_for_console_pattern('Starting kernel ...')
>> > + self.wait_for_console_pattern('Phytium login:')
>> > +
>> > + @skipIfMissingCommands('zstd')
>> > + @skipBigDataTest()
>> > + def test_linux_boot(self):
>> > + self._prepare_images()
>> > + kernel = self.scratch_file('images', 'Image.gz')
>> > + dtb = self.scratch_file('images', 'phytiumpi_firefly.dtb')
>> > + initrd = self.scratch_file('images', 'rootfs.cpio.gz')
>> > +
>> > + self.vm.add_args(
>> > + '-kernel', kernel,
>> > + '-dtb', dtb,
>> > + '-initrd', initrd,
>> > + '-append', 'console=ttyAMA1,115200 '
>> > + 'earlycon=pl011,mmio32,0x2800d000 rdinit=/init')
>> > + self.vm.launch()
>> > +
>> > + self.wait_for_console_pattern('Booting Linux on physical CPU')
>> > + self.wait_for_console_pattern('Machine model: Phytium Pi Board')
>> > + self.wait_for_console_pattern('Phytium login:')
>> > +
>> > +
>> > +if __name__ == '__main__':
>> > + LinuxKernelTest.main()
>>
>> --
>
> Regards,
> Bin
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
prev parent reply other threads:[~2026-09-04 14:24 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 11:24 [PATCH 00/33] hw/arm: Add Phytium E2000Q SoC and board support Bin Meng
2026-09-03 11:24 ` [PATCH 01/33] target/arm: Add Phytium FTC310 and FTC664 CPU models Bin Meng
2026-09-03 14:45 ` Alex Bennée
2026-09-05 3:39 ` Bin Meng
2026-09-03 11:24 ` [PATCH 02/33] hw/arm: Add basic Phytium Pi machine Bin Meng
2026-09-03 16:56 ` Philippe Mathieu-Daudé
2026-09-04 7:57 ` Bin Meng
2026-09-04 10:15 ` Philippe Mathieu-Daudé
2026-09-04 10:25 ` Daniel P. Berrangé
2026-09-04 10:28 ` Peter Maydell
2026-09-04 10:36 ` Daniel P. Berrangé
2026-09-04 10:47 ` Peter Maydell
2026-09-04 11:24 ` Philippe Mathieu-Daudé
2026-09-04 11:40 ` Daniel P. Berrangé
2026-09-04 10:25 ` Peter Maydell
2026-09-03 11:24 ` [PATCH 03/33] hw/arm: phytium: Add Phytium E2000 PCIe host Bin Meng
2026-09-03 11:24 ` [PATCH 05/33] hw/sd: Add Phytium E2000 MCI controller Bin Meng
2026-09-03 11:24 ` [PATCH 06/33] hw/arm: phytium: Connect Phytium E2000 MCI controllers Bin Meng
2026-09-03 11:24 ` [PATCH 08/33] hw/arm: phytium: Connect Phytium E2000 GEM controllers Bin Meng
2026-09-03 11:24 ` [PATCH 09/33] hw/misc: Add Phytium E2000 DDR status Bin Meng
2026-09-03 11:24 ` [PATCH 10/33] hw/arm: phytium: Connect the " Bin Meng
2026-09-03 11:24 ` [PATCH 11/33] hw/misc: Add Phytium E2000 MHU doorbell Bin Meng
2026-09-03 11:24 ` [PATCH 12/33] hw/arm: phytium: Connect the Phytium E2000 MHU Bin Meng
2026-09-03 11:24 ` [PATCH 13/33] hw/ssi: Add Phytium E2000 QSPI controller Bin Meng
2026-09-03 11:24 ` [PATCH 14/33] hw/arm: phytium: Connect the " Bin Meng
2026-09-03 11:24 ` [PATCH 15/33] hw/misc: Add Phytium E2000 PBR model Bin Meng
2026-09-03 11:24 ` [PATCH 16/33] hw/arm: phytium: Integrate the Phytium E2000 PBR Bin Meng
2026-09-03 11:24 ` [PATCH 17/33] hw/arm: phytium: Add Phytium E2000 control region placeholders Bin Meng
2026-09-03 11:24 ` [PATCH 18/33] hw/misc: Support Phytium E2000 SCMI CPU power control Bin Meng
2026-09-03 11:24 ` [PATCH 19/33] hw/arm: phytium: Select the Phytium E2000 PBR boot medium Bin Meng
2026-09-03 11:25 ` [PATCH 20/33] hw/arm: phytium: Connect the Phytium E2000 I2C controller Bin Meng
2026-09-03 11:25 ` [PATCH 21/33] hw/arm: phytium: Add Phytium E2000 xHCI controllers Bin Meng
2026-09-03 11:25 ` [PATCH 22/33] hw/misc: Model the Phytium E2000 random generator Bin Meng
2026-09-03 11:25 ` [PATCH 23/33] hw/arm: phytium: Connect " Bin Meng
2026-09-03 11:25 ` [PATCH 24/33] hw/arm: phytium: Support Phytium E2000 direct Linux boot Bin Meng
2026-09-03 11:25 ` [PATCH 25/33] hw/arm: phytium: Add Phytium E2000Q COMe machine Bin Meng
2026-09-03 11:25 ` [PATCH 27/33] hw/arm: phytium: Connect the Phytium E2000Q COMe QSPI flash Bin Meng
2026-09-03 11:25 ` [PATCH 28/33] hw/arm: phytium: Add Phytium E2000 AHCI controllers Bin Meng
2026-09-03 11:25 ` [PATCH 29/33] hw/arm: Add Phytium E2000 Linux SCMI channel Bin Meng
2026-09-03 11:25 ` [PATCH 30/33] hw/arm: phytium: Connect the Phytium E2000 SMMUv3 Bin Meng
2026-09-03 11:25 ` [PATCH 31/33] docs/system/arm: Document Phytium E2000 machines Bin Meng
2026-09-03 11:25 ` [PATCH 32/33] tests/functional/aarch64: Add Phytium Pi boot tests Bin Meng
2026-09-03 14:38 ` Alex Bennée
2026-09-04 8:52 ` Bin Meng
2026-09-04 14:23 ` Alex Bennée [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=87mrtxp01y.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=bin.meng@processmission.com \
--cc=bmeng.cn@gmail.com \
--cc=peter.maydell@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox