Building FIT images with different initramfs images
Hello,
I want to ask if there is some best practice or recommendation on how to build multiple FIT images with different initramfs image. We need more FIT images with a different set of packages to support different use cases(development image, production test image, etc.).
As the INITRAMFS_IMAGE variable is set in the machine configuration, we defined more machines with different INITRAMFS_IMAGE value. I think this is abusing of machine configuration.
I found a similar question here on the mailing list (https://www.yoctoproject.org/pipermail/yocto/2017-August/037676.html), where Christian describes his solution - adjusting kernel.bbclass and kernel-fitimage.bbclass and creating a new variable INITRAMFS_IMAGES. However, it wasn't integrated into YP.
To summarize, is there a better/recommended solution for building multiple FIT images with different initramfs image, then abusing the MACHINE configuration, or adjusting kernel.bbclass and kernel-fitimage.bbclass by myself?
Thank You and Best Regards,
Vlado Motyka
Confidentiality Notice: This e-mail is privileged and confidential and for the use of the addressee only. Should you have received this e-mail in error please notify us by replying directly to the sender or by sending a message to [email protected]. Unauthorised dissemination, disclosure or copying of the contents of this e-mail, or any similar action, is prohibited.
Hi Vladimir,
Quoted 10 lines · Vladimir Motyka
Hello,
I want to ask if there is some best practice or recommendation on how to build multiple FIT images with different initramfs image. We need more FIT images with a different set of packages to support different use
cases(development image, production test image, etc.).As the
INITRAMFS_IMAGEvariable is set in the machine configuration, we defined more machines with differentINITRAMFS_IMAGEvalue. I think this is abusing of machine configuration.I found a similar question here on the mailing list (https://www.yoctoproject.org/pipermail/yocto/2017-August/037676.html), where Christian describes his solution - adjusting kernel.bbclass and kernel-fitimage.bbclass and creating a new variable
INITRAMFS_IMAGES. However, it wasn't integrated into YP.To summarize, is there a better/recommended solution for building multiple FIT images with different initramfs image, then abusing the MACHINE configuration, or adjusting kernel.bbclass and kernel-fitimage.bbclass by myself?
I do not know if there is a best practise - but I do not like to extend kernel classes as described above. IMHO the ramdisk does not belong to MACHINE. I can build several images, and I would like that some of them are put into a fit container. The kernel-fitimage class fits a very common use case and generates the .its file (the description of fitIMage used by mkimage), too, but it cannot fit all possible use cases: I have often to put into a fitImage other components, like FPGA bitstreams, splash images, multiple DTs and further configuration.
I see and I use fitImage as a container for an image class, that means not bound to MACHINE. So in my image recipe (where I generate the Ramdisk), I add a task that uses a fetched "its" file to generate the resulting fitImage.
Somethink like:
SRC_URI = " my-fit.its"
do_prepareitb() {
< further compression, and so on>
mkimage -f ${WORKDIR}/my-fit.its ${WORKDIR}/${PN}-${MACHINE}.itb
}
addtask prepareitb before do_build after do_image_complete
Maybe someone else has solved in a different way..
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================