Fix binman_sym functionality on RISC-V port
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 2 repliesIn review
- v12 patches 8 repliesSuperseded
Changed from v2 from the cover letter
- Drop the patch which disables SPL_BINMAN_UBOOT_SYMBOLS by default on RISC-V
- Add patch to correct entry type of proper U-Boot in default binman configuration for RISC-V
- Add patch to prevent binman from relocating SPL of VisionFive 2
- Fix typo (one missing underscore) in linkerscript and collect Simon's r-b tag.
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | riscv: dts: binman.dtsi: Switch to u-boot-nodtb entry for proper U-Bootarch/ | +1 | 2 replies | |
| 2/3 | riscv: dts: starfive: Prevent binman from relocating symbols in SPLarch/ | +1 | 0 replies | |
| 3/3 | riscv: Provide __image_copy_{start_end} symbols in linkerscriptarch/ arch/ | +5 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] Fix binman_sym functionality on RISC-V port
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 contains three main changes,
1. Correct the entry type used for proper U-Boot, ensuring binman could find it, which is mandatory since SPL_BINMAN_UBOOT_SYMBOLS defaults to Y on RISC-V
2. Mark the SPL image of StarFive VisionFive2 as "no-write-symbols", since the SPL and proper U-Boot are split into two images.
3. Finally provide __image_copy{start,end} in RISC-V linkerscripts of both SPL and proper U-Boot, fixing functionality of binman_sym
I've tested building with
- ae350_rv64_defconfig
- ae350_rv64_spl_defconfig
- bananapi-f3_defconfig
- k230_canmv_defconfig
- microchip_mpfs_icicle_defconfig
- milkv_duo_defconfig
and booting successfully on
- qemu-riscv64_smode_defconfig
- qemu-riscv64_defconfig
- sifive_unleashed_defconfig
- starfive_visionfive2_defconfig
with either real hardware or QEMU.
Thank you Jonas Karlman for pointing out the root cause of binman failures with SPL_BINMAN_UBOOT_SYMBOLS enabled. I'm looking forward to further reviews.
Changed from v2
- Drop the patch which disables SPL_BINMAN_UBOOT_SYMBOLS by default on RISC-V
- Add patch to correct entry type of proper U-Boot in default binman configuration for RISC-V
- Add patch to prevent binman from relocating SPL of VisionFive 2
- Fix typo (one missing underscore) in linkerscript and collect Simon's r-b tag.
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/
Yao Zi (3):
riscv: dts: binman.dtsi: Switch to u-boot-nodtb entry for proper
U-Boot
riscv: dts: starfive: Prevent binman from relocating symbols in SPL
riscv: Provide __image_copy_{start_end} symbols in linkerscript
arch/riscv/cpu/u-boot-spl.lds | 2 ++ arch/riscv/cpu/u-boot.lds | 3 +++ arch/riscv/dts/binman.dtsi | 2 +- arch/riscv/dts/starfive-visionfive2-binman.dtsi | 1 + 4 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.49.0