summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2020-06-22 13:43:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-23 12:31:03 +0100
commit2d740a8c710a001d7de48881fb3ec227f4e25c92 (patch)
tree679a88412e83b83aea6d174f0e25b500db111b7c /meta/recipes-bsp
parentb58192aba2d8f6b388a073629f8d3e765a074643 (diff)
downloadpoky-2d740a8c710a001d7de48881fb3ec227f4e25c92.tar.gz
grub: Remove native version of grub-efi
The native version of grub-efi only installs the tools /usr/bin/grub-editenv /usr/bin/grub-mkimage to sysroots-components/, but equivalent tools are already provided by grub-native, the difference on x86_64 being 4 hardwired paths in grub-mkimage (values taken from grub-native): LOCALEDIR = $TMPDIR/work/x86_64-linux/grub-native/2.04-r0/recipe-sysroot-native/usr/share/locale GRUB_DATADIR = $TMPDIR/work/x86_64-linux/grub-native/2.04-r0/recipe-sysroot-native/usr/share GRUB_LIBDIR = $TMPDIR/work/x86_64-linux/grub-native/2.04-r0/recipe-sysroot-native/usr/lib GRUB_SYSCONFDIR = $TMPDIR/work/x86_64-linux/grub-native/2.04-r0/recipe-sysroot-native/etc If grub-native and grub-efi-native are built with the following patch --- grub-2.04.orig/configure.ac +++ grub-2.04/configure.ac @@ -1980,10 +1980,10 @@ grub_libdir="$(eval echo "$libdir")" grub_localedir="$(eval echo "$localedir")" grub_datadir="$(eval echo "$datadir")" grub_sysconfdir="$(eval echo "$sysconfdir")" -AC_DEFINE_UNQUOTED(LOCALEDIR, "$grub_localedir", [Locale dir]) -AC_DEFINE_UNQUOTED(GRUB_LIBDIR, "$grub_libdir", [Library dir]) -AC_DEFINE_UNQUOTED(GRUB_DATADIR, "$grub_datadir", [Data dir]) -AC_DEFINE_UNQUOTED(GRUB_SYSCONFDIR, "$grub_sysconfdir", [Configuration dir]) +AC_DEFINE_UNQUOTED(LOCALEDIR, "/non-existent", [Locale dir]) +AC_DEFINE_UNQUOTED(GRUB_LIBDIR, "/non-existent", [Library dir]) +AC_DEFINE_UNQUOTED(GRUB_DATADIR, "/non-existent", [Data dir]) +AC_DEFINE_UNQUOTED(GRUB_SYSCONFDIR, "/non-existent", [Configuration dir]) the produced grub-editenv/grub-mkimage binaries become binary equivalent, assuming reproducible builds is active. Since the unpatched values of LOCALEDIR/GRUB_DATADIR/GRUB_LIBDIR/GRUB_SYSCONFDIR point to directories that are not expected to exist at runtime, they can be ignored. Therefore: * remove grub-efi-native and instead rely on the same tools from grub-native * replace references to grub-efi-native with grub-native * remove unused grub-efi-native security flags overrides (From OE-Core rev: 7044181df7487f047d175242f7ebbc3c35bf5402) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.04.bb28
-rw-r--r--meta/recipes-bsp/grub/grub2.inc4
-rw-r--r--meta/recipes-bsp/grub/grub_2.04.bb5
3 files changed, 11 insertions, 26 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.04.bb
index b9d6225d27..30d95f95e0 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.04.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb
@@ -4,8 +4,8 @@ require conf/image-uefi.conf
4 4
5GRUBPLATFORM = "efi" 5GRUBPLATFORM = "efi"
6 6
7DEPENDS_append_class-target = " grub-efi-native" 7DEPENDS_append = " grub-native"
8RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf" 8RDEPENDS_${PN} = "grub-common virtual/grub-bootconf"
9 9
10SRC_URI += " \ 10SRC_URI += " \
11 file://cfg \ 11 file://cfg \
@@ -51,22 +51,7 @@ do_mkimage() {
51 51
52addtask mkimage before do_install after do_compile 52addtask mkimage before do_install after do_compile
53 53
54do_mkimage_class-native() { 54do_install() {
55 :
56}
57
58do_install_append_class-target() {
59 install -d ${D}${EFI_FILES_PATH}
60 install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE}
61}
62
63do_install_class-native() {
64 install -d ${D}${bindir}
65 install -m 755 grub-mkimage ${D}${bindir}
66 install -m 755 grub-editenv ${D}${bindir}
67}
68
69do_install_class-target() {
70 oe_runmake 'DESTDIR=${D}' -C grub-core install 55 oe_runmake 'DESTDIR=${D}' -C grub-core install
71 56
72 # Remove build host references... 57 # Remove build host references...
@@ -76,6 +61,9 @@ do_install_class-target() {
76 -e 's|${DEBUG_PREFIX_MAP}||g' \ 61 -e 's|${DEBUG_PREFIX_MAP}||g' \
77 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ 62 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
78 {} + 63 {} +
64
65 install -d ${D}${EFI_FILES_PATH}
66 install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE}
79} 67}
80 68
81do_install_append_aarch64() { 69do_install_append_aarch64() {
@@ -89,10 +77,6 @@ do_deploy() {
89 install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR} 77 install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
90} 78}
91 79
92do_deploy_class-native() {
93 :
94}
95
96addtask deploy after do_install before do_build 80addtask deploy after do_install before do_build
97 81
98FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ 82FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index b3291cb4b8..2024e13782 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -64,7 +64,3 @@ do_configure_prepend() {
64 FROM_BOOTSTRAP=1 ${S}/autogen.sh 64 FROM_BOOTSTRAP=1 ${S}/autogen.sh
65 cd ${B} 65 cd ${B}
66} 66}
67
68RDEPENDS_${PN}_class-native = ""
69
70BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/grub/grub_2.04.bb b/meta/recipes-bsp/grub/grub_2.04.bb
index 9232ea8120..df607cae14 100644
--- a/meta/recipes-bsp/grub/grub_2.04.bb
+++ b/meta/recipes-bsp/grub/grub_2.04.bb
@@ -2,9 +2,12 @@ require grub2.inc
2 2
3RDEPENDS_${PN}-common += "${PN}-editenv" 3RDEPENDS_${PN}-common += "${PN}-editenv"
4RDEPENDS_${PN} += "${PN}-common" 4RDEPENDS_${PN} += "${PN}-common"
5RDEPENDS_${PN}_class-native = ""
5 6
6RPROVIDES_${PN}-editenv += "${PN}-efi-editenv" 7RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
7 8
9PROVIDES_append_class-native = " grub-efi-native"
10
8PACKAGES =+ "${PN}-editenv ${PN}-common" 11PACKAGES =+ "${PN}-editenv ${PN}-common"
9FILES_${PN}-editenv = "${bindir}/grub-editenv" 12FILES_${PN}-editenv = "${bindir}/grub-editenv"
10FILES_${PN}-common = " \ 13FILES_${PN}-common = " \
@@ -31,3 +34,5 @@ do_install_append () {
31 34
32INSANE_SKIP_${PN} = "arch" 35INSANE_SKIP_${PN} = "arch"
33INSANE_SKIP_${PN}-dbg = "arch" 36INSANE_SKIP_${PN}-dbg = "arch"
37
38BBCLASSEXTEND = "native"