Building a fitImage that include an initramfs force the kernel to depends on rootfs. This in turn cause rebuilding anything on any change. For example, if the image is not included, building an out-of-tree kernel module require pretty much just building the kernel + the module. Yet, when you enable fitImage, building the same out-of-tree kernel module force re-building all the user space application as well. Also, the image creation, fit or wic should not be kernel specific. The code found in kernel-fitimage.bbclass create an ITS file and then call uboot-mkimage. There is nothing there that is kernel specific. This code should be done within the image recipe, once the kernel uImage and the rootfs has been built, as is other image type. Now I understand that if INITRAMFS_IMAGE_BUNDLE is set to 1 that the kernel need to be involved, but when INITRAMFS_IMAGE_BUNDLE is set to 0, there are no valid reason to have the kernel create the image itself instead of the image recipe creating the image and removing that kernel/rootfs dependency.
We need someone to write some tests for the fitImage.
There are multiple things mentioned in this bug report and it is hard to understand exactly what is wrong. Can you break down the single most important thing you want fixed, in a simple way? @Randy we have quite a comprehensive self test at meta/lib/oeqa/selftest/cases/fitimage.py. Would this help?
This could probably be considered a duplicate of https://bugzilla.yoctoproject.org/show_bug.cgi?id=12912. The “wrong architecture” of kernel-fitimage.bbclass and the flexibility to create both bundled and unbundled kernel images in combination with fitImages create the complexity and ultimately the problems.
Let's assume this is fixed now. The FIT image related code has been completely rewritten. Also, the architecture is now different. See also https://bugzilla.yoctoproject.org/show_bug.cgi?id=12912. If this is not the case, feel free to reopen this bug.