aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-11-18 09:27:42 -0500
committerHongxu Jia <hongxu.jia@windriver.com>2016-11-22 20:58:04 -0500
commite40aee8b335c72557154bbc58da2231690eb7cee (patch)
tree71da3f1eed929b5cfd28d9de7ac91c91a8c10715
parent43e652f3d1fee5ce7fad67e6400315eab1b34270 (diff)
downloadopenembedded-core-contrib-hongxu/fix-grub.tar.gz
openembedded-core-contrib-hongxu/fix-grub.tar.bz2
openembedded-core-contrib-hongxu/fix-grub.zip
grub/grub-efi: fix conflicthongxu/fix-grub
While installing grub and grub-efi, there are conflict files in ${sysconfdir} ${datadir} ${bindir} ${sbindir}. 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 For OE, we use a common package grub-common for both of pc bios and efi, and use package grub for pc bios, grub-efi for efi. Both of grubc and grub-efi runtime depends grub-common. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.00.bb12
-rw-r--r--meta/recipes-bsp/grub/grub2.inc4
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb18
3 files changed, 20 insertions, 14 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 5a0dc954a3..72983da576 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -1,7 +1,7 @@
require grub2.inc
DEPENDS_class-target = "grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
PR = "r3"
SRC_URI += " \
@@ -44,6 +44,13 @@ do_install_class-native() {
install -m 755 grub-mkimage ${D}${bindir}
}
+do_install_append_class-target(){
+ # Remove duplicated
+ for dir in ${sysconfdir} ${datadir} ${bindir} ${sbindir}; do
+ rm -rf ${D}$dir
+ done
+}
+
GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
do_deploy() {
@@ -61,8 +68,7 @@ do_deploy_class-native() {
addtask deploy after do_install before do_build
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
- ${datadir}/grub \
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index b10f633aae..1bb7b84f0c 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -64,7 +64,3 @@ do_configure_prepend() {
( cd ${S}
${S}/autogen.sh )
}
-
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${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 07e1d101b3..7bfece0420 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -1,6 +1,8 @@
require grub2.inc
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
+RDEPENDS_${PN} = "diffutils freetype ${PN}-common"
+RDEPENDS_${PN}-common = "${PN}-editenv"
+
PR = "r1"
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
@@ -8,13 +10,15 @@ EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
-PACKAGES =+ "grub-editenv"
-
-FILES_grub-editenv = "${bindir}/grub-editenv"
+PACKAGES =+ "${PN}-editenv ${PN}-common"
-do_install_append () {
- install -d ${D}${sysconfdir}/grub.d
-}
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+ ${bindir} \
+ ${sysconfdir} \
+ ${sbindir} \
+ ${datadir}/grub \
+"
INSANE_SKIP_${PN} = "arch"
INSANE_SKIP_${PN}-dbg = "arch"