aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2016-03-23 10:15:36 +0100
committerKoen Kooi <koen.kooi@linaro.org>2016-03-23 10:15:36 +0100
commit10726898d5cecb3bcbeec24170215db1c47dbb53 (patch)
tree60a93ea856ffe7643c7ce92f45186aa113f0bd1a
parent5bcc7ed7c72f0c035ef278f3ceddaa54090989ae (diff)
efivar,efibootmgr: overlay for build fixes
Change-Id: I73d2df96f9eca320b21d2b98f6971b573f248aa9 Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-rw-r--r--meta-linaro-integration/recipes-overlayed/efibootmgr/efibootmgr_0.12.bb29
-rw-r--r--meta-linaro-integration/recipes-overlayed/efivar/efivar/0001-efivar-fix-for-cross-compile.patch31
-rw-r--r--meta-linaro-integration/recipes-overlayed/efivar/efivar/0002-disable-static-build.patch29
-rw-r--r--meta-linaro-integration/recipes-overlayed/efivar/efivar_0.23.bb38
4 files changed, 127 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/efibootmgr/efibootmgr_0.12.bb b/meta-linaro-integration/recipes-overlayed/efibootmgr/efibootmgr_0.12.bb
new file mode 100644
index 00000000..d80c89fe
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/efibootmgr/efibootmgr_0.12.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager."
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhinstaller/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "pciutils zlib efivar"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRCREV = "eb6e36c9064eae256cd60df24a977e3abd87fd16"
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
+ "
+
+S = "${WORKDIR}/git"
+
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/include `pkg-config --cflags efivar` \
+ -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR)\" '"
+
+do_install () {
+ install -D -p -m0755 src/efibootmgr ${D}/${sbindir}/efibootmgr
+}
+
+
diff --git a/meta-linaro-integration/recipes-overlayed/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/meta-linaro-integration/recipes-overlayed/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
new file mode 100644
index 00000000..e901fbdc
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
@@ -0,0 +1,31 @@
+From 9a3c480af653b37e62d1be04d49fe7a60a80168f Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Fri, 25 Sep 2015 18:14:31 +0800
+Subject: [PATCH 1/2] efivar: fix for cross compile
+
+It builds and calls elf file makeguids to generate a header file which
+doesn't work for cross compile. Fix it.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 5fc7887..1829d22 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -29,8 +29,8 @@ all : deps $(TARGETS)
+ ./guid-symbols.c : include/efivar/efivar-guids.h
+ ./guids.bin : include/efivar/efivar-guids.h
+ ./names.bin : include/efivar/efivar-guids.h
+-include/efivar/efivar-guids.h : makeguids guids.txt
+- ./makeguids guids.txt guids.bin names.bin \
++include/efivar/efivar-guids.h : guids.txt
++ makeguids guids.txt guids.bin names.bin \
+ guid-symbols.c include/efivar/efivar-guids.h
+
+ makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
+--
+2.4.3
+
diff --git a/meta-linaro-integration/recipes-overlayed/efivar/efivar/0002-disable-static-build.patch b/meta-linaro-integration/recipes-overlayed/efivar/efivar/0002-disable-static-build.patch
new file mode 100644
index 00000000..2c001ef3
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/efivar/efivar/0002-disable-static-build.patch
@@ -0,0 +1,29 @@
+From 126e0d3c1ad74cf5b0abe9e98ec444bcc3c83159 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi@linaro.org>
+Date: Fri, 4 Mar 2016 14:53:55 +0100
+Subject: [PATCH 2/2] disable static build
+
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
+---
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 1829d22..c7a0ca3 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -8,9 +8,9 @@ include $(TOPDIR)/Make.defaults
+
+ LIBTARGETS=libefivar.so libefiboot.so
+ STATICLIBTARGETS=libefivar.a libefiboot.a
+-BINTARGETS=efivar efivar-static
++BINTARGETS=efivar
+ PCTARGETS=efivar.pc efiboot.pc
+-TARGETS=$(LIBTARGETS) $(STATICLIBTARGETS) $(BINTARGETS) $(PCTARGETS)
++TARGETS=$(LIBTARGETS) $(BINTARGETS) $(PCTARGETS)
+
+ LIBEFIBOOT_SOURCES = crc32.c creator.c disk.c gpt.c linux.c loadopt.c
+ LIBEFIBOOT_OBJECTS = $(patsubst %.c,%.o,$(LIBEFIBOOT_SOURCES))
+--
+2.4.3
+
diff --git a/meta-linaro-integration/recipes-overlayed/efivar/efivar_0.23.bb b/meta-linaro-integration/recipes-overlayed/efivar/efivar_0.23.bb
new file mode 100644
index 00000000..b41be033
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/efivar/efivar_0.23.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Tools to manipulate UEFI variables"
+DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
+HOMEPAGE = "https://github.com/rhinstaller/efivar"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
+
+DEPENDS_class-target = "popt efivar-native"
+
+SRCREV = "01abee43d6d6e755f56a4135ab5aa0bfad609ce2"
+SRC_URI = "git://github.com/rhinstaller/efivar.git"
+SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
+ file://0002-disable-static-build.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+# Setting CROSS_COMPILE breaks pkgconfig, so just set AR
+EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar"
+
+do_compile_prepend() {
+ sed -i -e s:-Werror::g ${S}/gcc.specs
+}
+
+do_compile_class-native() {
+ oe_runmake -C src makeguids
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+do_install_class-native() {
+ install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
+}
+
+BBCLASSEXTEND = "native"
+