[oe-commits] Jason Wessel : grub-efi-native: Add support for EFI ISO images

git at git.openembedded.org git at git.openembedded.org
Wed Sep 25 16:37:06 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 8c69a4b74d6a339cb88176b8070c4546ef40ddcd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8c69a4b74d6a339cb88176b8070c4546ef40ddcd

Author: Jason Wessel <jason.wessel at windriver.com>
Date:   Tue Sep 17 13:32:12 2013 +0000

grub-efi-native: Add support for EFI ISO images

The iso9660 file system support needs to be added to grub in order to
be able to correctly find the grub.cfg.  The grub commands to locate
the grub.cfg also needs to be encoded into grub's default
configuration.

This change allows the resulting grub binary to work both in the hard
drive / USB boot case or the optical media boot case.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
Reviewed-by: Darren Hart <dvhart at linux.intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-bsp/grub/files/cfg               |    2 ++
 meta/recipes-bsp/grub/grub-efi-native_2.00.bb |    7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/grub/files/cfg b/meta/recipes-bsp/grub/files/cfg
new file mode 100644
index 0000000..ffffe47
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/cfg
@@ -0,0 +1,2 @@
+search.file /EFI/BOOT/grub.cfg root
+set prefix=($root)/EFI/BOOT
diff --git a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
index 2d3d68a..04973b5 100644
--- a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
@@ -23,6 +23,7 @@ PR = "r2"
 PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+           file://cfg \
            file://grub-2.00-fpmath-sse-387-fix.patch \
            file://grub-2.00-fix-enable_execute_stack-check.patch \
            file://grub-2.00-disable-help2man.patch \
@@ -66,9 +67,11 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
 do_mkimage() {
-	./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \
+	# Search for the grub.cfg on the local boot media by using the
+	# built in cfg file provided via this recipe
+	./grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
 	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
-	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop
+	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
 }
 addtask mkimage after do_compile before do_install
 



More information about the Openembedded-commits mailing list