summaryrefslogtreecommitdiffstats
path: root/meta/classes/systemd-boot.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/systemd-boot.bbclass')
-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