fitimage.bbclass: warn if kernel is compressed, but no compression specified

If the kernel build type uses compression, the bootloader needs to take
care of decompression. This must be configured in the FIT image via
FITIMAGE_IMAGE_myimage[comp]. So warn if the FIT image kernel compression
is not specified in such a case.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
This commit is contained in:
Bastian Krause 2025-04-15 12:28:05 +02:00 committed by Khem Raj
parent 24dd46daf8
commit 0c3c7bc9f4
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -390,6 +390,8 @@ python write_manifest() {
imageflags = d.getVarFlags('FITIMAGE_IMAGE_%s' % image, expand=['file', 'fstype', 'type', 'comp']) or {}
imgtype = imageflags.get('type', 'kernel')
if imgtype == 'kernel':
if d.getVar('KERNEL_IMAGETYPE') not in ('zImage', 'Image') and not imageflags.get('comp'):
bb.warn(f"KERNEL_IMAGETYPE is '{d.getVar('KERNEL_IMAGETYPE')}' but FITIMAGE_IMAGE_kernel[comp] is not set.")
default = "%s-%s%s" % (d.getVar('KERNEL_IMAGETYPE'), machine, d.getVar('KERNEL_IMAGE_BIN_EXT'))
imgsource = imageflags.get('file', default)
imgcomp = imageflags.get('comp', 'none')