Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mail.openembedded.org (Postfix) with ESMTP id CD23B6007A for ; Wed, 28 Feb 2018 03:09:25 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 19:09:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="21325737" Received: from clsulliv.jf.intel.com ([10.7.201.36]) by orsmga008.jf.intel.com with ESMTP; 27 Feb 2018 19:09:25 -0800 From: California Sullivan To: openembedded-core@lists.openembedded.org Date: Tue, 27 Feb 2018 19:09:07 -0800 Message-Id: <20180228030918.35934-8-california.l.sullivan@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228030918.35934-1-california.l.sullivan@intel.com> References: <20180228030918.35934-1-california.l.sullivan@intel.com> Subject: [PATCH v2 07/18] grub-efi*.bbclass: don't reference vmlinuz X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 03:09:26 -0000 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 --- meta/classes/grub-efi-cfg.bbclass | 4 +++- meta/classes/grub-efi.bbclass | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass index 730323c72e6..85173c91fc3 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 4b5704c19cc..90badc03a0e 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 -- 2.14.3