mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 15:32:13 +02:00
systemd-boot.bbclass: switch to image-uefi.conf
Use variables from image-uefi.conf instead of hardcoding them in the class. (From OE-Core rev: 094c272a74b4963ea5c010b9701bb83fa799a558) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6501eacfa2
commit
94df595512
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user