summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-09-17 13:32:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-30 22:11:55 +0100
commit197f1fe1cc453b60367d50471f15a7580633e763 (patch)
tree54d5637bdc9755a558cb972def14cfb294edf89c
parentbb8e360657dbcd6b94d13d8d1c1a21505ca4982e (diff)
downloadpoky-197f1fe1cc453b60367d50471f15a7580633e763.tar.gz
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] (From OE-Core rev: 0bc0762a479b5182a07fccb2b1e9cd5fc15ca485) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/grub/files/cfg2
-rw-r--r--meta/recipes-bsp/grub/grub-efi-native_2.00.bb7
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 0000000000..ffffe47638
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/cfg
@@ -0,0 +1,2 @@
1search.file /EFI/BOOT/grub.cfg root
2set 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 2d3d68a9b8..04973b524f 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"
23PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native" 23PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
24 24
25SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 25SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
26 file://cfg \
26 file://grub-2.00-fpmath-sse-387-fix.patch \ 27 file://grub-2.00-fpmath-sse-387-fix.patch \
27 file://grub-2.00-fix-enable_execute_stack-check.patch \ 28 file://grub-2.00-fix-enable_execute_stack-check.patch \
28 file://grub-2.00-disable-help2man.patch \ 29 file://grub-2.00-disable-help2man.patch \
@@ -66,9 +67,11 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
66 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" 67 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
67 68
68do_mkimage() { 69do_mkimage() {
69 ./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \ 70 # Search for the grub.cfg on the local boot media by using the
71 # built in cfg file provided via this recipe
72 ./grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
70 -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \ 73 -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
71 boot linux ext2 fat serial part_msdos part_gpt normal efi_gop 74 boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
72} 75}
73addtask mkimage after do_compile before do_install 76addtask mkimage after do_compile before do_install
74 77