summaryrefslogtreecommitdiffstats
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:35:42 -0800
commitb6e36c019777b6049be09ba9b646a37aba588100 (patch)
tree72b53d96111c2de43e1d6c3c33c0dcfd3387ff8c
parent9703185a83432ed78ed42a431ea479a4a11fefbf (diff)
downloadpoky-b6e36c019777b6049be09ba9b646a37aba588100.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. (From OE-Core rev: d37be17527b354fddb3a5740d0197c590d620f42) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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"
22GRUB_TIMEOUT ?= "10" 22GRUB_TIMEOUT ?= "10"
23#FIXME: build this from the machine config 23#FIXME: build this from the machine config
24GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" 24GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
25KERNEL_IMAGETYPE ??= "bzImage"
25 26
26EFIDIR = "/EFI/BOOT" 27EFIDIR = "/EFI/BOOT"
27GRUB_ROOT ?= "${ROOT}" 28GRUB_ROOT ?= "${ROOT}"
@@ -97,7 +98,8 @@ python build_efi_cfg() {
97 lb = label 98 lb = label
98 if label == "install": 99 if label == "install":
99 lb = "install-efi" 100 lb = "install-efi"
100 cfgfile.write('linux /vmlinuz LABEL=%s' % (lb)) 101 kernel = localdata.getVar('KERNEL_IMAGETYPE')
102 cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
101 103
102 cfgfile.write(' %s' % replace_rootfs_uuid(d, root)) 104 cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
103 105
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() {
26 # Build a EFI directory to create efi.img 26 # Build a EFI directory to create efi.img
27 mkdir -p ${EFIIMGDIR}/${EFIDIR} 27 mkdir -p ${EFIIMGDIR}/${EFIDIR}
28 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} 28 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
29 cp $iso_dir/vmlinuz ${EFIIMGDIR} 29 cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
30 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') 30 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
31 printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh 31 printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
32 if [ -f "$iso_dir/initrd" ] ; then 32 if [ -f "$iso_dir/initrd" ] ; then