diff options
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
| -rw-r--r-- | meta/classes/grub-efi.bbclass | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass index 36b583111a..762322b28e 100644 --- a/meta/classes/grub-efi.bbclass +++ b/meta/classes/grub-efi.bbclass | |||
| @@ -21,10 +21,8 @@ GRUB_TIMEOUT ?= "10" | |||
| 21 | #FIXME: build this from the machine config | 21 | #FIXME: build this from the machine config |
| 22 | GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" | 22 | GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" |
| 23 | 23 | ||
| 24 | # FIXME: add EFI/BOOT to GRUB_HDDDIR once the mkdosfs subdir bug is resolved | ||
| 25 | # http://bugzilla.yoctoproject.org/show_bug.cgi?id=1783 | ||
| 26 | EFIDIR = "/EFI/BOOT" | 24 | EFIDIR = "/EFI/BOOT" |
| 27 | GRUB_HDDDIR = "${HDDDIR}" | 25 | GRUB_HDDDIR = "${HDDDIR}${EFIDIR}" |
| 28 | GRUB_ISODIR = "${ISODIR}${EFIDIR}" | 26 | GRUB_ISODIR = "${ISODIR}${EFIDIR}" |
| 29 | 27 | ||
| 30 | grubefi_populate() { | 28 | grubefi_populate() { |
| @@ -53,22 +51,12 @@ grubefi_populate() { | |||
| 53 | 51 | ||
| 54 | grubefi_iso_populate() { | 52 | grubefi_iso_populate() { |
| 55 | grubefi_populate ${GRUB_ISODIR} | 53 | grubefi_populate ${GRUB_ISODIR} |
| 56 | |||
| 57 | # FIXUP the <EFIDIR> token in the config | ||
| 58 | # FIXME: This can be dropped once mkdosfs is fixed | ||
| 59 | sed -i "s@<EFIDIR>@${EFIDIR}@g" ${GRUB_ISODIR}/$(basename "${GRUBCFG}") | ||
| 60 | } | 54 | } |
| 61 | 55 | ||
| 62 | grubefi_hddimg_populate() { | 56 | grubefi_hddimg_populate() { |
| 63 | grubefi_populate ${GRUB_HDDDIR} | 57 | grubefi_populate ${GRUB_HDDDIR} |
| 64 | |||
| 65 | # FIXUP the <EFIDIR> token in the config | ||
| 66 | # FIXME: This can be dropped once mkdosfs is fixed | ||
| 67 | sed -i "s@<EFIDIR>@@g" ${GRUB_HDDDIR}/$(basename "${GRUBCFG}") | ||
| 68 | } | 58 | } |
| 69 | 59 | ||
| 70 | # FIXME: The <EFIDIR> token can be replaced with ${EFIDIR} once the | ||
| 71 | # mkdosfs bug is resolved. | ||
| 72 | python build_grub_cfg() { | 60 | python build_grub_cfg() { |
| 73 | import sys | 61 | import sys |
| 74 | 62 | ||
| @@ -121,7 +109,7 @@ python build_grub_cfg() { | |||
| 121 | bb.data.update_data(localdata) | 109 | bb.data.update_data(localdata) |
| 122 | 110 | ||
| 123 | cfgfile.write('\nmenuentry \'%s\'{\n' % (label)) | 111 | cfgfile.write('\nmenuentry \'%s\'{\n' % (label)) |
| 124 | cfgfile.write('linux <EFIDIR>/vmlinuz LABEL=%s' % (label)) | 112 | cfgfile.write('linux ${EFIDIR}/vmlinuz LABEL=%s' % (label)) |
| 125 | 113 | ||
| 126 | append = localdata.getVar('APPEND', True) | 114 | append = localdata.getVar('APPEND', True) |
| 127 | initrd = localdata.getVar('INITRD', True) | 115 | initrd = localdata.getVar('INITRD', True) |
| @@ -131,7 +119,7 @@ python build_grub_cfg() { | |||
| 131 | cfgfile.write('\n') | 119 | cfgfile.write('\n') |
| 132 | 120 | ||
| 133 | if initrd: | 121 | if initrd: |
| 134 | cfgfile.write('initrd <EFIDIR>/initrd') | 122 | cfgfile.write('initrd ${EFIDIR}/initrd') |
| 135 | cfgfile.write('\n}\n') | 123 | cfgfile.write('\n}\n') |
| 136 | 124 | ||
| 137 | cfgfile.close() | 125 | cfgfile.close() |
