Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] boot/opensbi: support building an out-of-tree platform
@ 2026-08-13 17:12 Richard Vodden
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Vodden @ 2026-08-13 17:12 UTC (permalink / raw)
  To: buildroot
  Cc: Leo Yu-Chi Liang, Alistair Francis, Mark Corbin,
	Angelo Compagnucci, Kanak Shilledar, Julien Olivain,
	Francois Dugast, Thomas Bonnefille, Richard Vodden, Romain Naour

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-13 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 17:12 [Buildroot] [PATCH 0/2] boot/opensbi: support building an out-of-tree platform Richard Vodden
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox