Patchwork [RFC] grub-efi: add git version

login
register
mail settings
Submitter Koen Kooi
Date Jan. 15, 2014, 9:16 a.m.
Message ID <1389777382-24374-1-git-send-email-koen.kooi@linaro.org>
Download mbox | patch
Permalink /patch/64803/
State New
Headers show

Comments

Koen Kooi - Jan. 15, 2014, 9:16 a.m.
This allows building both non-EFI (via grub_git.bb) and EFI versions of grub for platforms like i586 and armv7a which are usually non-EFI.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 meta/recipes-bsp/grub/grub-efi_git.bb | 58 +++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/grub-efi_git.bb

Patch

diff --git a/meta/recipes-bsp/grub/grub-efi_git.bb b/meta/recipes-bsp/grub/grub-efi_git.bb
new file mode 100644
index 0000000..339d5ec
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-efi_git.bb
@@ -0,0 +1,58 @@ 
+SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+
+DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
+intended to unify bootloading across x86 operating systems. In \
+addition to loading the Linux kernel, it implements the Multiboot \
+standard, which allows for flexible loading of multiple boot images."
+
+HOMEPAGE = "http://www.gnu.org/software/grub/"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "autogen-native flex-native bison-native xz freetype"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_arm = "1"
+
+PV = "2.00+${SRCPV}"
+SRCREV = "0776112c5311196889a15058a3b1be4c81ba5e05"
+SRC_URI = "git://git.savannah.gnu.org/grub.git \
+           file://40_custom \
+          "
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+
+inherit autotools
+inherit gettext
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
+PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
+
+# configure.ac has code to set this automagically from the target tuple
+# but the OE freeform one (core2-foo-bar-linux) don't work with that.
+
+GRUBPLATFORM = "efi"
+
+EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \
+                --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
+
+do_configure_prepend() {
+    ( cd ${S}
+      ${S}/autogen.sh )
+}
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/grub.d
+    install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
+}
+
+RDEPENDS_${PN} = "diffutils freetype"
+FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
+
+INSANE_SKIP_${PN} = "arch"
+INSANE_SKIP_${PN}-dbg = "arch"