summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>2019-09-18 16:12:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 10:54:26 +0100
commit094c272a74b4963ea5c010b9701bb83fa799a558 (patch)
tree3bf529c27302b6af87bb79d7981dff7dea8fdb28
parent4acac3560cb819e0cd992e02441621dab1beada7 (diff)
downloadopenembedded-core-contrib-094c272a74b4963ea5c010b9701bb83fa799a558.tar.gz
openembedded-core-contrib-094c272a74b4963ea5c010b9701bb83fa799a558.tar.bz2
openembedded-core-contrib-094c272a74b4963ea5c010b9701bb83fa799a558.zip
systemd-boot.bbclass: switch to image-uefi.conf
Use variables from image-uefi.conf instead of hardcoding them in the class. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/systemd-boot.bbclass15
1 files changed, 4 insertions, 11 deletions
diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass
index 3cd6811a6c..bb3221dacc 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/image-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