summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>2019-09-18 16:12:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 10:54:32 +0100
commit94df595512a4b60279b8bfeef8d625d82495ed59 (patch)
treedf4a9b68569853ad9898352ac084e92f5481d1cb
parent6501eacfa2b23817f6268ec3dd69da7dd3411ca3 (diff)
downloadpoky-94df595512a4b60279b8bfeef8d625d82495ed59.tar.gz
systemd-boot.bbclass: switch to image-uefi.conf
Use variables from image-uefi.conf instead of hardcoding them in the class. (From OE-Core rev: 094c272a74b4963ea5c010b9701bb83fa799a558) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/systemd-boot.bbclass15
1 files changed, 4 insertions, 11 deletions
diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass
index 3cd6811a6c..bb3221dacc 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -11,28 +11,21 @@
11 11
12do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy" 12do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
13 13
14EFIDIR = "/EFI/BOOT" 14require conf/image-uefi.conf
15# Need UUID utility code. 15# Need UUID utility code.
16inherit fs-uuid 16inherit fs-uuid
17 17
18efi_populate() { 18efi_populate() {
19 DEST=$1 19 DEST=$1
20 20
21 EFI_IMAGE="systemd-bootia32.efi"
22 DEST_EFI_IMAGE="bootia32.efi"
23 if [ "${TARGET_ARCH}" = "x86_64" ]; then
24 EFI_IMAGE="systemd-bootx64.efi"
25 DEST_EFI_IMAGE="bootx64.efi"
26 fi
27
28 install -d ${DEST}${EFIDIR} 21 install -d ${DEST}${EFIDIR}
29 # systemd-boot requires these paths for configuration files 22 # systemd-boot requires these paths for configuration files
30 # they are not customizable so no point in new vars 23 # they are not customizable so no point in new vars
31 install -d ${DEST}/loader 24 install -d ${DEST}/loader
32 install -d ${DEST}/loader/entries 25 install -d ${DEST}/loader/entries
33 install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE} 26 install -m 0644 ${DEPLOY_DIR_IMAGE}/systemd-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
34 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') 27 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
35 printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh 28 printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
36 install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf 29 install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
37 for i in ${SYSTEMD_BOOT_ENTRIES}; do 30 for i in ${SYSTEMD_BOOT_ENTRIES}; do
38 install -m 0644 ${i} ${DEST}/loader/entries 31 install -m 0644 ${i} ${DEST}/loader/entries
@@ -47,7 +40,7 @@ efi_iso_populate() {
47 cp -r $iso_dir/loader ${EFIIMGDIR} 40 cp -r $iso_dir/loader ${EFIIMGDIR}
48 cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR} 41 cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
49 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') 42 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
50 echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh 43 echo "fs0:${EFIPATH}\\${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh
51 if [ -f "$iso_dir/initrd" ] ; then 44 if [ -f "$iso_dir/initrd" ] ; then
52 cp $iso_dir/initrd ${EFIIMGDIR} 45 cp $iso_dir/initrd ${EFIIMGDIR}
53 fi 46 fi