From: dbaryshkov@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Subject: [PATCH v3 4/7] grub-efi.bbclass: switch to image-uefi.conf
Date: Wed, 18 Sep 2019 16:12:44 +0300 [thread overview]
Message-ID: <20190918131247.26488-4-dbaryshkov@gmail.com> (raw)
In-Reply-To: <20190918131247.26488-1-dbaryshkov@gmail.com>
From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Use variables from image-uefi.conf instead of hardcoding them in the
class.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
meta/classes/grub-efi-cfg.bbclass | 1 -
meta/classes/grub-efi.bbclass | 20 ++++----------------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass
index f661a69f833a..8b5ff20c72c0 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -23,7 +23,6 @@ GRUB_TIMEOUT ?= "10"
#FIXME: build this from the machine config
GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-EFIDIR = "/EFI/BOOT"
GRUB_ROOT ?= "${ROOT}"
APPEND ?= ""
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index ec692f1646f3..724bbe86842c 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -1,4 +1,5 @@
inherit grub-efi-cfg
+require conf/image-uefi.conf
efi_populate() {
# DEST must be the root of the image so that EFIDIR is not
@@ -7,22 +8,9 @@ efi_populate() {
install -d ${DEST}${EFIDIR}
- GRUB_IMAGE="grub-efi-bootia32.efi"
- DEST_IMAGE="bootia32.efi"
- if [ -n "${MLPREFIX}" ]; then
- if [ "${TARGET_ARCH_MULTILIB_ORIGINAL}" = "x86_64" ]; then
- GRUB_IMAGE="grub-efi-bootx64.efi"
- DEST_IMAGE="bootx64.efi"
- fi
- else
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- GRUB_IMAGE="grub-efi-bootx64.efi"
- DEST_IMAGE="bootx64.efi"
- fi
- fi
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}/${DEST_IMAGE}
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/grub-efi-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
}
@@ -35,7 +23,7 @@ efi_iso_populate() {
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "grub-efi-${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
cp $iso_dir/initrd ${EFIIMGDIR}
fi
--
2.23.0
next prev parent reply other threads:[~2019-09-18 13:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 13:12 [PATCH v3 1/7] image-uefi.conf: add config file holding configuration for UEFI images dbaryshkov
2019-09-18 13:12 ` [PATCH v3 2/7] grub-bootconf: switch to image-uefi.conf dbaryshkov
2019-09-18 13:12 ` [PATCH v3 3/7] grub-efi: " dbaryshkov
2019-09-18 13:12 ` dbaryshkov [this message]
2019-09-18 13:12 ` [PATCH v3 5/7] systemd-boot: " dbaryshkov
2019-09-18 13:12 ` [PATCH v3 6/7] systemd-boot.bbclass: " dbaryshkov
2019-09-18 13:12 ` [PATCH v3 7/7] live-vm-common.bbclass: provide efi population functions for live images dbaryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190918131247.26488-4-dbaryshkov@gmail.com \
--to=dbaryshkov@gmail.com \
--cc=dmitry_eremin-solenikov@mentor.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.