From: Dmitry Eremin-Solenikov <[email protected]>

Use common code form uefi.bbclass to populate efi directories.

Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
---
 meta/classes/grub-efi.bbclass | 24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 4aa173e23bb1..188515ef9edc 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -1,32 +1,14 @@
 inherit grub-efi-cfg
-require conf/uefi.conf
+inherit uefi
 
 efi_populate() {
-       # DEST must be the root of the image so that EFIDIR is not
-       # nested under a top level directory.
-       DEST=$1
-
-       install -d ${DEST}${EFIDIR}
-
-       install -m 0644 ${DEPLOY_DIR_IMAGE}/grub-efi-${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
+       efi_populate_common "$1" grub-efi
 
        install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
 }
 
 efi_iso_populate() {
-       iso_dir=$1
-       efi_populate $iso_dir
-       # Build a EFI directory to create efi.img
-       mkdir -p ${EFIIMGDIR}/${EFIDIR}
-       cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-       cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
-       EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-       printf 'fs0:%s\%s\n' "$EFIPATH" "grub-efi-${EFI_BOOT_IMAGE}" > 
${EFIIMGDIR}/startup.nsh
-       if [ -f "$iso_dir/initrd" ] ; then
-               cp $iso_dir/initrd ${EFIIMGDIR}
-       fi
+       efi_iso_populate_common "$1"
 }
 
 efi_hddimg_populate() {
-- 
2.23.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to