diff mbox series

[v2,7/8] spl: binman: Disable u_boot_any symbols for i.MX8M boards

Message ID 20220618121316.12061-8-alpernebiyasak@gmail.com
State Accepted
Commit 6516c9b349b3272c6c9cb7a4bdcfdef617d9f4ee
Delegated to: Simon Glass
Headers show
Series spl: binman: Fixes for BINMAN_SYMBOLS | expand

Commit Message

Alper Nebi Yasak June 18, 2022, 12:13 p.m. UTC
The i.MX8M boards use partially specified binman images which have an
SPL entry without a U-Boot entry. This would normally cause an error due
to the 'u_boot_any' binman symbols declared by BINMAN_UBOOT_SYMBOLS
requiring a U-Boot-like entry in the same image as the SPL.

However, a problem in the ARMv8 __image_copy_start symbol definition
effectively disables binman from attempting to write any symbols at all,
so everything appears to work fine until runtime. A future patch fixes
the issue in the linker scripts, which lets binman fill in the symbols,
which would result in the build error described above.

Explicitly disable the 'u_boot_any' symbols for i.MX8M boards. They are
already effectively unusable, and they are incompatible with the boards'
current binman image descriptions.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---

Changes in v2:
- Add new patch to disable u_boot_any symbols for i.MX8M boards

 common/spl/Kconfig     | 1 +
 common/spl/Kconfig.tpl | 1 +
 common/spl/Kconfig.vpl | 1 +
 3 files changed, 3 insertions(+)

Comments

Simon Glass June 28, 2022, 1:37 p.m. UTC | #1
The i.MX8M boards use partially specified binman images which have an
SPL entry without a U-Boot entry. This would normally cause an error due
to the 'u_boot_any' binman symbols declared by BINMAN_UBOOT_SYMBOLS
requiring a U-Boot-like entry in the same image as the SPL.

However, a problem in the ARMv8 __image_copy_start symbol definition
effectively disables binman from attempting to write any symbols at all,
so everything appears to work fine until runtime. A future patch fixes
the issue in the linker scripts, which lets binman fill in the symbols,
which would result in the build error described above.

Explicitly disable the 'u_boot_any' symbols for i.MX8M boards. They are
already effectively unusable, and they are incompatible with the boards'
current binman image descriptions.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---

Changes in v2:
- Add new patch to disable u_boot_any symbols for i.MX8M boards

 common/spl/Kconfig     | 1 +
 common/spl/Kconfig.tpl | 1 +
 common/spl/Kconfig.vpl | 1 +
 3 files changed, 3 insertions(+)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 46d9be73bb1f..152569ee4350 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -200,6 +200,7 @@  config SPL_BINMAN_SYMBOLS
 config SPL_BINMAN_UBOOT_SYMBOLS
 	bool "Declare binman symbols for U-Boot phases in SPL"
 	depends on SPL_BINMAN_SYMBOLS
+	default n if ARCH_IMX8M
 	default y
 	help
 	  This enables use of symbols in SPL which refer to U-Boot phases,
diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl
index 8c59c767302f..e314b793a2e9 100644
--- a/common/spl/Kconfig.tpl
+++ b/common/spl/Kconfig.tpl
@@ -23,6 +23,7 @@  config TPL_BINMAN_SYMBOLS
 config TPL_BINMAN_UBOOT_SYMBOLS
 	bool "Declare binman symbols for U-Boot phases in TPL"
 	depends on TPL_BINMAN_SYMBOLS
+	default n if ARCH_IMX8M
 	default y
 	help
 	  This enables use of symbols in TPL which refer to U-Boot phases,
diff --git a/common/spl/Kconfig.vpl b/common/spl/Kconfig.vpl
index daec0bb7bfff..ba4b2e4f99e9 100644
--- a/common/spl/Kconfig.vpl
+++ b/common/spl/Kconfig.vpl
@@ -213,6 +213,7 @@  config VPL_BINMAN_SYMBOLS
 config VPL_BINMAN_UBOOT_SYMBOLS
 	bool "Declare binman symbols for U-Boot phases in VPL"
 	depends on VPL_BINMAN_SYMBOLS
+	default n if ARCH_IMX8M
 	default y
 	help
 	  This enables use of symbols in VPL which refer to U-Boot phases,