coreos/layers/meta-belden-coreos/classes/coreos-image-swupdate.bbclass

35 lines
1.3 KiB
Plaintext

# This class generate the swu file needed by swupdate
# This should not be used directly but via coreos-image.bbclass
# This is made to work with our default boot flow, so it depends on the output
# of coreos-image-uki.bbclass. Other boot flow are not supported by CoreOS.
# Swupdate image generation
# ==============================================================================
# Machine using MBR override this value, see legacy-mbr-disk.inc
COREOS_DISK_PARTLABEL_LOOKUP_DIRECTORY ??= "/dev/disk/by-partlabel"
IMAGE_FSTYPES:append = " ext4.zst"
python () {
image = d.getVar('IMAGE_BASENAME')
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", image, ".ext4.zst")
}
inherit swupdate-image
# Ensure than variable used in the sw-description files are watched for change
do_swuimage[vardeps] += "COREOS_KERNEL0_FILENAME COREOS_KERNEL1_FILENAME EFIBOOTGUARD_TIMEOUT COREOS_DISK_PARTLABEL_LOOKUP_DIRECTORY"
do_swuimage[deptask] += "do_bundle_uki"
SWUPDATE_IMAGES += "${COREOS_KERNEL0_NAME} ${COREOS_KERNEL1_NAME}"
python () {
kernel0 = d.getVar('COREOS_KERNEL0_NAME')
kernel1 = d.getVar('COREOS_KERNEL1_NAME')
kernelext = d.getVar('COREOS_KERNEL_EXT')
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", kernel0, kernelext)
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", kernel1, kernelext)
}
FILESEXTRAPATHS:append := ":${COREOS_ROOT}/layers/meta-belden-coreos/files"