From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Alistair Francis <Alistair.Francis@wdc.com>
Cc: "marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"farosas@suse.de" <farosas@suse.de>,
"pierrick.bouvier@oss.qualcomm.com"
<pierrick.bouvier@oss.qualcomm.com>,
"almer@dabbelt.com" <almer@dabbelt.com>,
"lvivier@redhat.com" <lvivier@redhat.com>,
"wxchen0913@gmail.com" <wxchen0913@gmail.com>,
"marscheng@google.com" <marscheng@google.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"daniel.barboza@oss.qualcomm.com"
<daniel.barboza@oss.qualcomm.com>,
"jserv@ccns.ncku.edu.tw" <jserv@ccns.ncku.edu.tw>,
"qemu-riscv@nongnu.org" <qemu-riscv@nongnu.org>,
"chao.liu@processmission.com" <chao.liu@processmission.com>,
"zhiwei_liu@linux.alibaba.com" <zhiwei_liu@linux.alibaba.com>,
"eleanor15x@gmail.com" <eleanor15x@gmail.com>,
"liwei1518@gmail.com" <liwei1518@gmail.com>
Subject: Re: [PATCH v4 6/7] tests/functional/riscv64: Add boot test for Milk-V Duo board
Date: Mon, 28 Sep 2026 02:32:05 +0800 [thread overview]
Message-ID: <arlhCzaJLNneiU3Q@google.com> (raw)
In-Reply-To: <66512e37ad227defe5d5512b2694ea0fe5f0a21a.camel@wdc.com>
On Fri, Sep 25, 2026 at 04:02:45AM +0000, Alistair Francis wrote:
> On Sat, 2026-08-22 at 19:43 +0000, Kuan-Wei Chiu wrote:
> > Add a functional boot test for the Milk-V Duo board to validate the
> > end-to-end boot flow.
> >
> > $ ./build/run ./tests/functional/riscv64/test_milkv_duo.py
> > TAP version 13
> > ok 1 test_milkv_duo.MilkvDuoMachine.test_riscv64_milkv_duo
> > 1..1
> >
> > Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> > ---
> > MAINTAINERS | 1 +
> > tests/functional/riscv64/meson.build | 1 +
> > tests/functional/riscv64/test_milkv_duo.py | 50
> > ++++++++++++++++++++++
> > 3 files changed, 52 insertions(+)
> > create mode 100755 tests/functional/riscv64/test_milkv_duo.py
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 245eb7bb58..3f79334c59 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1861,6 +1861,7 @@ F: hw/riscv/milkv_duo.c
> > F: include/hw/char/dw8250.h
> > F: include/hw/misc/cv1800b_clk.h
> > F: include/hw/riscv/cv1800b.h
> > +F: tests/functional/riscv64/test_milkv_duo.py
> > F: tests/qtest/milkv-duo-test.c
> >
> > RX Machines
> > diff --git a/tests/functional/riscv64/meson.build
> > b/tests/functional/riscv64/meson.build
> > index d1a3e6c2bf..8a4f1d00f9 100644
> > --- a/tests/functional/riscv64/meson.build
> > +++ b/tests/functional/riscv64/meson.build
> > @@ -18,4 +18,5 @@ tests_riscv64_system_thorough = [
> > 'sifive_u',
> > 'tt_atlantis',
> > 'tuxrun',
> > + 'milkv_duo',
> > ]
> > diff --git a/tests/functional/riscv64/test_milkv_duo.py
> > b/tests/functional/riscv64/test_milkv_duo.py
> > new file mode 100755
> > index 0000000000..aff247e61f
> > --- /dev/null
> > +++ b/tests/functional/riscv64/test_milkv_duo.py
> > @@ -0,0 +1,50 @@
> > +#!/usr/bin/env python3
> > +#
> > +# Functional test that boots a Linux kernel on a Milk-V Duo machine
> > +#
> > +# Copyright (c) 2026 Kuan-Wei Chiu <visitorckw@gmail.com>
> > +#
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +
> > +from qemu_test import LinuxKernelTest, Asset
> > +from qemu_test import wait_for_console_pattern
> > +
> > +class MilkvDuoMachine(LinuxKernelTest):
> > +
> > + timeout = 120
> > +
> > + ASSET_KERNEL = Asset(
> > +
> > 'https://github.com/visitorckw/milkv-duo-qemu-assets/releases/downloa
> > d/v1.0/Image',
> > +
> > '3f157ecfcb86d28bfcff9fd3c1a43f60a8513b1919739fdc9a4d946aba35b2af'
> > + )
> > + ASSET_DTB = Asset(
> > +
> > 'https://github.com/visitorckw/milkv-duo-qemu-assets/releases/downloa
> > d/v1.0/cv1800b-milkv-duo.dtb',
> > +
> > '2a5d165f64c4b2d55bba282b2974941ab223f6f5220c2e7721e35ab81311c098'
> > + )
> > + ASSET_ROOTFS = Asset(
> > +
> > 'https://github.com/visitorckw/milkv-duo-qemu-assets/releases/downloa
> > d/v1.0/rootfs.ext4',
> > +
> > '9e7de9222ab4a79d1291866453aa47cd67a543216df6159bf9b42d055240a676'
> > + )
>
> Is there a more official source we could use?
>
I initially tried booting the board using milk-v duo's buildroot SDK
release. It failed to boot probably because their downstream device
tree and kernel rely on many custom out oftree bindings that differ
from mainline Linux. This is why I originally hosted my own mainline
compiled images on my personal github.
However, I just experimented with switching to tuxboot assets similar
to how sifive_u is tested, and I can confirm that booting with the
tuxboot kernel, dtb, and rootfs works perfectly all the way to the
shell.
I'll update the test to fetch these assets from tuxboot.
Regards,
Kuan-Wei
next prev parent reply other threads:[~2026-09-27 18:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 19:43 [PATCH v4 0/7] hw/riscv: Add support for Milk-V Duo board Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 1/7] hw/char: Add dw8250 UART Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 2/7] hw/misc: Add Sophgo CV1800B clock controller Kuan-Wei Chiu
2026-09-25 3:58 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 3/7] hw/riscv: Add Sophgo CV1800B SoC support Kuan-Wei Chiu
2026-09-25 4:00 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 4/7] hw/riscv: Add Milk-V Duo board support Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 5/7] tests/qtest: Add qtest for Milk-V Duo board Kuan-Wei Chiu
2026-09-25 4:01 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 6/7] tests/functional/riscv64: Add boot test " Kuan-Wei Chiu
2026-09-25 4:02 ` Alistair Francis
2026-09-27 18:32 ` Kuan-Wei Chiu [this message]
2026-08-22 19:43 ` [PATCH v4 7/7] docs/system/riscv: Add Milk-V Duo board documentation Kuan-Wei Chiu
2026-09-25 4:04 ` Alistair Francis
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=arlhCzaJLNneiU3Q@google.com \
--to=visitorckw@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=almer@dabbelt.com \
--cc=chao.liu@processmission.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=eleanor15x@gmail.com \
--cc=farosas@suse.de \
--cc=jserv@ccns.ncku.edu.tw \
--cc=liwei1518@gmail.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marscheng@google.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=wxchen0913@gmail.com \
--cc=zhiwei_liu@linux.alibaba.com \
/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.