summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-01-03 18:38:19 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-16 23:08:19 +0000
commitac867c3d4d1991e2e4f83cca2bad0ee31716796e (patch)
treefbcd2a23598423e58061623e058d602d000c0a75
parent175d162b19b65a329163b0510d915ffae71af4de (diff)
downloadpoky-ac867c3d4d1991e2e4f83cca2bad0ee31716796e.tar.gz
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] (From OE-Core rev: cf4aaed28a34cc652352f0817316187b72babc76) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch (renamed from meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch28
-rw-r--r--meta/recipes-bsp/grub/files/grub-install.in.patch (renamed from meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch (renamed from meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/remove-gets.patch (renamed from meta/recipes-bsp/grub/grub-2.00/remove-gets.patch)0
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.00.bb48
-rw-r--r--meta/recipes-bsp/grub/grub2.inc44
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb32
-rw-r--r--meta/recipes-bsp/grub/grub_git.bb16
9 files changed, 58 insertions, 110 deletions
diff --git a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
index 079992afba..079992afba 100644
--- a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch
+++ b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
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 @@
1From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
2From: Peter Jones <pjones@redhat.com>
3Date: Fri, 25 May 2012 15:28:19 -0400
4Subject: [PATCH] gnulib accused in build breaking shocker.
5
6Upstream-Status: pending [Fedora will push this]
7
8---
9 grub-core/gnulib/stdio.in.h | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
13index 80b9dbf..69932d9 100644
14--- a/grub-core/gnulib/stdio.in.h
15+++ b/grub-core/gnulib/stdio.in.h
16@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
17 so any use of gets warrants an unconditional warning. Assume it is
18 always declared, since it is required by C89. */
19 #undef gets
20+#if 0
21 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
22+#endif
23
24 #if @GNULIB_FOPEN@
25 # if @REPLACE_FOPEN@
26--
271.7.10.1
28
diff --git a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch
index 326951df44..326951df44 100644
--- a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch
+++ b/meta/recipes-bsp/grub/files/grub-install.in.patch
diff --git a/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
index 6259a1abe3..6259a1abe3 100644
--- a/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch
+++ b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
diff --git a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch
index 463f7847ad..463f7847ad 100644
--- a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch
+++ b/meta/recipes-bsp/grub/files/remove-gets.patch
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 @@
1SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" 1require grub2.inc
2 2
3DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
4intended to unify bootloading across x86 operating systems. In \
5addition to loading the Linux kernel, it implements the Multiboot \
6standard, which allows for flexible loading of multiple boot images. \
7This recipe builds an EFI binary for the target. It does not install \
8or package anything, it only deploys a target-arch GRUB EFI image."
9
10HOMEPAGE = "http://www.gnu.org/software/grub/"
11SECTION = "bootloaders"
12
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
15
16# FIXME: We should be able to optionally drop freetype as a dependency
17DEPENDS = "autogen-native flex-native bison-native"
18DEPENDS_class-target = "grub-efi-native" 3DEPENDS_class-target = "grub-efi-native"
4RDEPENDS_${PN}_class-target = "diffutils freetype"
19PR = "r2" 5PR = "r2"
20 6
21SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 7SRC_URI += " \
22 file://cfg \ 8 file://cfg \
23 file://grub-2.00-fpmath-sse-387-fix.patch \
24 file://grub-2.00-fix-enable_execute_stack-check.patch \
25 file://check-if-liblzma-is-disabled.patch \
26 file://grub-no-unused-result.patch \
27 file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
28 file://fix-issue-with-flex-2.5.37.patch \
29 file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
30 file://grub-2.00-add-oe-kernel.patch \
31 file://grub-efi-fix-with-glibc-2.20.patch \
32 " 9 "
33SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
34SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
35
36COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
37 10
38S = "${WORKDIR}/grub-${PV}" 11S = "${WORKDIR}/grub-${PV}"
39 12
@@ -53,17 +26,13 @@ python __anonymous () {
53 d.setVar("GRUB_IMAGE", grubimage) 26 d.setVar("GRUB_IMAGE", grubimage)
54} 27}
55 28
56inherit autotools-brokensep gettext texinfo deploy 29inherit deploy
57 30
58CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" 31CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
59EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ 32EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
60 --enable-efiemu=no --program-prefix='' \ 33 --enable-efiemu=no --program-prefix='' \
61 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" 34 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
62 35
63do_install_class-target() {
64 :
65}
66
67do_install_class-native() { 36do_install_class-native() {
68 install -d ${D}${bindir} 37 install -d ${D}${bindir}
69 install -m 755 grub-mkimage ${D}${bindir} 38 install -m 755 grub-mkimage ${D}${bindir}
@@ -86,7 +55,12 @@ do_deploy_class-native() {
86 55
87addtask deploy after do_install before do_build 56addtask deploy after do_install before do_build
88 57
89FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug" 58FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \
59 /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \
60 "
61FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
62 ${datadir}/grub \
63 "
90 64
91BBCLASSEXTEND = "native" 65BBCLASSEXTEND = "native"
92ALLOW_EMPTY_${PN} = "1" 66
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 @@
1SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
2
3DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
4intended to unify bootloading across x86 operating systems. In \
5addition to loading the Linux kernel, it implements the Multiboot \
6standard, which allows for flexible loading of multiple boot images."
7
8HOMEPAGE = "http://www.gnu.org/software/grub/"
9SECTION = "bootloaders"
10
11LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
14SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
15 file://grub-2.00-fpmath-sse-387-fix.patch \
16 file://check-if-liblzma-is-disabled.patch \
17 file://fix-issue-with-flex-2.5.37.patch \
18 file://grub-2.00-add-oe-kernel.patch \
19 file://grub-install.in.patch \
20 file://remove-gets.patch \
21 file://fix-endianness-problem.patch \
22 file://grub2-remove-sparc64-setup-from-x86-builds.patch \
23 file://grub-2.00-fix-enable_execute_stack-check.patch \
24 file://grub-no-unused-result.patch \
25 file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
26 file://grub-efi-fix-with-glibc-2.20.patch \
27 "
28
29DEPENDS = "autogen-native flex-native bison-native xz"
30
31SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
32SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
33
34COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
35
36inherit autotools gettext texinfo
37
38# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
39# conflicted, remove it since no one uses it.
40SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
41remove_sysroot_mkconfig_lib() {
42 rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
43}
44
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 @@
1SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" 1require grub2.inc
2 2
3DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
4intended to unify bootloading across x86 operating systems. In \
5addition to loading the Linux kernel, it implements the Multiboot \
6standard, which allows for flexible loading of multiple boot images."
7
8HOMEPAGE = "http://www.gnu.org/software/grub/"
9SECTION = "bootloaders"
10
11LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
14DEPENDS = "autogen-native flex-native bison-native xz"
15RDEPENDS_${PN} = "diffutils freetype" 3RDEPENDS_${PN} = "diffutils freetype"
16PR = "r1" 4PR = "r1"
17 5
18SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
19 file://grub-install.in.patch \
20 file://grub-2.00-fpmath-sse-387-fix.patch \
21 file://remove-gets.patch \
22 file://check-if-liblzma-is-disabled.patch \
23 file://fix-issue-with-flex-2.5.37.patch \
24 file://grub-2.00-add-oe-kernel.patch \
25 file://fix-endianness-problem.patch \
26 file://grub2-remove-sparc64-setup-from-x86-builds.patch \
27 "
28
29SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
30SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
31
32COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
33
34FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug" 6FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
35 7
36 8
37inherit autotools gettext texinfo
38
39PACKAGECONFIG ??= "" 9PACKAGECONFIG ??= ""
40PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" 10PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
41PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" 11PACKAGECONFIG[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 @@
1SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" 1require grub2.inc
2
3DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
4intended to unify bootloading across x86 operating systems. In \
5addition to loading the Linux kernel, it implements the Multiboot \
6standard, which allows for flexible loading of multiple boot images."
7
8HOMEPAGE = "http://www.gnu.org/software/grub/"
9SECTION = "bootloaders"
10
11LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
14DEPENDS = "autogen-native flex-native bison-native xz freetype"
15 2
16DEFAULT_PREFERENCE = "-1" 3DEFAULT_PREFERENCE = "-1"
17DEFAULT_PREFERENCE_arm = "1" 4DEFAULT_PREFERENCE_arm = "1"
@@ -19,6 +6,7 @@ DEFAULT_PREFERENCE_arm = "1"
19PV = "2.00+${SRCPV}" 6PV = "2.00+${SRCPV}"
20SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" 7SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"
21SRC_URI = "git://git.savannah.gnu.org/grub.git \ 8SRC_URI = "git://git.savannah.gnu.org/grub.git \
9 file://grub-2.00-fpmath-sse-387-fix.patch \
22 file://autogen.sh-exclude-pc.patch \ 10 file://autogen.sh-exclude-pc.patch \
23 file://grub-2.00-add-oe-kernel.patch \ 11 file://grub-2.00-add-oe-kernel.patch \
24 file://0001-Fix-build-with-glibc-2.20.patch \ 12 file://0001-Fix-build-with-glibc-2.20.patch \