From: Richard Vodden <richard@vodden.com>
To: buildroot@buildroot.org
Cc: Leo Yu-Chi Liang <ycliang@andestech.com>,
Alistair Francis <alistair@alistair23.me>,
Mark Corbin <mark@dibsco.co.uk>,
Angelo Compagnucci <angelo.compagnucci@gmail.com>,
Kanak Shilledar <kanakshilledar@gmail.com>,
Julien Olivain <ju.o@free.fr>,
Francois Dugast <francois.dugast.foss@gmail.com>,
Thomas Bonnefille <thomas.bonnefille@bootlin.com>,
Richard Vodden <richard@vodden.com>,
Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH 0/2] boot/opensbi: support building an out-of-tree platform
Date: Thu, 13 Aug 2026 17:12:07 +0000 [thread overview]
Message-ID: <20260813171215.3483906-1-richard@vodden.com> (raw)
OpenSBI can build a platform that lives outside its source tree via
PLATFORM_DIR. For a board whose platform is not upstream -- as is the case
for LiteX/VexRiscv -- that is considerably simpler than patching a platform
directory into the OpenSBI source or maintaining a custom tarball, and it
decouples the platform from the OpenSBI release so upstream can be tracked.
Patch 1 replaces the BR2_TARGET_OPENSBI_PLAT string with a choice of
reference platform, external platform, or no platform. Three existing
conditionals compared that symbol against the empty string; they are moved
to !BR2_TARGET_OPENSBI_PLAT_NONE, as leaving them referring to the removed
symbol would silently have disabled INSTALL_JUMP_IMG and INSTALL_DYNAMIC_IMG
and produced no firmware at all. The 13 in-tree defconfigs that set the old
symbol are converted, and a Config.in.legacy entry carries an existing value
over to the reference platform.
Patch 2 adds me to DEVELOPERS for boot/opensbi. It is separate so it can be
dropped or taken independently.
Tested:
- The external platform path is what builds OpenSBI 1.5.1, 1.6 and 1.9 for
a LiteX/VexRiscv rv32 target here; all three boot to a shell on hardware
(ALINX AX7035, xc7a35t).
- qemu_riscv64_virt_defconfig builds clean and installs its firmware from
build/platform/generic/firmware/, exercising the reference platform path.
The resulting fw_jump.bin boots under qemu-system-riscv64 to a login
prompt (OpenSBI v1.6, Linux 6.18.7).
- All 13 converted defconfigs generate a configuration and resolve
OPENSBI_PLAT=generic.
- An old-style configuration setting BR2_TARGET_OPENSBI_PLAT="generic"
converts to BR2_TARGET_OPENSBI_PLAT_REF with the name carried over, and
sets BR2_LEGACY as expected.
- check-package, check-symbol, check-DEVELOPERS and the checkpackagelib and
checksymbolslib unit tests all pass in Gitlab CI. The defconfig jobs could
not run there: they are tagged saas-linux-large-amd64, which is not
available to a free-tier fork.
Richard Vodden (2):
boot/opensbi: allow building against an external platform
DEVELOPERS: add Richard Vodden for boot/opensbi
Config.in.legacy | 18 ++++++++
DEVELOPERS | 3 ++
boot/opensbi/Config.in | 55 +++++++++++++++++++------
boot/opensbi/opensbi.mk | 16 +++++--
configs/andes_ae350_45_defconfig | 3 +-
configs/hifive_unleashed_defconfig | 3 +-
configs/hifive_unmatched_defconfig | 3 +-
configs/nezha_defconfig | 3 +-
configs/pine64_star64_defconfig | 3 +-
configs/qemu_riscv32_virt_defconfig | 3 +-
configs/qemu_riscv64_virt_defconfig | 3 +-
configs/sipeed_lichee_rv_defconfig | 3 +-
configs/sipeed_lichee_rv_dock_defconfig | 3 +-
configs/sipeed_licheepi_4a_defconfig | 3 +-
configs/spike_riscv32_defconfig | 3 +-
configs/spike_riscv64_defconfig | 3 +-
configs/visionfive2_defconfig | 3 +-
17 files changed, 103 insertions(+), 28 deletions(-)
base-commit: 0e94f8d4de7b5421d5c0d21e22122a444c632770
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-08-13 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 17:12 Richard Vodden [this message]
2026-08-13 17:12 ` [Buildroot] [PATCH 1/2] boot/opensbi: allow building against an external platform Richard Vodden
2026-08-13 17:12 ` [Buildroot] [PATCH 2/2] DEVELOPERS: add Richard Vodden for boot/opensbi Richard Vodden
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=20260813171215.3483906-1-richard@vodden.com \
--to=richard@vodden.com \
--cc=alistair@alistair23.me \
--cc=angelo.compagnucci@gmail.com \
--cc=buildroot@buildroot.org \
--cc=francois.dugast.foss@gmail.com \
--cc=ju.o@free.fr \
--cc=kanakshilledar@gmail.com \
--cc=mark@dibsco.co.uk \
--cc=romain.naour@gmail.com \
--cc=thomas.bonnefille@bootlin.com \
--cc=ycliang@andestech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox