# EFI Configuration
# ==============================================================================

MACHINE_FEATURES:append = " efi"

do_image_wic[depends] += "efibootguard-native:do_populate_sysroot efibootguard:do_deploy"

# Variable used in WKS file

WKS_PART_EFI ??= 'part --source efibootguard-efi --label efi --align 1024 --part-type=EF00'
WKS_PART_ROOT_A ??= 'part / --source rootfs --fstype=ext4 --label rootfs0 --align 1024'
WKS_PART_ROOT_B ??= 'part --fstype=ext4 --label rootfs1 --align 1024'
WKS_PART_ROOT_SIZE ??= '2G'
WKS_PART_EFIBOOTGUARD_A ??= 'part --source efibootguard-boot --label ebg0 --align 1024 --part-type=0700 --sourceparams "watchdog=${EFIBOOTGUARD_TIMEOUT},revision=2,kernel=kernel0-${MACHINE}.efi;KERNEL.EFI"'
WKS_PART_EFIBOOTGUARD_B ??= 'part --source efibootguard-boot --label ebg1 --align 1024 --part-type=0700 --sourceparams "watchdog=${EFIBOOTGUARD_TIMEOUT},revision=1,kernel=kernel1-${MACHINE}.efi;KERNEL.EFI"'
