summaryrefslogtreecommitdiffstats
path: root/meta/classes/grub-efi.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
-rw-r--r--meta/classes/grub-efi.bbclass28
1 files changed, 1 insertions, 27 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 724bbe8684..8fc6999e52 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -2,33 +2,7 @@ inherit grub-efi-cfg
2require conf/image-uefi.conf 2require conf/image-uefi.conf
3 3
4efi_populate() { 4efi_populate() {
5 # DEST must be the root of the image so that EFIDIR is not 5 efi_populate_common "$1" grub-efi
6 # nested under a top level directory.
7 DEST=$1
8
9 install -d ${DEST}${EFIDIR}
10
11 install -m 0644 ${DEPLOY_DIR_IMAGE}/grub-efi-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
12 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
13 printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
14 6
15 install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg 7 install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
16} 8}
17
18efi_iso_populate() {
19 iso_dir=$1
20 efi_populate $iso_dir
21 # Build a EFI directory to create efi.img
22 mkdir -p ${EFIIMGDIR}/${EFIDIR}
23 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
24 cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
25 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
26 printf 'fs0:%s\%s\n' "$EFIPATH" "grub-efi-${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh
27 if [ -f "$iso_dir/initrd" ] ; then
28 cp $iso_dir/initrd ${EFIIMGDIR}
29 fi
30}
31
32efi_hddimg_populate() {
33 efi_populate $1
34}