Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Christopher Larson <clarson@kergoth.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: Wic and "live" images
Date: Wed, 25 May 2016 14:35:49 +0300	[thread overview]
Message-ID: <20160525113549.GA25463@linux.intel.com> (raw)
In-Reply-To: <CABcZANnRrT_mJ1WnahrKfNe2vS9z8BYvR3p1vacXt6siKSAJ0Q@mail.gmail.com>

On Tue, May 24, 2016 at 01:30:19PM -0700, Christopher Larson wrote:
> On Tue, May 24, 2016 at 1:16 PM, Ed Bartosh <ed.bartosh@linux.intel.com>
> wrote:
> 
> > On Tue, May 24, 2016 at 12:56:39PM -0700, Christopher Larson wrote:
> > > On Tue, May 24, 2016 at 12:51 PM, Ed Bartosh <ed.bartosh@linux.intel.com
> > >
> > > wrote:
> > >
> > > > On Mon, May 23, 2016 at 08:13:28AM -0400, Ian Geiser wrote:
> > > > >  > On Thu, May 19, 2016 at 05:52:45AM -0400, Ian Geiser wrote:
> > > > >  > > Greetings, I am trying to learn "wic" and have been confused as
> > how
> > > > to create a "live" style image.  I am following "
> > > >
> > http://www.yoctoproject.org/docs/1.5.2/dev-manual/dev-manual.html#creating-partitioned-images
> > "
> > > > but am getting confused on the target to use to create the a file
> > system
> > > > that has a single squashfs file containing my root file system.
> > > > >  > >
> > > > >  > > My desired partition layout is as follows:
> > > > >  > >       40MiB                 40MiB               300MiB
> > > > >  > >
> > > > +--------------------+-----------------+-----------------------------+
> > > > >  > > |      BOOT (esp)    |    DATA (fat)   |          ROOT (live)
> > > >   |
> > > > >  > >
> > > > +--------------------+-----------------+-----------------------------+
> > > > >  > >
> > > > >  > > BOOT - efi boot partition with kernel and initramfs
> > > > >  > > DATA - generic fat filesystem to hold configuration files
> > > > >  > > ROOT - an ext4 filesystem that contains a single os.img, which
> > is a
> > > > squashfs file.
> > > > >  > >
> > > > >  > > I have ROOT and DATA figured out but I am at a loss as how to
> > > > generate the os.img file and copy it into ROOT.  If I generate the
> > os.img
> > > > file with bitbake and then use the "-r" option to manually supply a
> > > > directory structure it works, but I would rather have it done from a
> > wks
> > > > file for automation reasons.
> > > > >  > >
> > > > >  > > Any hints?
> > > > >  > I'd suggest to use wic image type and generate your image by
> > bitbake.
> > > > >  > You can find example wic-image-minimal.bb and
> > wic-image-minimal.wks
> > > > in ../meta-selftest/recipes-test/images/
> > > > >  >
> > > > > This is where I started.  I was able to make it work but not with my
> > > > configuration above.  It looks like I can use a type of "fsimage" for
> > my
> > > > "ROOT" partition, but I have not been able to figure out the syntax
> > there
> > > > yet.  For "BOOT" I am at a complete loss.  In theory "bootimg-efi" but
> > > > there doesn't seem to be a way to provide an initramfs.
> > > >
> > > > How about creating recipe to prepare content or your boot partition and
> > > > then using --source rootfs --rootfs-dir=<your recipe> ?
> > > > This is much more generic way of creating partitioned images from my
> > > > point of view. Image recipes should take care of content and wic takes
> > > > care of
> > > > putting that content into partitions according to the partitioning
> > > > scheme described in .wks
> > > >
> > > > Does it make sense for you?
> > > >
> > > > >
> > > > >  > You can probably do the same by using wic plugins, but I'd not
> > suggest
> > > > >  > to go this way. Using wic image type is simpler, more consistent,
> > > > easier to do and provides higher level of automation.
> > > > >
> > > > > Is using the wic image type and a plugin mutually exclusive?
> > > > No, not at all. However, I personally found the way I described above
> > > > more consistent, flexible and easy to implement and maintain.
> > > >
> > >
> > > The thing is, it's likely the machine/bsp setting the WKS_FILE, yet in
> > > OE/yocto we prefer machine/distro/image to be orthogonal. If you're
> > > injecting machine specific logic into an image, that image isn't going to
> > > be generally useful for all machines, and so violates our philosophy.
> >
> > I'm not sure I understand why it has to be machine-dependent setting in
> > the .wks Can you give some example?
> 
> 
> I don't understand the question. The .wks is machine specific by
> definition. It includes knowledge of the expectations of the boot process
> on the hardware the image is used on, what the boot device name is, etc.

Sorry for not being clear. Now I understand what you mean. I didn't know
about this philosopy when I implemented handling wic image types in
image core classes. Are you suggesting to remove it and keep using wic
as only as a separate tool?

--
Regards,
Ed


  reply	other threads:[~2016-05-25 11:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19  9:52 Wic and "live" images Ian Geiser
2016-05-23 10:36 ` Ed Bartosh
2016-05-23 12:13   ` Ian Geiser
2016-05-23 13:00     ` Sergey 'Jin' Bostandzhyan
2016-05-23 13:09       ` Ian Geiser
2016-05-24 19:51     ` Ed Bartosh
2016-05-24 19:56       ` Christopher Larson
2016-05-24 20:16         ` Ed Bartosh
2016-05-24 20:30           ` Christopher Larson
2016-05-25 11:35             ` Ed Bartosh [this message]
2016-05-25 20:04               ` Christopher Larson
2016-05-31 15:31                 ` Ian Geiser
2016-05-31 16:13                   ` Christopher Larson
2016-05-31 15:24         ` Ian Geiser
2016-05-31 15:19       ` Ian Geiser

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=20160525113549.GA25463@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=clarson@kergoth.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox