[yocto] [meta-rockchip][PATCH] u-boot-rockchip: fix for binutils-2.28

Trevor Woerner twoerner at gmail.com
Wed Mar 8 09:31:47 PST 2017


openembedded-core updated bintuils from 2.27 to 2.28 which causes u-boot to
fail to compile:

	arm-oe-linux-gnueabi-ld.bfd: u-boot: Not enough room for program headers, try linking with -N

Building with -N does fix the issue, so this patch simply adds that flag to
the build so it succeeds.

This has been build-tested, as well as run-tested on the firefly.

Signed-off-by: Trevor Woerner <twoerner at gmail.com>
---
 recipes-bsp/u-boot/files/binutils-2.28-ld-fix.patch | 13 +++++++++++++
 recipes-bsp/u-boot/u-boot-rockchip_git.bb           |  5 ++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/u-boot/files/binutils-2.28-ld-fix.patch

diff --git a/recipes-bsp/u-boot/files/binutils-2.28-ld-fix.patch b/recipes-bsp/u-boot/files/binutils-2.28-ld-fix.patch
new file mode 100644
index 0000000..9dfc463
--- /dev/null
+++ b/recipes-bsp/u-boot/files/binutils-2.28-ld-fix.patch
@@ -0,0 +1,13 @@
+Index: git/arch/arm/config.mk
+===================================================================
+--- git.orig/arch/arm/config.mk
++++ git/arch/arm/config.mk
+@@ -89,7 +89,7 @@ PLATFORM_LIBS := arch/arm/lib/eabi_compa
+ endif
+ 
+ # needed for relocation
+-LDFLAGS_u-boot += -pie
++LDFLAGS_u-boot += -N -pie
+ 
+ #
+ # FIXME: binutils versions < 2.22 have a bug in the assembler where
diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
index 3b4f109..4887d5d 100644
--- a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
+++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
@@ -9,7 +9,10 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 COMPATIBLE_MACHINE = "(firefly-rk3288)"
 
-SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
+SRC_URI = " \
+	git://github.com/rockchip-linux/u-boot.git;branch=release; \
+	file://binutils-2.28-ld-fix.patch \
+	"
 SRCREV = "${AUTOREV}"
 S = "${WORKDIR}/git"
 
-- 
2.12.0.rc1.48.g076c053




More information about the yocto mailing list