From: dbaryshkov@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Subject: [PATCH 3/9] grub-efi: switch to uefi.bbclass
Date: Wed, 11 Sep 2019 12:29:55 +0300 [thread overview]
Message-ID: <20190911093001.7849-3-dbaryshkov@gmail.com> (raw)
In-Reply-To: <20190911093001.7849-1-dbaryshkov@gmail.com>
From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Use variables from uefi.bbclass instead of hardcoding them in the recipe.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
meta/recipes-bsp/grub/grub-efi_2.04.bb | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.04.bb
index aaa198ea23ec..bff3f6c25a20 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.04.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb
@@ -1,5 +1,7 @@
require grub2.inc
+inherit uefi
+
GRUBPLATFORM = "efi"
DEPENDS_append_class-target = " grub-efi-native"
@@ -18,18 +20,15 @@ python __anonymous () {
prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
if target == "x86_64":
grubtarget = 'x86_64'
- grubimage = prefix + "bootx64.efi"
elif re.match('i.86', target):
grubtarget = 'i386'
- grubimage = prefix + "bootia32.efi"
elif re.match('aarch64', target):
grubtarget = 'arm64'
- grubimage = prefix + "bootaa64.efi"
elif re.match('arm', target):
grubtarget = 'arm'
- grubimage = prefix + "bootarm.efi"
else:
raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
+ grubimage = prefix + d.getVar("EFI_BOOT_IMAGE")
d.setVar("GRUB_TARGET", grubtarget)
d.setVar("GRUB_IMAGE", grubimage)
prefix = "grub-efi-" if prefix == "" else ""
@@ -45,7 +44,7 @@ do_mkimage() {
cd ${B}
# Search for the grub.cfg on the local boot media by using the
# built in cfg file provided via this recipe
- grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+ grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \
-O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
${GRUB_BUILDIN}
}
@@ -57,10 +56,8 @@ do_mkimage_class-native() {
}
do_install_append_class-target() {
- install -d ${D}/boot
- install -d ${D}/boot/EFI
- install -d ${D}/boot/EFI/BOOT
- install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
+ install -d ${D}${EFI_FILES_PATH}
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE}
}
do_install_class-native() {
@@ -100,7 +97,7 @@ addtask deploy after do_install before do_build
FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
${datadir}/grub \
- /boot/EFI/BOOT/${GRUB_IMAGE} \
+ ${EFI_FILES_PATH}/${GRUB_IMAGE} \
"
FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi"
--
2.23.0
next prev parent reply other threads:[~2019-09-11 9:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 9:29 [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications dbaryshkov
2019-09-11 9:29 ` [PATCH 2/9] grub-bootconf: switch to uefi.bbclass dbaryshkov
2019-09-11 9:29 ` dbaryshkov [this message]
2019-09-11 9:29 ` [PATCH 4/9] grub-efi.bbclass: " dbaryshkov
2019-09-11 9:29 ` [PATCH 5/9] systemd-boot: " dbaryshkov
2019-09-11 9:29 ` [PATCH 6/9] systemd-boot.bbclass: " dbaryshkov
2019-09-11 9:29 ` [PATCH 7/9] uefi.bbclass: provide efi population functions for live images dbaryshkov
2019-09-11 9:30 ` [PATCH 8/9] grub-efi.bbclass: use efi_*_populate_common dbaryshkov
2019-09-11 9:30 ` [PATCH 9/9] systemd-boot.bbclass: " dbaryshkov
2019-09-12 23:12 ` [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications Mittal, Anuj
2019-09-13 11:59 ` Dmitry Eremin-Solenikov
2019-09-13 2:14 ` Ang, Chin Huat
2019-09-13 12:06 ` Dmitry Eremin-Solenikov
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=20190911093001.7849-3-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.