[yocto] Yocto - Building initramfs to run a shell script for the support of IMA/EVM

Eswaran Vinothkumar (BEG-PT/PJ-IOT1) Vinothkumar.Eswaran at de.bosch.com
Fri Jan 20 04:44:11 PST 2017


Hello Yocto community developers,

I am currently working on the task of porting an existing build system to Yocto to create customized Linux distribution for an embedded product. I have successfully created a bare box image, the kernel and root file system image and the system startup is working fine.

I am now investigating on creating the initramfs using Yocto and have gone through the Yocto documents for the same.

Adding the options :
INITRAMFS_FSTYPES = "cpio.gz"
INITRAMFS_IMAGE = "custom-initramfs"  --> my recipe which inherited core-image.bb recipe

Results in the creation of 'custom-image-20170120105621.rootfs.cpio.gz' file.

We are using initramfs to run a script which before mounting the root file system checks for ima policy and also responsible for loading the evm-keys. In short, the initramfs contains a script which is executed before mounting the main root file system. So I think I need to follow a different procedure than the one I mentioned above for my use case. Also we are using systemd as the init system and for the initramfs I don't need sysv or systemd as all I will do is running a script in initramfs.

Is there a better way of creating this structure in Yocto, any information would be helpful.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1

Tel. +49(7062)911-02

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170120/39a1eb59/attachment.html>


More information about the yocto mailing list