diff options
| author | Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> | 2019-09-18 16:12:47 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-19 10:54:32 +0100 |
| commit | 4ad3130c20bfb4eac7c1fd4eedb7d10e49c364c9 (patch) | |
| tree | 37ec412b6b2ad3a9a498af7af03c5488ee302db4 /meta/classes/grub-efi.bbclass | |
| parent | 94df595512a4b60279b8bfeef8d625d82495ed59 (diff) | |
| download | poky-4ad3130c20bfb4eac7c1fd4eedb7d10e49c364c9.tar.gz | |
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>
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
| -rw-r--r-- | meta/classes/grub-efi.bbclass | 28 |
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 | |||
| 2 | require conf/image-uefi.conf | 2 | require conf/image-uefi.conf |
| 3 | 3 | ||
| 4 | efi_populate() { | 4 | efi_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 | |||
| 18 | efi_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 | |||
| 32 | efi_hddimg_populate() { | ||
| 33 | efi_populate $1 | ||
| 34 | } | ||
