summaryrefslogtreecommitdiff
path: root/meta/classes/grub-efi.bbclass
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-12-15 22:12:28 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-16 15:33:34 +0000
commitbadf0504f5ed4c5e48607922ac15c56463ad09ef (patch)
tree0c14bb204b9f53b62b94cfe65b82708f93ab8c59 /meta/classes/grub-efi.bbclass
parent0eb139619301d0efee330932eba3617dcb39284e (diff)
downloadopenembedded-core-badf0504f5ed4c5e48607922ac15c56463ad09ef.tar.gz
openembedded-core-badf0504f5ed4c5e48607922ac15c56463ad09ef.tar.bz2
openembedded-core-badf0504f5ed4c5e48607922ac15c56463ad09ef.tar.xz
openembedded-core-badf0504f5ed4c5e48607922ac15c56463ad09ef.zip
grub-efi: Use /EFI/BOOT now that mkdosfs -d works with directories
[Yocto 1783] prevented us from using a proper /EFI/BOOT path in the live images due to a bug in the -d patch for mkdosfs in dosfstools. With this now fixed, we can place the efi payload where it belongs per spec and the images will autoboot to the grub menu on EFI platforms. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
-rw-r--r--meta/classes/grub-efi.bbclass18
1 files changed, 3 insertions, 15 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 36b583111..762322b28 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -21,10 +21,8 @@ GRUB_TIMEOUT ?= "10"
#FIXME: build this from the machine config
GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-# FIXME: add EFI/BOOT to GRUB_HDDDIR once the mkdosfs subdir bug is resolved
-# http://bugzilla.yoctoproject.org/show_bug.cgi?id=1783
EFIDIR = "/EFI/BOOT"
-GRUB_HDDDIR = "${HDDDIR}"
+GRUB_HDDDIR = "${HDDDIR}${EFIDIR}"
GRUB_ISODIR = "${ISODIR}${EFIDIR}"
grubefi_populate() {
@@ -53,22 +51,12 @@ grubefi_populate() {
grubefi_iso_populate() {
grubefi_populate ${GRUB_ISODIR}
-
- # FIXUP the <EFIDIR> token in the config
- # FIXME: This can be dropped once mkdosfs is fixed
- sed -i "s@<EFIDIR>@${EFIDIR}@g" ${GRUB_ISODIR}/$(basename "${GRUBCFG}")
}
grubefi_hddimg_populate() {
grubefi_populate ${GRUB_HDDDIR}
-
- # FIXUP the <EFIDIR> token in the config
- # FIXME: This can be dropped once mkdosfs is fixed
- sed -i "s@<EFIDIR>@@g" ${GRUB_HDDDIR}/$(basename "${GRUBCFG}")
}
-# FIXME: The <EFIDIR> token can be replaced with ${EFIDIR} once the
-# mkdosfs bug is resolved.
python build_grub_cfg() {
import sys
@@ -121,7 +109,7 @@ python build_grub_cfg() {
bb.data.update_data(localdata)
cfgfile.write('\nmenuentry \'%s\'{\n' % (label))
- cfgfile.write('linux <EFIDIR>/vmlinuz LABEL=%s' % (label))
+ cfgfile.write('linux ${EFIDIR}/vmlinuz LABEL=%s' % (label))
append = localdata.getVar('APPEND', True)
initrd = localdata.getVar('INITRD', True)
@@ -131,7 +119,7 @@ python build_grub_cfg() {
cfgfile.write('\n')
if initrd:
- cfgfile.write('initrd <EFIDIR>/initrd')
+ cfgfile.write('initrd ${EFIDIR}/initrd')
cfgfile.write('\n}\n')
cfgfile.close()