u-boot-misc icon indicating copy to clipboard operation
u-boot-misc copied to clipboard

readme.gxb: U-Boot requires a patch to compile

Open funderscore1 opened this issue 1 year ago • 2 comments

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.

funderscore1 avatar Jul 20 '23 20:07 funderscore1

I'm f_ BTW, in case you didn't recognise me :)

funderscore1 avatar Jul 20 '23 20:07 funderscore1

@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

hexdump0815 avatar Jul 21 '23 21:07 hexdump0815