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 authored and Khem Raj committed 2025-04-16 08:04:42 -07:00
1 parent 24dd46daf8
commit 0c3c7bc9f4
1 file changed
+2
+2
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')