summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/fitimage.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* meta-openembedded/all: adapt to UNPACKDIR changesAlexander Kanavin2025-06-251-2/+1
| | | | | | | | | | | | | Please see https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265 for what changes are needed, and sed commands that can be used to make them en masse. I've verified that bitbake -c patch world works with these, but did not run a world build; the majority of recipes shouldn't need further fixups, but if there are some that still fall out, they can be fixed in followups. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fitimage.bbclass: warn if kernel is compressed, but no compression specifiedBastian Krause2025-04-161-0/+2
| | | | | | | | | 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>
* fitimage.bbclass: error-out for empty configurationsEnrico Jörns2025-04-161-0/+7
| | | | | | Otherwise mkimage will, but with a way less helpful error message. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
* fitimage.bbclass: fix configurations node namingEnrico Jörns2025-04-161-1/+1
| | | | | | | | Similar to e152f01d, this fixes another occurence of the config section name to contain the 'conf_prefix'. Luckily, this one is only debug output. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
* fitimage.bbclass: fail early for unsupported image typesEnrico Jörns2025-04-161-0/+2
| | | | | | | A given image type should be valid. Thus fail early here instead of randomly failing later during mkimage call. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
* fitimage.bbclass: let image type default to 'kernel'Enrico Jörns2025-04-161-1/+1
| | | | | | | When no type is set, we simply pick 'kernel' as the default since it is still the most common to be used for FIT images. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
* fitimage.bbclass: fix error handling for missing recipeEnrico Jörns2025-04-161-1/+1
| | | | | | | | | | | The 'image' name should be printed rather than the (unset) 'recipe'. Also use f-strings for better readability. Since a missing recipe configuration is fatal to a proper generation, abort the parsing with bb.fatal instead of continuing with a broken configuration. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
* fitimage.bbclass: Add missing punctuationJohn Ripple2025-03-131-4/+4
| | | | | | | | | | | | | The functions related to signing the fitimage had missing quotations and newlines. Without this punctuation, the signing class would fail to generate a signed fitimage. To test this change just create a fitImage using this class and set FITIMAGE_SIGN to 1. The resulting fitImage its file should have one property per line with quotes around the property values. Signed-off-by: John Ripple <john.ripple@keysight.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fitimage.bbclass: Remove True option to getVar callsAkash Hadke2025-01-101-2/+2
| | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Signed-off-by: Akash Hadke <akash.hadke27@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fitimage: fix name of default configurationUlrich Ölmann2024-10-161-1/+1
| | | | | | | | | | | | | | | The new fitimage.bbclass was introduced via GitHub pullrequest [1]. There was a small force-push which implemented a prefix for the names of the configuration nodes to harmonize the class with the mechanism found in OE-core (see [2] & [3]). Unfortunately it was forgotten to also apply that prefix to the name of the configuration to utilize by default - fix that. [1] https://github.com/openembedded/meta-openembedded/pull/882 [2] https://github.com/openembedded/meta-openembedded/pull/882#issuecomment-2402218973 [3] https://github.com/openembedded/meta-openembedded/compare/0773f63e829b399a3e87cee03b009846c48b8429..32e7947154ea10e17f5db95d6bfaaf5074663fc7 Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fitimage: add support to build arbitrary FIT imagesMarco Felsch2024-10-091-0/+530
The FIT image support in OE is quite limited: 1) No support to build an arbitrary number of FIT images since the FIT image generation is tightly coupled to the kernel image. 2) A lot of U_BOOT-specific variables which may not be necessary for other bootloaders. 3) No usage of the meta-oe signing.bbclass for signed FIT images. This alternative class is added to solve the above-mentioned problems: 1) The class can be inherited by an arbitrary number of <fit-image-name>.bb recipes to generate FIT images 2) No U_BOOT-specific variables are used 3) <fit-image-name>.bb recipes can prepend the do_fitimage() to provide the key using the signing.bbclass e.g.: do_fitimage:prepend() { signing_prepare signing_use_role "${FITIMAGE_SIGNING_KEY_ROLE}" } Then enable and configure signing as follows: FITIMAGE_SIGN = "1" FITIMAGE_MKIMAGE_EXTRA_ARGS = "--engine pkcs11" FITIMAGE_SIGN_KEYDIR = "${PKCS11_URI} This class is inspired by the meta-phytec fitimage.bbclass [1]. [1] https://git.phytec.de/meta-phytec/tree/classes/fitimage.bbclass Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>