From 0c3c7bc9f4f1e19ad67a4445664da5b4cb3ed9f1 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Tue, 15 Apr 2025 12:28:05 +0200 Subject: [PATCH] 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 --- meta-oe/classes/fitimage.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass index bc69320552..76e7241820 100644 --- a/meta-oe/classes/fitimage.bbclass +++ b/meta-oe/classes/fitimage.bbclass @@ -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')