diff options
Diffstat (limited to 'meta/classes/live-vm-common.bbclass')
-rw-r--r-- | meta/classes/live-vm-common.bbclass | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/classes/live-vm-common.bbclass b/meta/classes/live-vm-common.bbclass index 68105d9b84..74e7074a53 100644 --- a/meta/classes/live-vm-common.bbclass +++ b/meta/classes/live-vm-common.bbclass | |||
@@ -29,6 +29,39 @@ def pcbios(d): | |||
29 | PCBIOS = "${@pcbios(d)}" | 29 | PCBIOS = "${@pcbios(d)}" |
30 | PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS') == '1']}" | 30 | PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS') == '1']}" |
31 | 31 | ||
32 | # efi_populate_common DEST BOOTLOADER | ||
33 | efi_populate_common() { | ||
34 | # DEST must be the root of the image so that EFIDIR is not | ||
35 | # nested under a top level directory. | ||
36 | DEST=$1 | ||
37 | |||
38 | install -d ${DEST}${EFIDIR} | ||
39 | |||
40 | install -m 0644 ${DEPLOY_DIR_IMAGE}/$2-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE} | ||
41 | EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') | ||
42 | printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh | ||
43 | } | ||
44 | |||
45 | efi_iso_populate() { | ||
46 | iso_dir=$1 | ||
47 | efi_populate $iso_dir | ||
48 | # Build a EFI directory to create efi.img | ||
49 | mkdir -p ${EFIIMGDIR}/${EFIDIR} | ||
50 | cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} | ||
51 | cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} | ||
52 | |||
53 | EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') | ||
54 | printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${EFIIMGDIR}/startup.nsh | ||
55 | |||
56 | if [ -f "$iso_dir/initrd" ] ; then | ||
57 | cp $iso_dir/initrd ${EFIIMGDIR} | ||
58 | fi | ||
59 | } | ||
60 | |||
61 | efi_hddimg_populate() { | ||
62 | efi_populate $1 | ||
63 | } | ||
64 | |||
32 | inherit ${EFI_CLASS} | 65 | inherit ${EFI_CLASS} |
33 | inherit ${PCBIOS_CLASS} | 66 | inherit ${PCBIOS_CLASS} |
34 | 67 | ||