| Message ID | 20250929161225.1290751-1-kavinaya@qti.qualcomm.com |
|---|---|
| Headers | show |
| Series | Add support for custom compatible string via optional parameter | expand |
On Mon, Sep 29, 2025 at 1:12 PM Kavinaya S via lists.openembedded.org <kavinaya=qti.qualcomm.com@lists.openembedded.org> wrote: > > This update adds flexibility to FIT image generation by introducing > an optional mechanism to override the DTB compatible string. > Instead of always extracting the value from the DTB, the generator > can now use a custom string defined in build metadata. This is > particularly useful when the FIT configuration requires a different > compatible value than what is embedded in the DTB. Please provide an example showing how this will be used in your scenario. Cheers, Ricardo
Hi Ricardo,
I’ve implemented this change by adding a custom compatible string for one specific DTB in my machine.conf:
FIT_DTB_COMPATIBLE_OVERRIDE:qcs6490-rb3gen2-vision-mezzanine.dtb = "qcom,qcs6490-rb-subtype5"
For qcs6490-rb3gen2.dtb, I have not defined any override, so it continues to use the compatible string extracted from the DTB itself.
As a result, the ITS configuration section looks like this:
configurations {
default = "conf-qcs6490-rb3gen2.dtb";
conf-qcs6490-rb3gen2.dtb {
description = "1 Linux kernel, FDT blob";
kernel = "kernel-1";
fdt = "fdt-qcs6490-rb3gen2.dtb";
compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
hash-1 {
algo = "sha256";
};
};
conf-qcs6490-rb3gen2-vision-mezzanine.dtb {
description = "0 Linux kernel, FDT blob";
kernel = "kernel-1";
fdt = "fdt-qcs6490-rb3gen2-vision-mezzanine.dtb";
compatible = "qcom,qcs6490-rb-subtype5";
hash-1 {
algo = "sha256";
};
};
}
This demonstrates how the override works:
If an override is defined in machine.conf, the FIT generator uses that value.
If no override is provided, it falls back to the compatible string from the DTB.
Thanks,
Kavinaya
On Mon, Sep 29, 2025 at 09:54:38AM -0700, Kavinaya S wrote: > Hi Ricardo, Don't delete the whole message you are responding to. How do we know what are you talking about? > > I’ve implemented this change by adding a custom compatible string for one specific DTB in my machine.conf: > FIT_DTB_COMPATIBLE_OVERRIDE:qcs6490-rb3gen2-vision-mezzanine.dtb = "qcom,qcs6490-rb-subtype5"
This update adds flexibility to FIT image generation by introducing an optional mechanism to override the DTB compatible string. Instead of always extracting the value from the DTB, the generator can now use a custom string defined in build metadata. This is particularly useful when the FIT configuration requires a different compatible value than what is embedded in the DTB. Key changes: Adds a custom_compatible parameter to fitimage_emit_section_dtb(). Preserves existing behavior when no override is specified. Usage: To override the default behavior, define in machine configuration or local.conf: FIT_DTB_COMPATIBLE_OVERRIDE:<dtb-filename.dtb> = "custom-compatible-string" This method avoids using custom ITS files, keeps the build process consistent, and makes it easy to understand and track changes. Kavinaya S (1): fitimage: Add support for custom compatible string via optional parameter meta/classes-recipe/kernel-fit-image.bbclass | 3 ++- meta/conf/image-fitimage.conf | 6 ++++++ meta/lib/oe/fitimage.py | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-)