All of lore.kernel.org
 help / color / mirror / Atom feed
* Building FIT images with different initramfs images
@ 2020-03-24 10:00 vladimir.motyka
  2020-03-24 11:53 ` [yocto] " Stefano Babic
  0 siblings, 1 reply; 2+ messages in thread
From: vladimir.motyka @ 2020-03-24 10:00 UTC (permalink / raw)
  To: yocto

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 info@kistler.com. Unauthorised dissemination, disclosure or copying of the contents of this e-mail, or any similar action, is prohibited.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] Building FIT images with different initramfs images
  2020-03-24 10:00 Building FIT images with different initramfs images vladimir.motyka
@ 2020-03-24 11:53 ` Stefano Babic
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2020-03-24 11:53 UTC (permalink / raw)
  To: Vladimir Motyka, yocto

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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-24 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 10:00 Building FIT images with different initramfs images vladimir.motyka
2020-03-24 11:53 ` [yocto] " Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.