[yocto] Building multiple FIT images with different initramfs images

Andersen, Christian c.andersen at kostal.com
Tue Aug 29 07:36:54 PDT 2017


Hello,

we are using signed FIT images to establish a verified boot system. Now I try to generate multiple FIT images, where every image contains another initramfs. The idea is to use a signed FIT image (loaded via TFTP) including a special ramdisk in our production line. This ramdisk only contains the code to copy the rootfs onto our eMMC. Another FIT image (the default one) will be included in our rootfs and used in all other cases (in the field).

Currently Yocto (kernel-fitimage.bbclass) only supports the variable INITRAMFS_IMAGE (which as far as I know, has to be set in the machine config). So I am not able to build a second FIT image with another initramfs image.

I did some (ugly) hacking on kernel.bbclass and kernel-fitimage.bbclass and created a new variable INITRAMFS_IMAGES, which may contain one or more different initramfs images. Using this approach I am now able to build multiple FIT images for one machine, which contain different ramdisks.

What do you think about such a feature? Is it something which might be integrated into mainline YP/OE?

Regards
Christian


KOSTAL Industrie Elektrik GmbH - Sitz Lüdenscheid, Registergericht Iserlohn HRB 3924 - USt-Id-Nr./Vat No.: DE 813742170
Postanschrift: An der Bellmerei 10, D-58513 Lüdenscheid * Telefon: +49  2351 16-0 * Telefax: +49  2351 16-2400
Werksanschrift: Lange Eck 11, D-58099 Hagen * Tel. +49 2331 8040-601 * Fax +49 2331 8040-602
Geschäftsführung: Dr.-Ing. Dipl.-Wirt.Ing. Manfred Gerhard, Dipl.-Ing. Marwin Kinzl, Dipl.-Oec. Andreas Kostal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170829/796e0a06/attachment.html>


More information about the yocto mailing list