aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-02-28 18:15:04 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:23:06 -0800
commitd37be17527b354fddb3a5740d0197c590d620f42 (patch)
treee60e432ab7ba5b4ff3e5026be5c88de1cf97ef2f /meta/classes
parent5493bb5ba4b4520f944d38b214a3d53a5282e0be (diff)
downloadopenembedded-core-contrib-d37be17527b354fddb3a5740d0197c590d620f42.tar.gz
grub-efi*.bbclass: don't reference vmlinuz
Rather than renaming the kernel to vmlinuz and assuming the name is vmlinuz in the grub.cfg, copy to ${KERNEL_IMAGETYPE} and also use that value in the grub.cfg file. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/grub-efi-cfg.bbclass4
-rw-r--r--meta/classes/grub-efi.bbclass2
2 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass
index 730323c72e..85173c91fc 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -22,6 +22,7 @@ GRUB_CFG_LIVE = "${S}/grub_live.cfg"
GRUB_TIMEOUT ?= "10"
#FIXME: build this from the machine config
GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+KERNEL_IMAGETYPE ??= "bzImage"
EFIDIR = "/EFI/BOOT"
GRUB_ROOT ?= "${ROOT}"
@@ -97,7 +98,8 @@ python build_efi_cfg() {
lb = label
if label == "install":
lb = "install-efi"
- cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
+ kernel = localdata.getVar('KERNEL_IMAGETYPE')
+ cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 4b5704c19c..90badc03a0 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -26,7 +26,7 @@ efi_iso_populate() {
# Build a EFI directory to create efi.img
mkdir -p ${EFIIMGDIR}/${EFIDIR}
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
+ cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then