From cf4aaed28a34cc652352f0817316187b72babc76 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Sat, 3 Jan 2015 18:38:19 -0800 Subject: grub 2.0: several fixes * Make grub, grub-efi grub_git use a grub2.inc to reduce the duplicated code. * Make grub and grub-efi use the same patches since they use the same source. (grub_git is different). * grub-efi: - Use autotools to replace autotools-brokensep - Remove the DEPENDS of freetype, it should be a RDEPENDS. - Remove grub-2.00-ignore-gnulib-gets-stupidity.patch since it is a duplication of remove-gets.patch. - Make grub-efi.rpm contain files rather than make an empty package. * grub_git: - Fix a SSE build failure. [YOCTO #6310] Signed-off-by: Robert Yang --- .../grub/files/fix-endianness-problem.patch | 44 +++++++++ .../grub-2.00-ignore-gnulib-gets-stupidity.patch | 28 ------ meta/recipes-bsp/grub/files/grub-install.in.patch | 20 ++++ ...rub2-remove-sparc64-setup-from-x86-builds.patch | 104 +++++++++++++++++++++ meta/recipes-bsp/grub/files/remove-gets.patch | 20 ++++ .../grub/grub-2.00/fix-endianness-problem.patch | 44 --------- .../grub/grub-2.00/grub-install.in.patch | 20 ---- ...rub2-remove-sparc64-setup-from-x86-builds.patch | 104 --------------------- meta/recipes-bsp/grub/grub-2.00/remove-gets.patch | 20 ---- meta/recipes-bsp/grub/grub-efi_2.00.bb | 48 +++------- meta/recipes-bsp/grub/grub2.inc | 44 +++++++++ meta/recipes-bsp/grub/grub_2.00.bb | 32 +------ meta/recipes-bsp/grub/grub_git.bb | 16 +--- 13 files changed, 246 insertions(+), 298 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/fix-endianness-problem.patch delete mode 100644 meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch create mode 100644 meta/recipes-bsp/grub/files/grub-install.in.patch create mode 100644 meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch create mode 100644 meta/recipes-bsp/grub/files/remove-gets.patch delete mode 100644 meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch delete mode 100644 meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch delete mode 100644 meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch delete mode 100644 meta/recipes-bsp/grub/grub-2.00/remove-gets.patch create mode 100644 meta/recipes-bsp/grub/grub2.inc (limited to 'meta') diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch new file mode 100644 index 0000000000..079992afba --- /dev/null +++ b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch @@ -0,0 +1,44 @@ +grub-core/net/tftp.c: fix endianness problem. + + * grub-core/net/tftp.c (ack): Fix endianness problem. + (tftp_receive): Likewise. + Reported by: Michael Davidsaver. + +Upstream-Status: Backport + +diff --git a/ChangeLog b/ChangeLog +index 81bdae9..c2f42d5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,9 @@ ++2012-07-02 Vladimir Serbinenko ++ ++ * grub-core/net/tftp.c (ack): Fix endianness problem. ++ (tftp_receive): Likewise. ++ Reported by: Michael Davidsaver. ++ + 2012-06-27 Vladimir Serbinenko + + * configure.ac: Bump version to 2.00. +diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c +index 9c70efb..d0f39ea 100644 +--- a/grub-core/net/tftp.c ++++ b/grub-core/net/tftp.c +@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block) + + tftph_ack = (struct tftphdr *) nb_ack.data; + tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK); +- tftph_ack->u.ack.block = block; ++ tftph_ack->u.ack.block = grub_cpu_to_be16 (block); + + err = grub_net_send_udp_packet (data->sock, &nb_ack); + if (err) +@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), + grub_priority_queue_pop (data->pq); + + if (file->device->net->packs.count < 50) +- err = ack (data, tftph->u.data.block); ++ err = ack (data, data->block + 1); + else + { + file->device->net->stall = 1; diff --git a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch deleted file mode 100644 index 70f60015c2..0000000000 --- a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Fri, 25 May 2012 15:28:19 -0400 -Subject: [PATCH] gnulib accused in build breaking shocker. - -Upstream-Status: pending [Fedora will push this] - ---- - grub-core/gnulib/stdio.in.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h -index 80b9dbf..69932d9 100644 ---- a/grub-core/gnulib/stdio.in.h -+++ b/grub-core/gnulib/stdio.in.h -@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ - #undef gets -+#if 0 - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ --- -1.7.10.1 - diff --git a/meta/recipes-bsp/grub/files/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch new file mode 100644 index 0000000000..326951df44 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-install.in.patch @@ -0,0 +1,20 @@ +Upstream-Status: Inappropriate [embedded specific] + +Our use of grub-install doesn't require the -x option, so we should be +be able make use of grep versions that don't support it. + +Signed-off-by: Tom Zanussi + +Index: grub-1.99/util/grub-install.in +=================================================================== +--- grub-1.99.orig/util/grub-install.in 2011-09-09 22:37:20.093906679 -0500 ++++ grub-1.99/util/grub-install.in 2011-09-09 22:37:30.854737882 -0500 +@@ -510,7 +510,7 @@ + + if [ "x${devabstraction_module}" = "x" ] ; then + if [ x"${install_device}" != x ]; then +- if echo "${install_device}" | grep -qx "(.*)" ; then ++ if echo "${install_device}" | grep -q "(.*)" ; then + install_drive="${install_device}" + else + install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1 diff --git a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch new file mode 100644 index 0000000000..6259a1abe3 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch @@ -0,0 +1,104 @@ +Upstream-Status: Inappropriate [embedded specific] + +remove the grub-sparc64-setup files from the x86 builds. + +Signed-Off-By: Nitin A Kamble + +--- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700 ++++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700 +@@ -4692,9 +4692,9 @@ + endif + + if COND_emu +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4715,9 +4715,9 @@ + endif + + if COND_i386_pc +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4738,9 +4738,9 @@ + endif + + if COND_i386_efi +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4761,9 +4761,9 @@ + endif + + if COND_i386_qemu +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4784,9 +4784,9 @@ + endif + + if COND_i386_coreboot +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4807,9 +4807,9 @@ + endif + + if COND_i386_multiboot +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4830,9 +4830,9 @@ + endif + + if COND_i386_ieee1275 +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup +@@ -4853,9 +4853,9 @@ + endif + + if COND_x86_64_efi +-sbin_PROGRAMS += grub-sparc64-setup ++sbin_PROGRAMS += + if COND_MAN_PAGES +-man_MANS += grub-sparc64-setup.8 ++man_MANS += + + grub-sparc64-setup.8: grub-sparc64-setup + chmod a+x grub-sparc64-setup diff --git a/meta/recipes-bsp/grub/files/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch new file mode 100644 index 0000000000..463f7847ad --- /dev/null +++ b/meta/recipes-bsp/grub/files/remove-gets.patch @@ -0,0 +1,20 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +Index: grub-1.99/grub-core/gnulib/stdio.in.h +=================================================================== +--- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800 ++++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700 +@@ -140,8 +140,10 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch b/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch deleted file mode 100644 index 079992afba..0000000000 --- a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch +++ /dev/null @@ -1,44 +0,0 @@ -grub-core/net/tftp.c: fix endianness problem. - - * grub-core/net/tftp.c (ack): Fix endianness problem. - (tftp_receive): Likewise. - Reported by: Michael Davidsaver. - -Upstream-Status: Backport - -diff --git a/ChangeLog b/ChangeLog -index 81bdae9..c2f42d5 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,9 @@ -+2012-07-02 Vladimir Serbinenko -+ -+ * grub-core/net/tftp.c (ack): Fix endianness problem. -+ (tftp_receive): Likewise. -+ Reported by: Michael Davidsaver. -+ - 2012-06-27 Vladimir Serbinenko - - * configure.ac: Bump version to 2.00. -diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 9c70efb..d0f39ea 100644 ---- a/grub-core/net/tftp.c -+++ b/grub-core/net/tftp.c -@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block) - - tftph_ack = (struct tftphdr *) nb_ack.data; - tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK); -- tftph_ack->u.ack.block = block; -+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block); - - err = grub_net_send_udp_packet (data->sock, &nb_ack); - if (err) -@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), - grub_priority_queue_pop (data->pq); - - if (file->device->net->packs.count < 50) -- err = ack (data, tftph->u.data.block); -+ err = ack (data, data->block + 1); - else - { - file->device->net->stall = 1; diff --git a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch b/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch deleted file mode 100644 index 326951df44..0000000000 --- a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Our use of grub-install doesn't require the -x option, so we should be -be able make use of grep versions that don't support it. - -Signed-off-by: Tom Zanussi - -Index: grub-1.99/util/grub-install.in -=================================================================== ---- grub-1.99.orig/util/grub-install.in 2011-09-09 22:37:20.093906679 -0500 -+++ grub-1.99/util/grub-install.in 2011-09-09 22:37:30.854737882 -0500 -@@ -510,7 +510,7 @@ - - if [ "x${devabstraction_module}" = "x" ] ; then - if [ x"${install_device}" != x ]; then -- if echo "${install_device}" | grep -qx "(.*)" ; then -+ if echo "${install_device}" | grep -q "(.*)" ; then - install_drive="${install_device}" - else - install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1 diff --git a/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch deleted file mode 100644 index 6259a1abe3..0000000000 --- a/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch +++ /dev/null @@ -1,104 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -remove the grub-sparc64-setup files from the x86 builds. - -Signed-Off-By: Nitin A Kamble - ---- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700 -+++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700 -@@ -4692,9 +4692,9 @@ - endif - - if COND_emu --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4715,9 +4715,9 @@ - endif - - if COND_i386_pc --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4738,9 +4738,9 @@ - endif - - if COND_i386_efi --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4761,9 +4761,9 @@ - endif - - if COND_i386_qemu --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4784,9 +4784,9 @@ - endif - - if COND_i386_coreboot --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4807,9 +4807,9 @@ - endif - - if COND_i386_multiboot --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4830,9 +4830,9 @@ - endif - - if COND_i386_ieee1275 --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup -@@ -4853,9 +4853,9 @@ - endif - - if COND_x86_64_efi --sbin_PROGRAMS += grub-sparc64-setup -+sbin_PROGRAMS += - if COND_MAN_PAGES --man_MANS += grub-sparc64-setup.8 -+man_MANS += - - grub-sparc64-setup.8: grub-sparc64-setup - chmod a+x grub-sparc64-setup diff --git a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch b/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch deleted file mode 100644 index 463f7847ad..0000000000 --- a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch +++ /dev/null @@ -1,20 +0,0 @@ -ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it - -Signed-off-by: Khem Raj - -Upstream-Status: Pending -Index: grub-1.99/grub-core/gnulib/stdio.in.h -=================================================================== ---- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800 -+++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700 -@@ -140,8 +140,10 @@ - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -+#if defined gets - #undef gets - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb index d213f31a20..a337d3d4cb 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.00.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb @@ -1,39 +1,12 @@ -SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" +require grub2.inc -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. \ -This recipe builds an EFI binary for the target. It does not install \ -or package anything, it only deploys a target-arch GRUB EFI image." - -HOMEPAGE = "http://www.gnu.org/software/grub/" -SECTION = "bootloaders" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -# FIXME: We should be able to optionally drop freetype as a dependency -DEPENDS = "autogen-native flex-native bison-native" DEPENDS_class-target = "grub-efi-native" +RDEPENDS_${PN}_class-target = "diffutils freetype" PR = "r2" -SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ +SRC_URI += " \ file://cfg \ - file://grub-2.00-fpmath-sse-387-fix.patch \ - file://grub-2.00-fix-enable_execute_stack-check.patch \ - file://check-if-liblzma-is-disabled.patch \ - file://grub-no-unused-result.patch \ - file://grub-2.00-ignore-gnulib-gets-stupidity.patch \ - file://fix-issue-with-flex-2.5.37.patch \ - file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \ - file://grub-2.00-add-oe-kernel.patch \ - file://grub-efi-fix-with-glibc-2.20.patch \ " -SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" -SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' S = "${WORKDIR}/grub-${PV}" @@ -53,17 +26,13 @@ python __anonymous () { d.setVar("GRUB_IMAGE", grubimage) } -inherit autotools-brokensep gettext texinfo deploy +inherit deploy CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ --enable-efiemu=no --program-prefix='' \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" -do_install_class-target() { - : -} - do_install_class-native() { install -d ${D}${bindir} install -m 755 grub-mkimage ${D}${bindir} @@ -86,7 +55,12 @@ do_deploy_class-native() { addtask deploy after do_install before do_build -FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug" +FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \ + /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \ + " +FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \ + ${datadir}/grub \ + " BBCLASSEXTEND = "native" -ALLOW_EMPTY_${PN} = "1" + diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc new file mode 100644 index 0000000000..59e5b6e1fe --- /dev/null +++ b/meta/recipes-bsp/grub/grub2.inc @@ -0,0 +1,44 @@ +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" + +SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ + file://grub-2.00-fpmath-sse-387-fix.patch \ + file://check-if-liblzma-is-disabled.patch \ + file://fix-issue-with-flex-2.5.37.patch \ + file://grub-2.00-add-oe-kernel.patch \ + file://grub-install.in.patch \ + file://remove-gets.patch \ + file://fix-endianness-problem.patch \ + file://grub2-remove-sparc64-setup-from-x86-builds.patch \ + file://grub-2.00-fix-enable_execute_stack-check.patch \ + file://grub-no-unused-result.patch \ + file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \ + file://grub-efi-fix-with-glibc-2.20.patch \ + " + +DEPENDS = "autogen-native flex-native bison-native xz" + +SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" +SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' + +inherit autotools gettext texinfo + +# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are +# conflicted, remove it since no one uses it. +SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib" +remove_sysroot_mkconfig_lib() { + rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib" +} + diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb index e2fcbb98f5..a11e960fe5 100644 --- a/meta/recipes-bsp/grub/grub_2.00.bb +++ b/meta/recipes-bsp/grub/grub_2.00.bb @@ -1,41 +1,11 @@ -SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" +require grub2.inc -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" RDEPENDS_${PN} = "diffutils freetype" PR = "r1" -SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ - file://grub-install.in.patch \ - file://grub-2.00-fpmath-sse-387-fix.patch \ - file://remove-gets.patch \ - file://check-if-liblzma-is-disabled.patch \ - file://fix-issue-with-flex-2.5.37.patch \ - file://grub-2.00-add-oe-kernel.patch \ - file://fix-endianness-problem.patch \ - file://grub2-remove-sparc64-setup-from-x86-builds.patch \ - " - -SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" -SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' - FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug" -inherit autotools gettext texinfo - PACKAGECONFIG ??= "" PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb index 2a6392b82e..e8179ba576 100644 --- a/meta/recipes-bsp/grub/grub_git.bb +++ b/meta/recipes-bsp/grub/grub_git.bb @@ -1,17 +1,4 @@ -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" +require grub2.inc DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_arm = "1" @@ -19,6 +6,7 @@ DEFAULT_PREFERENCE_arm = "1" PV = "2.00+${SRCPV}" SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" SRC_URI = "git://git.savannah.gnu.org/grub.git \ + file://grub-2.00-fpmath-sse-387-fix.patch \ file://autogen.sh-exclude-pc.patch \ file://grub-2.00-add-oe-kernel.patch \ file://0001-Fix-build-with-glibc-2.20.patch \ -- cgit 1.2.3-korg