diff mbox

[RFC,PATCHv2] grub-efi: add git version

Message ID 1389777920-28884-1-git-send-email-koen.kooi@linaro.org
State New
Headers show

Commit Message

Koen Kooi Jan. 15, 2014, 9:25 a.m. UTC
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 | 72 +++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/grub-efi_git.bb

Comments

Koen Kooi Jan. 15, 2014, 9:31 a.m. UTC | #1
Ignore this one as well, it fails on non-x86 :( Grub is really great for 
triggering different errors on different arches.

On 01/15/2014 10:25 AM, Koen Kooi wrote:
> 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 | 72 +++++++++++++++++++++++++++++++++++
>   1 file changed, 72 insertions(+)
>   create mode 100644 meta/recipes-bsp/grub/grub-efi_git.bb
>
> 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..e8f859e
> --- /dev/null
> +++ b/meta/recipes-bsp/grub/grub-efi_git.bb
> @@ -0,0 +1,72 @@
> +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 \
> +          "
> +
> +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_class-native() {
> +        install -d ${D}${bindir}
> +        install -m 755 grub-mkimage ${D}${bindir}
> +}
> +
> +do_deploy() {
> +	# Search for the grub.cfg on the local boot media by using the
> +	# built in cfg file provided via this recipe
> +	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
> +	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
> +	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
> +	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
> +}
> +
> +do_deploy_class-native() {
> +	:
> +}
> +
> +addtask deploy after do_install before do_build
> +
> +RDEPENDS_${PN} = "diffutils freetype"
> +FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
> +
> +INSANE_SKIP_${PN} = "arch"
> +INSANE_SKIP_${PN}-dbg = "arch"
>
diff mbox

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..e8f859e
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-efi_git.bb
@@ -0,0 +1,72 @@ 
+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 \
+          "
+
+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_class-native() {
+        install -d ${D}${bindir}
+        install -m 755 grub-mkimage ${D}${bindir}
+}
+
+do_deploy() {
+	# Search for the grub.cfg on the local boot media by using the
+	# built in cfg file provided via this recipe
+	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
+	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
+	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+}
+
+do_deploy_class-native() {
+	:
+}
+
+addtask deploy after do_install before do_build
+
+RDEPENDS_${PN} = "diffutils freetype"
+FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
+
+INSANE_SKIP_${PN} = "arch"
+INSANE_SKIP_${PN}-dbg = "arch"