summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-01-12 12:15:05 -0800
committerKoen Kooi <koen@dominion.thruhere.net>2012-01-13 12:30:50 +0100
commitbc98f6f230dc8d3457e809b75f421ed732e21143 (patch)
tree138663841109e674cfb9f0440c2e700dd640576f /recipes-bsp/u-boot
parentd0076873ee3e66ee59a5a29a11e594fcef9d25ea (diff)
downloadmeta-ti-bc98f6f230dc8d3457e809b75f421ed732e21143.tar.gz
u-boot_2011.09, u-boot_2011.12: Always use gnu ld for LD
u-boot wants GNU ld and cant link with gold so when default linker is gold we make sure that it still uses good old GNU ld Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch43
-rw-r--r--recipes-bsp/u-boot/u-boot_2011.09.bb3
-rw-r--r--recipes-bsp/u-boot/u-boot_2011.12.bb3
3 files changed, 47 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
new file mode 100644
index 00000000..2564d1d4
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
@@ -0,0 +1,43 @@
1From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 21 Dec 2011 08:53:02 -0800
4Subject: [PATCH] config: Always use GNU ld
5
6This patch makes sure that we always use the GNU ld. u-boot uses certain
7construct e.g. OVERLAY which are not implemented in gold therefore it
8always needs GNU ld for linking. It works well if default linker in
9toolchain is GNU ld but in some cases we can have gold to be the
10default linker and also ship GNU ld but not as default in such cases
11its called $(PREFIX)ld.bfd, with this patch we make sure that if
12$(PREFIX)ld.bfd exists than we use that for our ld. This way it
13does not matter what the default ld is.
14
15Upstream-status: Pending
16
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 config.mk | 4 +++-
20 1 files changed, 3 insertions(+), 1 deletions(-)
21
22diff --git a/config.mk b/config.mk
23index ddaa477..59b3e71 100644
24--- a/config.mk
25+++ b/config.mk
26@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
27 $(if $(call cc-option-sys,$1),$1,$2)))
28 endif
29
30+exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
31+ then echo "$(1)"; else echo "$(2)"; fi; )
32 #
33 # Include the make variables (CC, etc...)
34 #
35 AS = $(CROSS_COMPILE)as
36-LD = $(CROSS_COMPILE)ld
37+LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
38 CC = $(CROSS_COMPILE)gcc
39 CPP = $(CC) -E
40 AR = $(CROSS_COMPILE)ar
41--
421.7.5.4
43
diff --git a/recipes-bsp/u-boot/u-boot_2011.09.bb b/recipes-bsp/u-boot/u-boot_2011.09.bb
index 74c8518f..4a9d3cb1 100644
--- a/recipes-bsp/u-boot/u-boot_2011.09.bb
+++ b/recipes-bsp/u-boot/u-boot_2011.09.bb
@@ -1,6 +1,6 @@
1require u-boot.inc 1require u-boot.inc
2 2
3PR = "r5" 3PR = "r6"
4 4
5# SPL build 5# SPL build
6UBOOT_BINARY = "u-boot.img" 6UBOOT_BINARY = "u-boot.img"
@@ -32,6 +32,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
32 file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \ 32 file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \
33 file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \ 33 file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \
34 file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \ 34 file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \
35 file://0001-config-Always-use-GNU-ld.patch \
35 file://fw_env.config \ 36 file://fw_env.config \
36 " 37 "
37 38
diff --git a/recipes-bsp/u-boot/u-boot_2011.12.bb b/recipes-bsp/u-boot/u-boot_2011.12.bb
index d776c38c..7554badc 100644
--- a/recipes-bsp/u-boot/u-boot_2011.12.bb
+++ b/recipes-bsp/u-boot/u-boot_2011.12.bb
@@ -6,7 +6,7 @@ UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
6UBOOT_SYMLINK = "u-boot-${MACHINE}.img" 6UBOOT_SYMLINK = "u-boot-${MACHINE}.img"
7 7
8PV = "2011.12" 8PV = "2011.12"
9PR = "r1" 9PR = "r2"
10 10
11# No patches for other machines yet 11# No patches for other machines yet
12COMPATIBLE_MACHINE = "(beagleboard|pandaboard|hawkboard|am3517-evm|am37x-evm|omap3evm)" 12COMPATIBLE_MACHINE = "(beagleboard|pandaboard|hawkboard|am3517-evm|am37x-evm|omap3evm)"
@@ -18,6 +18,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
18 file://2011.12/0004-omap4-common-mount-root-RO.patch \ 18 file://2011.12/0004-omap4-common-mount-root-RO.patch \
19 file://2011.12/0005-omap4-common-use-ext4-by-default.patch \ 19 file://2011.12/0005-omap4-common-use-ext4-by-default.patch \
20 file://2011.12/U-Boot-OMAP-MMC-Add-delay-before-waiting-for-status.patch \ 20 file://2011.12/U-Boot-OMAP-MMC-Add-delay-before-waiting-for-status.patch \
21 file://0001-config-Always-use-GNU-ld.patch \
21 " 22 "
22 23
23# v2011.12 tag 24# v2011.12 tag