summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-bsp/gnu-efi')
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb46
5 files changed, 203 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
new file mode 100644
index 000000000..0ce6d7b0c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
@@ -0,0 +1,21 @@
+don't break with old compilers and -DGNU_EFI_USE_MS_ABI
+It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current
+compiler doesn't support it, and gnu-efi should transparently fall back to
+using legacy techniques to set the calling convention. We don't get type
+checking, but at least it will still compile.
+
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Upstream-Status: Pending
+Index: gnu-efi-3.0.3/inc/x86_64/efibind.h
+===================================================================
+--- gnu-efi-3.0.3.orig/inc/x86_64/efibind.h
++++ gnu-efi-3.0.3/inc/x86_64/efibind.h
+@@ -25,8 +25,6 @@ Revision History
+ #if defined(GNU_EFI_USE_MS_ABI)
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+ #define HAVE_USE_MS_ABI 1
+- #else
+- #error Compiler is too old for GNU_EFI_USE_MS_ABI
+ #endif
+ #endif
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
new file mode 100644
index 000000000..ced128a31
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
@@ -0,0 +1,50 @@
+From 8a356d4b6a242ce63b73920d3ed33f88f9e12fe3 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Sun, 6 Sep 2015 05:20:43 -0400
+Subject: [PATCH] gnu-efi: Make setjmp.S portable to ARM
+
+This patch fixes the following error:
+
+ .../lib/arm/setjmp.S:18: Error: unrecognized symbol type ""
+ .../lib/arm/setjmp.S:26: Error: unrecognized symbol type ""
+
+The problem is the assembly syntax that is used is not portable to ARM,
+where the '@' symbol is a comment:
+
+ > Note on targets where the @ character is the start of a comment
+ > (eg ARM) then another character is used instead. For example the
+ > ARM port uses the % character.
+
+(From https://sourceware.org/binutils/docs-2.25/as/Section.html#Section)
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ lib/arm/setjmp.S | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/arm/setjmp.S b/lib/arm/setjmp.S
+index 6e3fbf0..85c8705 100644
+--- a/lib/arm/setjmp.S
++++ b/lib/arm/setjmp.S
+@@ -15,7 +15,7 @@ BASIS,
+ .text
+ .arm
+ .globl setjmp
+- .type setjmp, @function
++ .type setjmp, %function
+ setjmp:
+ mov r3, r13
+ stmia r0, {r3-r12,r14}
+@@ -23,6 +23,6 @@ setjmp:
+ bx lr
+
+ .globl longjmp
+- .type longjmp, @function
++ .type longjmp, %function
+ longjmp:
+ ldmia r0, {r3-r12,r14}
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch
new file mode 100644
index 000000000..1b2ae1ef0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch
@@ -0,0 +1,38 @@
+From 0daa354a16aa3cade56ed423d0f8a04cf1c22f9d Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 23 Apr 2015 01:49:31 -0700
+Subject: [PATCH] lib/Makefile: fix parallel issue
+
+Fixed:
+Assembler messages:
+Fatal error: can't create runtime/rtlock.o: No such file or directory
+Assembler messages:
+Fatal error: can't create runtime/rtdata.o: No such file or directory
+Assembler messages:
+Fatal error: can't create runtime/vm.o: No such file or directory
+Assembler messages:
+Fatal error: can't create runtime/efirtlib.o: No such file or directory
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index dc4b94a..f64d1ed 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -73,6 +73,8 @@ all: libsubdirs libefi.a
+ libsubdirs:
+ for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
+
++$(OBJS): libsubdirs
++
+ libefi.a: $(OBJS)
+ $(AR) rv $@ $(OBJS)
+
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
new file mode 100644
index 000000000..e5b47c197
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
@@ -0,0 +1,48 @@
+Fix parallel make failure for archives
+
+Upstream-Status: Pending
+
+The lib and gnuefi makefiles were using the lib.a() form which compiles
+and ar's as a pair instead of compiling all and then ar'ing which can
+parallelize better. This was resulting in build failures on larger values
+of -j.
+
+See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
+for details.
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+---
+---
+ gnuefi/Makefile | 3 ++-
+ lib/Makefile | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+Index: gnu-efi-3.0/lib/Makefile
+===================================================================
+--- gnu-efi-3.0.orig/lib/Makefile
++++ gnu-efi-3.0/lib/Makefile
+@@ -66,7 +66,8 @@ all: libsubdirs libefi.a
+ libsubdirs:
+ for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
+
+-libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
++libefi.a: $(OBJS)
++ $(AR) rv $@ $(OBJS)
+
+ clean:
+ rm -f libefi.a *~ $(OBJS) */*.o
+Index: gnu-efi-3.0/gnuefi/Makefile
+===================================================================
+--- gnu-efi-3.0.orig/gnuefi/Makefile
++++ gnu-efi-3.0/gnuefi/Makefile
+@@ -51,7 +51,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
+
+ all: $(TARGETS)
+
+-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
++libgnuefi.a: $(OBJS)
++ $(AR) rv $@ $(OBJS)
+
+ clean:
+ rm -f $(TARGETS) *~ *.o $(OBJS)
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
new file mode 100644
index 000000000..eca34599c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Libraries for producing EFI binaries"
+HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
+SECTION = "devel"
+LICENSE = "GPLv2+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=9;md5=2240d7bbdf0928294c2f4a68b14d6591 \
+ file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
+ file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
+ file://lib/arm/div64.S;beginline=6;endline=12;md5=a96c84f5ad12b4f011f98b5d039242f2 \
+ file://lib/arm/math.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/initplat.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/lib1funcs.S;beginline=9;endline=33;md5=f56d5ebbc87136bc66cfe24db82bcf01 \
+ file://lib/aarch64/math.c;beginline=9;endline=33;md5=cfade4c560e033a7bb02dab282872c7d \
+ file://lib/aarch64/initplat.c;beginline=9;endline=33;md5=900cb1ffbe3e1ded344102be921830f1 \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://parallel-make-archives.patch \
+ file://lib-Makefile-fix-parallel-issue.patch \
+ file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch \
+ file://gcc46-compatibility.patch \
+ "
+
+SRC_URI[md5sum] = "15a4bcbc18a9a5e8110ed955970622e6"
+SRC_URI[sha256sum] = "c530f21a15fd9c214dd92d29a6caa20fac989289267512020b6da1f5e6f5b4cb"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+
+def gnu_efi_arch(d):
+ import re
+ tarch = d.getVar("TARGET_ARCH", True)
+ if re.match("i[3456789]86", tarch):
+ return "ia32"
+ return tarch
+
+EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
+ 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
+ "
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+}
+
+FILES_${PN} += "${libdir}/*.lds"
+
+BBCLASSEXTEND = "native"
OpenPOWER on IntegriCloud