aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/images/core-bootfs-systemd-boot.bb
blob: 82592a58eb5533881e2c7c07fa98e6ef93331f00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Simple initramfs image. Mostly used for live images.
DESCRIPTION = "Systemd-boot based EFI system"
LICENSE = "MIT"

inherit deploy
do_deploy() {
	bbwarn ${DEPLOYDIR}

	EFIDIR="EFI/BOOT"
	EFI_IMAGE="systemd-bootia32.efi"
	DEST_EFI_IMAGE="bootia32.efi"
	if [ "${TARGET_ARCH}" = "x86_64" ]; then
	    EFI_IMAGE="systemd-bootx64.efi"
	    DEST_EFI_IMAGE="bootx64.efi"
	fi

	install -d ${DEPLOY_DIR_IMAGE}/bootfs/${EFIDIR}
	# systemd-boot requires these paths for configuration files
	# they are not customizable so no point in new vars
	install -d ${DEPLOY_DIR_IMAGE}/bootfs/loader/entries
	install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEPLOY_DIR_IMAGE}/bootfs/${EFIDIR}/${DEST_EFI_IMAGE}
	install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/bootfs/vmlinuz

}

do_deploy[depends] = "${MLPREFIX}systemd-boot:do_deploy virtual/kernel:do_deploy"
addtask do_deploy after do_prepare_recipe_sysroot before do_wic_image

# Use the same restriction as initramfs-live-install
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"