grub-efi-native: Install grub-editenv
PATCH 1/1 grub-efi-native: Install grub-editenv
Having a native version of grub-editenv around can be useful for setting the targets grub environment.
--- meta/recipes-bsp/grub/grub-efi_2.02.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-bsp/grub/grub-efi_2.02.bb +1 -0
@@ -70,6 +70,7 @@ do_install_append_class-target() { do_install_class-native() { install -d ${D}${bindir} install -m 755 grub-mkimage ${D}${bindir} + install -m 755 grub-editenv ${D}${bindir} } do_install_class-target() {
Signature · 1 line
2.20.1
grub-efi-native: use RDEPENDS on grub-native instead of duplicating tools?
was: Re: [OE-core] [PATCH] grub-efi-native: Install grub-editenv
Quoted 3 lines · Jacob Kroon
Having a native version of grub-editenv around can be useful for setting the targets grub environment.
Would it be acceptable to replace the tools being packaged in grub-efi-native with a RDEPENDS from grub-efi-native to grub-native, and so use the grub-mkimage and grub-editenv tools from the grub recipe instead?
The problem I'm encountering with the current dual packaging of grub-mkimage and grub-editenv tools, in both grub and grub-efi recipes, is that it prevents grub-native and grub-efi-native from being installed concurrently, and breaks my image build:
ERROR: xen-image-minimal-1.0-r0 do_image_wic: The file /usr/bin/grub-mkimage is installed by both grub-efi-native and grub-native, aborting
There's a wic script here:openembedded-core/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py that may also be affected since it creates a boot partition with both legacy and EFI content.
The patch below resolves the error that I encountered. Does this change look OK?
Christopher
(quoted diff) +0 -0
b/meta/recipes-bsp/grub/grub-efi_2.04.bb
index b9d6225d27..5dd3398540 100644
meta/recipes-bsp/grub/grub-efi_2.04.bb +2 -3
@@ -6,6 +6,7 @@ GRUBPLATFORM = "efi" DEPENDS_append_class-target = " grub-efi-native" RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf" +RDEPENDS_${PN}_class-native = "grub-native" SRC_URI += " \ file://cfg \
@@ -61,9 +62,7 @@ do_install_append_class-target() { } do_install_class-native() { - install -d ${D}${bindir} - install -m 755 grub-mkimage ${D}${bindir} - install -m 755 grub-editenv ${D}${bindir} + : } do_install_class-target() {
Quoted 26 lines
Signed-off-by Jacob Kroon <[email protected]>--- meta/recipes-bsp/grub/grub-efi_2.02.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-bsp/grub/grub-efi_2.02.bb +1
-1@@ -70,6 +70,7 @@ do_install_append_class-target() { do_install_class-native() { install -d ${D}${bindir} install -m 755 grub-mkimage ${D}${bindir} + install -m 755 grub-editenv ${D}${bindir} } do_install_class-target() { --2.20.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: grub-efi-native: use RDEPENDS on grub-native instead of duplicating tools?
Quoted 46 lines · Christopher Clark
was: Re: [OE-core] [PATCH] grub-efi-native: Install grub-editenv
Quoted 3 lines · Jacob Kroon
Having a native version of grub-editenv around can be useful for setting the targets grub environment.
Would it be acceptable to replace the tools being packaged in grub-efi-native with a RDEPENDS from grub-efi-native to grub-native, and so use the grub-mkimage and grub-editenv tools from the grub recipe instead?
The problem I'm encountering with the current dual packaging of grub-mkimage and grub-editenv tools, in both grub and grub-efi recipes, is that it prevents grub-native and grub-efi-native from being installed concurrently, and breaks my image build:
ERROR: xen-image-minimal-1.0-r0
do_image_wic: The file/usr/bin/grub-mkimageis installed by both grub-efi-native and grub-native, abortingThere's a wic script here:
openembedded-core/scripts/lib/wic/plugins/source/bootimg-biosplusefi.pythat may also be affected since it creates a boot partition with both legacy and EFI content.The patch below resolves the error that I encountered. Does this change look OK?
Christopher
meta/recipes-bsp/grub/grub-efi_2.04.bb +1
-0@@ -6,6 +6,7 @@ GRUBPLATFORM = "efi" DEPENDS_append_class-target = " grub-efi-native" RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf" +RDEPENDS_${PN}_class-native = "grub-native" SRC_URI += " \ file://cfg \
meta/recipes-bsp/grub/grub-efi_2.04.bb do_install_append_class-target() { · line 68
Quoted 10 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb +1
-3@@ -61,9 +62,7 @@ do_install_append_class-target() { } do_install_class-native() { - install -d ${D}${bindir} - install -m 755 grub-mkimage ${D}${bindir} - install -m 755 grub-editenv ${D}${bindir} + : } do_install_class-target() {
This change looks good to me. I added 'grub-editenv' before realizing that the tools were duplicated in 'grub', and I believe they are interchangeable.
Jacob
Re: grub-efi-native: use RDEPENDS on grub-native instead of duplicating tools?
Quoted 55 lines · Jacob Kroon
Quoted 54 lines · Christopher Clark
was: Re: [OE-core] [PATCH] grub-efi-native: Install grub-editenv
Quoted 3 lines · Jacob Kroon
Having a native version of grub-editenv around can be useful for setting the targets grub environment.
Would it be acceptable to replace the tools being packaged in grub-efi-native with a RDEPENDS from grub-efi-native to grub-native, and so use the grub-mkimage and grub-editenv tools from the grub recipe instead?
The problem I'm encountering with the current dual packaging of grub-mkimage and grub-editenv tools, in both grub and grub-efi recipes, is that it prevents grub-native and grub-efi-native from being installed concurrently, and breaks my image build:
ERROR: xen-image-minimal-1.0-r0
do_image_wic: The file/usr/bin/grub-mkimageis installed by both grub-efi-native and grub-native, abortingThere's a wic script here:
openembedded-core/scripts/lib/wic/plugins/source/bootimg-biosplusefi.pythat may also be affected since it creates a boot partition with both legacy and EFI content.The patch below resolves the error that I encountered. Does this change look OK?
Christopher
meta/recipes-bsp/grub/grub-efi_2.04.bb +0
-0@@ -6,6 +6,7 @@ GRUBPLATFORM = "efi"DEPENDS_append_class-target = " grub-efi-native" RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf" +RDEPENDS_${PN}_class-native = "grub-native"
SRC_URI+= " \
file://cfg \meta/recipes-bsp/grub/grub-efi_2.04.bb +1
-3@@ -61,9 +62,7 @@ do_install_append_class-target() { } do_install_class-native() { - install -d ${D}${bindir} - install -m 755 grub-mkimage ${D}${bindir} - install -m 755 grub-editenv ${D}${bindir} + : }
Quoted 5 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb do_install_append_class-target() { · line 68
Quoted 2 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb +0
-0do_install_class-target() {This change looks good to me. I added 'grub-editenv' before realizing that the tools were duplicated in 'grub', and I believe they are interchangeable.
.. but this make grub-efi-native's sysroot empty in my build. Which then begs the question whether a native version of grub-efi is necessary at all ?
Jacob
Re: grub-efi-native: use RDEPENDS on grub-native instead of duplicating tools?
Quoted 72 lines · Jacob Kroon
Quoted 62 lines · Jacob Kroon
Quoted 61 lines · Christopher Clark
was: Re: [OE-core] [PATCH] grub-efi-native: Install grub-editenv
Quoted 3 lines · Jacob Kroon
Having a native version of grub-editenv around can be useful for
setting the targets grub environment.Would it be acceptable to replace the tools being packaged in grub-efi-native with a RDEPENDS from grub-efi-native to grub- native,
and so use the grub-mkimage and grub-editenv tools from the grub recipe instead?The problem I'm encountering with the current dual packaging of grub-mkimage and grub-editenv tools, in both grub and grub-efi recipes, is that it prevents grub-native and grub-efi-native from being installed concurrently, and breaks my image build:
ERROR: xen-image-minimal-1.0-r0
do_image_wic: The file/usr/bin/grub-mkimageis installed by both grub-efi-native and grub-native, abortingThere's a wic script here:
openembedded-core/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
that may also be affected since it creates a boot partition with both
legacy and EFI content.The patch below resolves the error that I encountered. Does this change look OK?
Christopher
meta/recipes-bsp/grub/grub-efi_2.04.bb +0
-0@@ -6,6 +6,7 @@ GRUBPLATFORM = "efi" DEPENDS_append_class-target = " grub-efi-native" RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf"
meta/recipes-bsp/grub/grub-efi_2.04.bb +2
-3+RDEPENDS_${PN}_class-native = "grub-native" SRC_URI += " \ file://cfg \@@ -61,9 +62,7 @@ do_install_append_class-target() { } do_install_class-native() { - install -d ${D}${bindir} - install -m 755 grub-mkimage ${D}${bindir} - install -m 755 grub-editenv ${D}${bindir} + : }Quoted 8 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb do_install_append_class-target() { · line 68
Quoted 2 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb +0
-0do_install_class-target() {This change looks good to me. I added 'grub-editenv' before realizing
that the tools were duplicated in 'grub', and I believe they are interchangeable.
Quoted 4 lines
.. but this make grub-efi-native's sysroot empty in my build. Which then
begs the question whether a native version of grub-efi is necessary at all ?
If someone can confirm these tools are the same and have no difference in functionality, then yes, grub-native and grub-efi-native should be merged.
Cheers,
Richard
Re: grub-efi-native: use RDEPENDS on grub-native instead of duplicating tools?
Quoted 74 lines · Richard Purdie
Quoted 72 lines · Jacob Kroon
Quoted 70 lines · Jacob Kroon
Quoted 53 lines · Christopher Clark
was: Re: [OE-core] [PATCH] grub-efi-native: Install grub-editenv
Quoted 3 lines · Jacob Kroon
Having a native version of grub-editenv around can be useful for
setting the targets grub environment.Would it be acceptable to replace the tools being packaged in grub-efi-native with a RDEPENDS from grub-efi-native to grub- native,
and so use the grub-mkimage and grub-editenv tools from the grub recipe instead?The problem I'm encountering with the current dual packaging of grub-mkimage and grub-editenv tools, in both grub and grub-efi recipes, is that it prevents grub-native and grub-efi-native from being installed concurrently, and breaks my image build:
ERROR: xen-image-minimal-1.0-r0
do_image_wic: The file/usr/bin/grub-mkimageis installed by both grub-efi-native and grub-native, abortingThere's a wic script here:
openembedded-core/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
that may also be affected since it creates a boot partition with both
legacy and EFI content.The patch below resolves the error that I encountered. Does this change look OK?
Christopher
meta/recipes-bsp/grub/grub-efi_2.04.bb +0
-0@@ -6,6 +6,7 @@ GRUBPLATFORM = "efi" DEPENDS_append_class-target = " grub-efi-native" RDEPENDS_${PN}_class-target = "grub-common virtual/grub-bootconf"
meta/recipes-bsp/grub/grub-efi_2.04.bb +1
-0+RDEPENDS_${PN}_class-native = "grub-native" SRC_URI += " \ file://cfg \meta/recipes-bsp/grub/grub-efi_2.04.bb do_install_append_class-target() { · line 68
Quoted 10 lines
meta/recipes-bsp/grub/grub-efi_2.04.bb +1
-3@@ -61,9 +62,7 @@ do_install_append_class-target() { } do_install_class-native() { - install -d ${D}${bindir} - install -m 755 grub-mkimage ${D}${bindir} - install -m 755 grub-editenv ${D}${bindir} + : } do_install_class-target() {This change looks good to me. I added 'grub-editenv' before realizing
that the tools were duplicated in 'grub', and I believe they are interchangeable.
Quoted 4 lines
Quoted 4 lines
.. but this make grub-efi-native's sysroot empty in my build. Which then
begs the question whether a native version of grub-efi is necessary at all ?
That is a fair question. I don't know of a reason for it to remain, other than perhaps to ease transition to use of grub-native instead?
Quoted 3 lines
If someone can confirm these tools are the same and have no difference in functionality, then yes, grub-native and grub-efi-native should be merged.
The two binaries currently installed in grub-efi-native are:
- grub-editenv
- grub-mkimage
In my local build: The grub-editenv binary is identical when built with either grub-native or grub-efi-native recipe.
The grub-mkimage binary produced is almost identical (compared via objdump) and the differences appear to be due to the slightly different filesystem paths that are recorded via the GRUB_PKGLIBDIR argument that is passed into compilation. Running 'strings grub-mkimage | grep recipe-sysroot' shows four filesystem paths that refer to the native build directory, and these paths differ slightly between the two recipe builds.
Based on that, I believe that these tools are the same and have no difference in functionality; so it looks OK to retire the grub-efi-native versions in favour of grub-native.
Christopher