From: dbaryshkov@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Subject: [PATCH v3 6/9] systemd-boot.bbclass: switch to uefi.conf
Date: Tue, 17 Sep 2019 18:36:10 +0300 [thread overview]
Message-ID: <20190917153613.4954-6-dbaryshkov@gmail.com> (raw)
In-Reply-To: <20190917153613.4954-1-dbaryshkov@gmail.com>
From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
Use variables from uefi.conf instead of hardcoding them in the class.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
meta/classes/systemd-boot.bbclass | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass
index 3cd6811a6ce1..47f2adcd7744 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -11,28 +11,21 @@
do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
-EFIDIR = "/EFI/BOOT"
+require conf/uefi.conf
# Need UUID utility code.
inherit fs-uuid
efi_populate() {
DEST=$1
- EFI_IMAGE="systemd-bootia32.efi"
- DEST_EFI_IMAGE="bootia32.efi"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- EFI_IMAGE="systemd-bootx64.efi"
- DEST_EFI_IMAGE="bootx64.efi"
- fi
-
install -d ${DEST}${EFIDIR}
# systemd-boot requires these paths for configuration files
# they are not customizable so no point in new vars
install -d ${DEST}/loader
install -d ${DEST}/loader/entries
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/systemd-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
for i in ${SYSTEMD_BOOT_ENTRIES}; do
install -m 0644 ${i} ${DEST}/loader/entries
@@ -47,7 +40,7 @@ efi_iso_populate() {
cp -r $iso_dir/loader ${EFIIMGDIR}
cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
+ echo "fs0:${EFIPATH}\\${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-17 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 15:36 [PATCH v3 1/9] uefi.conf: add config file holding configuration for UEFI applications dbaryshkov
2019-09-17 15:36 ` [PATCH v3 2/9] grub-bootconf: switch to uefi.conf dbaryshkov
2019-09-17 15:36 ` [PATCH v3 3/9] grub-efi: " dbaryshkov
2019-09-17 15:36 ` [PATCH v3 4/9] grub-efi.bbclass: " dbaryshkov
2019-09-17 15:36 ` [PATCH v3 5/9] systemd-boot: " dbaryshkov
2019-09-17 15:36 ` dbaryshkov [this message]
2019-09-17 15:36 ` [PATCH v3 7/9] uefi.bbclass: provide efi population functions for live images dbaryshkov
2019-09-17 15:36 ` [PATCH v3 8/9] grub-efi.bbclass: use efi_*_populate_common dbaryshkov
2019-09-17 15:36 ` [PATCH v3 9/9] systemd-boot.bbclass: " dbaryshkov
2019-09-17 22:16 ` [PATCH v3 1/9] uefi.conf: add config file holding configuration for UEFI applications Richard Purdie
2019-09-18 9:04 ` Dmitry Eremin-Solenikov
2019-09-18 12:37 ` richard.purdie
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=20190917153613.4954-6-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox