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/systemd-boot.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/systemd-boot.bbclass')
-rw-r--r-- | meta/classes/systemd-boot.bbclass | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass index bb3221dacc..336c4c2ff5 100644 --- a/meta/classes/systemd-boot.bbclass +++ b/meta/classes/systemd-boot.bbclass | |||
@@ -16,38 +16,20 @@ require conf/image-uefi.conf | |||
16 | inherit fs-uuid | 16 | inherit fs-uuid |
17 | 17 | ||
18 | efi_populate() { | 18 | efi_populate() { |
19 | DEST=$1 | 19 | efi_populate_common "$1" systemd |
20 | 20 | ||
21 | install -d ${DEST}${EFIDIR} | ||
22 | # systemd-boot requires these paths for configuration files | 21 | # systemd-boot requires these paths for configuration files |
23 | # they are not customizable so no point in new vars | 22 | # they are not customizable so no point in new vars |
24 | install -d ${DEST}/loader | 23 | install -d ${DEST}/loader |
25 | install -d ${DEST}/loader/entries | 24 | install -d ${DEST}/loader/entries |
26 | install -m 0644 ${DEPLOY_DIR_IMAGE}/systemd-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE} | ||
27 | EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') | ||
28 | printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh | ||
29 | install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf | 25 | install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf |
30 | for i in ${SYSTEMD_BOOT_ENTRIES}; do | 26 | for i in ${SYSTEMD_BOOT_ENTRIES}; do |
31 | install -m 0644 ${i} ${DEST}/loader/entries | 27 | install -m 0644 ${i} ${DEST}/loader/entries |
32 | done | 28 | done |
33 | } | 29 | } |
34 | 30 | ||
35 | efi_iso_populate() { | 31 | efi_iso_populate_append() { |
36 | iso_dir=$1 | ||
37 | efi_populate $iso_dir | ||
38 | mkdir -p ${EFIIMGDIR}/${EFIDIR} | ||
39 | cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} | ||
40 | cp -r $iso_dir/loader ${EFIIMGDIR} | 32 | cp -r $iso_dir/loader ${EFIIMGDIR} |
41 | cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} | ||
42 | EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') | ||
43 | echo "fs0:${EFIPATH}\\${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh | ||
44 | if [ -f "$iso_dir/initrd" ] ; then | ||
45 | cp $iso_dir/initrd ${EFIIMGDIR} | ||
46 | fi | ||
47 | } | ||
48 | |||
49 | efi_hddimg_populate() { | ||
50 | efi_populate $1 | ||
51 | } | 33 | } |
52 | 34 | ||
53 | inherit systemd-boot-cfg | 35 | inherit systemd-boot-cfg |