diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2019-10-22 23:54:16 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2019-10-22 23:54:16 +0300 |
commit | 9722c6ee87766a45a337c094d1293de81cdcb106 (patch) | |
tree | 08b57716ae3c02fef2bc870b634019e692fd70e6 /poky/meta/classes/live-vm-common.bbclass | |
parent | 35e295e2a161fcf146ea031de53431b2888521fa (diff) | |
parent | 5b6cc97bf138293b6af12d5d3003bb66c700c48a (diff) | |
download | openbmc-9722c6ee87766a45a337c094d1293de81cdcb106.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into HEAD
Diffstat (limited to 'poky/meta/classes/live-vm-common.bbclass')
-rw-r--r-- | poky/meta/classes/live-vm-common.bbclass | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/poky/meta/classes/live-vm-common.bbclass b/poky/meta/classes/live-vm-common.bbclass index 68105d9b8..74e7074a5 100644 --- a/poky/meta/classes/live-vm-common.bbclass +++ b/poky/meta/classes/live-vm-common.bbclass @@ -29,6 +29,39 @@ def pcbios(d): PCBIOS = "${@pcbios(d)}" PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS') == '1']}" +# efi_populate_common DEST BOOTLOADER +efi_populate_common() { + # 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}/$2-${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_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" "${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 ${EFI_CLASS} inherit ${PCBIOS_CLASS} |