Hi Vladimir,

On 24.03.20 11:00, Vladimir Motyka wrote:
> 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?
> 

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




-- 
=====================================================================
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: sba...@denx.de
=====================================================================
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#48912): https://lists.yoctoproject.org/g/yocto/message/48912
Mute This Topic: https://lists.yoctoproject.org/mt/72513743/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to