U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix binman_sym functionality on RISC-V port
@ 2025-04-07  3:37 Yao Zi
  2025-04-07  3:37 ` [PATCH 1/2] spl: riscv: Disable SPL_BINMAN_UBOOT_SYMBOLS by default Yao Zi
  2025-04-07  3:37 ` [PATCH 2/2] riscv: Provide __image_copy_{start_end} symbols in linkerscript Yao Zi
  0 siblings, 2 replies; 11+ messages in thread
From: Yao Zi @ 2025-04-07  3:37 UTC (permalink / raw)
  To: Rick Chen, Leo, Tom Rini, Chia-Wei Wang, Oliver Gaskell,
	Nathan Barrett-Morrison, Greg Malysa, Trevor Woerner, Peng Fan,
	Marek Vasut, Paul Kocialkowski, Jerome Forissier, Simon Glass,
	Lukas Funke, u-boot
  Cc: Yao Zi

It's found that BINMAN_SYMBOLS_OK always evaluates to false on RISC-V,
because our linkerscripts don't define symbol __image_copy_start, on
which binman depends for determining the base address of an entry.
Binman simply bails out in case of missing the symbol.

This series first defaults SPL_BINMAN_UBOOT_SYMBOLS to N on RISC-V to
prevent binman from looking for a plain proper U-Boot image, which
isn't desired since binman configuration on RISC-V wraps proper U-Boot
in a FIT image. Then we define __image_copy_start and the paired
__image_copy_end to really fix binman_sym's functionality.

I've tested building with
  - ae350_rv64_defconfig
  - ae350_rv64_spl_defconfig
  - bananapi-f3_defconfig
  - k230_canmv_defconfig
  - microchip_mpfs_icicle_defconfig

and booting successfully on
  - milkv_duo_defconfig
  - qemu-riscv64_smode_defconfig
  - qemu-riscv64_defconfig
  - sifive_unleashed_defconfig
  - starfive_visionfive2_defconfig
with either real hardware or QEMU.

Thanks for your time and review.

Yao Zi (2):
  spl: riscv: Disable SPL_BINMAN_UBOOT_SYMBOLS by default
  riscv: Provide __image_copy_{start_end} symbols in linkerscript

 arch/riscv/cpu/u-boot-spl.lds | 2 ++
 arch/riscv/cpu/u-boot.lds     | 3 +++
 common/spl/Kconfig            | 2 ++
 3 files changed, 7 insertions(+)

-- 
2.49.0


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

end of thread, other threads:[~2025-04-09 13:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  3:37 [PATCH 0/2] Fix binman_sym functionality on RISC-V port Yao Zi
2025-04-07  3:37 ` [PATCH 1/2] spl: riscv: Disable SPL_BINMAN_UBOOT_SYMBOLS by default Yao Zi
2025-04-07 10:50   ` Simon Glass
2025-04-08 16:21     ` Yao Zi
2025-04-07 11:22   ` Jonas Karlman
2025-04-09  4:27     ` Yao Zi
2025-04-07  3:37 ` [PATCH 2/2] riscv: Provide __image_copy_{start_end} symbols in linkerscript Yao Zi
2025-04-07 10:49   ` Simon Glass
2025-04-07 11:10   ` Jonas Karlman
2025-04-08  9:32     ` Yao Zi
2025-04-09 13:22       ` Simon Glass

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