diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-01-03 18:38:19 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-16 23:08:19 +0000 |
commit | ac867c3d4d1991e2e4f83cca2bad0ee31716796e (patch) | |
tree | fbcd2a23598423e58061623e058d602d000c0a75 | |
parent | 175d162b19b65a329163b0510d915ffae71af4de (diff) | |
download | poky-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.patch | 28 | ||||
-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.bb | 48 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 44 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub_2.00.bb | 32 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub_git.bb | 16 |
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 @@ | |||
1 | From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Fri, 25 May 2012 15:28:19 -0400 | ||
4 | Subject: [PATCH] gnulib accused in build breaking shocker. | ||
5 | |||
6 | Upstream-Status: pending [Fedora will push this] | ||
7 | |||
8 | --- | ||
9 | grub-core/gnulib/stdio.in.h | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h | ||
13 | index 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 | -- | ||
27 | 1.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 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | 1 | require grub2.inc |
2 | 2 | ||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images. \ | ||
7 | This recipe builds an EFI binary for the target. It does not install \ | ||
8 | or package anything, it only deploys a target-arch GRUB EFI image." | ||
9 | |||
10 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
11 | SECTION = "bootloaders" | ||
12 | |||
13 | LICENSE = "GPLv3" | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
15 | |||
16 | # FIXME: We should be able to optionally drop freetype as a dependency | ||
17 | DEPENDS = "autogen-native flex-native bison-native" | ||
18 | DEPENDS_class-target = "grub-efi-native" | 3 | DEPENDS_class-target = "grub-efi-native" |
4 | RDEPENDS_${PN}_class-target = "diffutils freetype" | ||
19 | PR = "r2" | 5 | PR = "r2" |
20 | 6 | ||
21 | SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ | 7 | SRC_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 | " |
33 | SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" | ||
34 | SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" | ||
35 | |||
36 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
37 | 10 | ||
38 | S = "${WORKDIR}/grub-${PV}" | 11 | S = "${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 | ||
56 | inherit autotools-brokensep gettext texinfo deploy | 29 | inherit deploy |
57 | 30 | ||
58 | CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" | 31 | CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" |
59 | EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ | 32 | EXTRA_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 | ||
63 | do_install_class-target() { | ||
64 | : | ||
65 | } | ||
66 | |||
67 | do_install_class-native() { | 36 | do_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 | ||
87 | addtask deploy after do_install before do_build | 56 | addtask deploy after do_install before do_build |
88 | 57 | ||
89 | FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug" | 58 | FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \ |
59 | /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \ | ||
60 | " | ||
61 | FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \ | ||
62 | ${datadir}/grub \ | ||
63 | " | ||
90 | 64 | ||
91 | BBCLASSEXTEND = "native" | 65 | BBCLASSEXTEND = "native" |
92 | ALLOW_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 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | ||
2 | |||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images." | ||
7 | |||
8 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
9 | SECTION = "bootloaders" | ||
10 | |||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | SRC_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 | |||
29 | DEPENDS = "autogen-native flex-native bison-native xz" | ||
30 | |||
31 | SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" | ||
32 | SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" | ||
33 | |||
34 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
35 | |||
36 | inherit 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. | ||
40 | SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib" | ||
41 | remove_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 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | 1 | require grub2.inc |
2 | 2 | ||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images." | ||
7 | |||
8 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
9 | SECTION = "bootloaders" | ||
10 | |||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | DEPENDS = "autogen-native flex-native bison-native xz" | ||
15 | RDEPENDS_${PN} = "diffutils freetype" | 3 | RDEPENDS_${PN} = "diffutils freetype" |
16 | PR = "r1" | 4 | PR = "r1" |
17 | 5 | ||
18 | SRC_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 | |||
29 | SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" | ||
30 | SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" | ||
31 | |||
32 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
33 | |||
34 | FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug" | 6 | FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug" |
35 | 7 | ||
36 | 8 | ||
37 | inherit autotools gettext texinfo | ||
38 | |||
39 | PACKAGECONFIG ??= "" | 9 | PACKAGECONFIG ??= "" |
40 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" | 10 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" |
41 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" | 11 | 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 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | 1 | require grub2.inc |
2 | |||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images." | ||
7 | |||
8 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
9 | SECTION = "bootloaders" | ||
10 | |||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | DEPENDS = "autogen-native flex-native bison-native xz freetype" | ||
15 | 2 | ||
16 | DEFAULT_PREFERENCE = "-1" | 3 | DEFAULT_PREFERENCE = "-1" |
17 | DEFAULT_PREFERENCE_arm = "1" | 4 | DEFAULT_PREFERENCE_arm = "1" |
@@ -19,6 +6,7 @@ DEFAULT_PREFERENCE_arm = "1" | |||
19 | PV = "2.00+${SRCPV}" | 6 | PV = "2.00+${SRCPV}" |
20 | SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" | 7 | SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" |
21 | SRC_URI = "git://git.savannah.gnu.org/grub.git \ | 8 | SRC_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 \ |