Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | # Copyright (C) 2016 Intel Corporation |
| 2 | # |
| 3 | # Released under the MIT license (see COPYING.MIT) |
| 4 | |
| 5 | # systemd-boot.bbclass - The "systemd-boot" is essentially the gummiboot merged into systemd. |
| 6 | # The original standalone gummiboot project is dead without any more |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 7 | # maintenance. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 8 | # |
| 9 | # Set EFI_PROVIDER = "systemd-boot" to use systemd-boot on your live images instead of grub-efi |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | # (images built by image-live.bbclass) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 11 | |
| 12 | do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 13 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 14 | require conf/image-uefi.conf |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 15 | # Need UUID utility code. |
| 16 | inherit fs-uuid |
| 17 | |
| 18 | efi_populate() { |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 19 | efi_populate_common "$1" systemd |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 20 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 21 | # systemd-boot requires these paths for configuration files |
| 22 | # they are not customizable so no point in new vars |
| 23 | install -d ${DEST}/loader |
| 24 | install -d ${DEST}/loader/entries |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 25 | install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf |
| 26 | for i in ${SYSTEMD_BOOT_ENTRIES}; do |
| 27 | install -m 0644 ${i} ${DEST}/loader/entries |
| 28 | done |
| 29 | } |
| 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | efi_iso_populate:append() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 32 | cp -r $iso_dir/loader ${EFIIMGDIR} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 33 | } |
| 34 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | inherit systemd-boot-cfg |