All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Altherr <raltherr@google.com>
To: "Eswaran Vinothkumar (BEG-PT/PJ-IOT1)"
	<Vinothkumar.Eswaran@de.bosch.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Yocto - Building initramfs to run a shell script for the support of IMA/EVM
Date: Fri, 20 Jan 2017 09:07:51 -0800	[thread overview]
Message-ID: <CAPLgG==DimRGGufhUtxQGjEA95Tb_38O8ALg6qinYktW1Lm9Lg@mail.gmail.com> (raw)
In-Reply-To: <b2610f4ee0fe434e9820784963e2e0c3@FE-MBX1014.de.bosch.com>

[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]

Did you look at
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/images/core-image-minimal-initramfs.bb?
You do want to use the core-image class but some of the variables need to
be adjusted to build an initramfs.  OpenBMC does something similar to what
you are describing with their obmc-phosphor-initramfs (
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/images/obmc-phosphor-initramfs.bb)
that does a few things like applying staged rootfs updates before mounting
the rootfs.

On Fri, Jan 20, 2017 at 4:44 AM, Eswaran Vinothkumar (BEG-PT/PJ-IOT1) <
Vinothkumar.Eswaran@de.bosch.com> wrote:

> 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 <+49%207062%2091102>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #2: Type: text/html, Size: 5715 bytes --]

  reply	other threads:[~2017-01-20 17:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 12:44 Yocto - Building initramfs to run a shell script for the support of IMA/EVM Eswaran Vinothkumar (BEG-PT/PJ-IOT1)
2017-01-20 17:07 ` Rick Altherr [this message]
2017-01-22 11:42 ` Patrick Ohly
2017-01-23 14:08   ` Jeremy Thien
2017-01-23 16:40     ` Jeremy Thien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPLgG==DimRGGufhUtxQGjEA95Tb_38O8ALg6qinYktW1Lm9Lg@mail.gmail.com' \
    --to=raltherr@google.com \
    --cc=Vinothkumar.Eswaran@de.bosch.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.