u-boot-misc
u-boot-misc copied to clipboard
readme.gxb: U-Boot requires a patch to compile
Hi @hexdump0815
You already know this but I'm posting this for others; postmarketOS had an issue where U-Boot <=2020.10 can't build successfully with the latest toolchain. Eventually I found that the following patch fixes it:
--- a/Makefile
+++ b/Makefile
@@ -970,6 +970,8 @@
# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
+LDFLAGS_u-boot += -z notext $(call ld-option, --apply-dynamic-relocs)
+
ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
endif
Maybe you could update your notes to work with newer U-Boot versions? Any of the U-Boot upstream defconfigs should work, or maybe add this patch to your notes?
Cheers.
I'm f_
BTW, in case you didn't recognise me :)
@Vitali64 - thanks a lot for this hint - i remeber of having read it, but i'll put it to my todo list to put it into the corresponding readme's ... it might take a bit until i'm getting to it