summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-04-28 09:57:08 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-07 15:57:37 +0100
commitce99882619e3fc68a70962e22055a36d1723f1c8 (patch)
tree6f7fe79318840ac0af113ae75ecffc1995872e17 /meta
parentb0488ff67a0ced0b4db3653895a3b089dd855bb9 (diff)
downloadpoky-ce99882619e3fc68a70962e22055a36d1723f1c8.tar.gz
grub/grub-efi: fix conflict
While installing grub and grub-efi, there are conflict files in ${sysconfdir} ${datadir} ${bindir} ${sbindir}. - Since all of the conflicted files are tools which is common for grub and grub-efi, we split them (except grub-editenv) to grub-common in grub. - The package grub-common runtime depends grub-editenv - The package grub-editenv runtime provides grub-efi-editenv - Remove SYSROOT_DIRS_BLACKLIST - The recipe grub-efi does not generate the duplicated files and use runtime depends grub-common to instead Debian and Fedora do the similar thing. Debian use a common package grub-common for both of pc bios and efi, and use package grub-pc-bin for pc bios, grub-efi-amd64-bin for efi. Both of grub-pc-bin and grub-efi-amd64-bin requires grub-common. https://packages.debian.org/sid/grub-common https://packages.debian.org/jessie/grub-pc-bin https://packages.debian.org/jessie/grub-efi-amd64-bin Fedora use a common package grub2-tools for both of pc bios and efi, and use package grub2 for pc bios, grub2-efi-modules for efi. Both of grub2 and grub2-efi-modules requires grub2-tools. https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-tools-2.02-0.34.fc24.x86_64.html https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-2.02-0.34.fc24.x86_64.html https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-efi-modules-2.02-0.34.fc24.x86_64.html [YOCTO #11639] (From OE-Core rev: 60c360c0561f1ff5ff2135c4557f5992f9485617) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.02.bb9
-rw-r--r--meta/recipes-bsp/grub/grub2.inc8
-rw-r--r--meta/recipes-bsp/grub/grub_2.02.bb14
3 files changed, 18 insertions, 13 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 128da162d0..112a99dcfb 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -3,7 +3,7 @@ require grub2.inc
3GRUBPLATFORM = "efi" 3GRUBPLATFORM = "efi"
4 4
5DEPENDS_append_class-target = " grub-efi-native" 5DEPENDS_append_class-target = " grub-efi-native"
6RDEPENDS_${PN}_class-target = "diffutils freetype" 6RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
7 7
8SRC_URI += " \ 8SRC_URI += " \
9 file://cfg \ 9 file://cfg \
@@ -41,7 +41,9 @@ do_install_class-native() {
41 install -m 755 grub-mkimage ${D}${bindir} 41 install -m 755 grub-mkimage ${D}${bindir}
42} 42}
43 43
44do_install_append_class-target() { 44do_install_class-target() {
45 oe_runmake 'DESTDIR=${D}' -C grub-core install
46
45 # Remove build host references... 47 # Remove build host references...
46 find "${D}" -name modinfo.sh -type f -exec \ 48 find "${D}" -name modinfo.sh -type f -exec \
47 sed -i \ 49 sed -i \
@@ -69,8 +71,7 @@ do_deploy_class-native() {
69 71
70addtask deploy after do_install before do_build 72addtask deploy after do_install before do_build
71 73
72FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \ 74FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
73 ${datadir}/grub \
74 " 75 "
75 76
76# 64-bit binaries are expected for the bootloader with an x32 userland 77# 64-bit binaries are expected for the bootloader with an x32 userland
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 28f96bb162..79a84e9ac5 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -67,12 +67,4 @@ do_configure_prepend() {
67 ${S}/autogen.sh ) 67 ${S}/autogen.sh )
68} 68}
69 69
70# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
71# conflicted, remove it since no one uses it.
72SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
73
74PACKAGES =+ "${PN}-editenv"
75
76FILES_${PN}-editenv = "${bindir}/grub-editenv"
77RDEPENDS_${PN} += "${PN}-editenv"
78RDEPENDS_${PN}_class-native = "" 70RDEPENDS_${PN}_class-native = ""
diff --git a/meta/recipes-bsp/grub/grub_2.02.bb b/meta/recipes-bsp/grub/grub_2.02.bb
index 3e61f6a16d..e0973759fb 100644
--- a/meta/recipes-bsp/grub/grub_2.02.bb
+++ b/meta/recipes-bsp/grub/grub_2.02.bb
@@ -1,6 +1,18 @@
1require grub2.inc 1require grub2.inc
2 2
3RDEPENDS_${PN} += "diffutils freetype" 3RDEPENDS_${PN}-common += "${PN}-editenv"
4RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
5
6RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
7
8PACKAGES =+ "${PN}-editenv ${PN}-common"
9FILES_${PN}-editenv = "${bindir}/grub-editenv"
10FILES_${PN}-common = " \
11 ${bindir} \
12 ${sysconfdir} \
13 ${sbindir} \
14 ${datadir}/grub \
15"
4 16
5do_install_append () { 17do_install_append () {
6 install -d ${D}${sysconfdir}/grub.d 18 install -d ${D}${sysconfdir}/grub.d