mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 00:32:12 +02:00
live-vm-common.bbclass: provide efi population functions for live images
Define common functions for populating EFI directories in live image by reusing common code from grub-efi and systemd-boot bbclasses. (From OE-Core rev: 3728899a0cd543793db258da0976362b4bde7133) 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
94df595512
commit
4ad3130c20
@@ -16,38 +16,20 @@ require conf/image-uefi.conf
|
||||
inherit fs-uuid
|
||||
|
||||
efi_populate() {
|
||||
DEST=$1
|
||||
efi_populate_common "$1" systemd
|
||||
|
||||
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}/systemd-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
|
||||
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
|
||||
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
|
||||
done
|
||||
}
|
||||
|
||||
efi_iso_populate() {
|
||||
iso_dir=$1
|
||||
efi_populate $iso_dir
|
||||
mkdir -p ${EFIIMGDIR}/${EFIDIR}
|
||||
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
|
||||
efi_iso_populate_append() {
|
||||
cp -r $iso_dir/loader ${EFIIMGDIR}
|
||||
cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
|
||||
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
|
||||
echo "fs0:${EFIPATH}\\${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh
|
||||
if [ -f "$iso_dir/initrd" ] ; then
|
||||
cp $iso_dir/initrd ${EFIIMGDIR}
|
||||
fi
|
||||
}
|
||||
|
||||
efi_hddimg_populate() {
|
||||
efi_populate $1
|
||||
}
|
||||
|
||||
inherit systemd-boot-cfg
|
||||
|
||||
Reference in New Issue
Block a user