LNX_KRNL_IMG_TEXT_OFFSET_BASE has no default of its own, so enabling
LINUX_KERNEL_IMAGE_HEADER on a MediaTek board leaves it empty and the
link fails. mmp, rockchip and apple default it to TEXT_BASE, which
gives a zero text_offset; do the same here. A board whose stock loader
places the image at a fixed offset above its base sets the value in its
defconfig instead. Found while chainloading U-Boot from the stock loader
of the Keenetic KN-1012.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
---
 arch/arm/mach-mediatek/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index 5e6c50ca64..8e10e8c820 100644
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
@@ -215,4 +215,7 @@ config MTK_TZ_MOVABLE
        select OF_SYSTEM_SETUP
        bool
 
+config LNX_KRNL_IMG_TEXT_OFFSET_BASE
+       default TEXT_BASE
+
 endif
-- 
2.53.0

Reply via email to