Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] bootimg-efi.py: Use IMGDEPLOYDIR instead of DEPLOY_DIR_IMAGE for initrd
Date: Mon, 03 Jul 2017 08:45:37 +0200	[thread overview]
Message-ID: <1499064337.5259.48.camel@intel.com> (raw)
In-Reply-To: <6aef97ed-8284-039a-c780-c5b01ee8fe1a@linux.intel.com>

On Sat, 2017-07-01 at 16:48 -0500, Alejandro Hernandez wrote:
> 
> On 07/01/2017 10:09 AM, Patrick Ohly wrote:
> > Is it really intended that do_image_wic runs for
> > core-image-tiny-initramfs? How and where is the output of
> > core-image-tiny-initramfs used?
> Yes, do_image_wic is intended to run automatically, hence why wic was 
> added to IMAGE_FSTYPES
> I'm not sure I understand what you mean by the second question, but the 
> output is just as in any other image

My point was that core-image-tiny-initramfs isn't like other *-initramfs
image recipes at all, and having an outdated DESCRIPTION in it doesn't
help much either.

> >  From the DESCRIPTION:
> >
> >          core-image-tiny-initramfs doesn't actually generate an image but
> >          rather generates boot and rootfs artifacts into a common
> >          location that can subsequently be picked up by external image
> >          generation tools such as wic.
> This is the old description, when it was though that we would have a common
> artifacts directory, which never happened due to some changes in wic 
> last year
> after which it was decided that core-image-tiny-initramfs would generate 
> the artifacts
> AND a wic image.

If that remains the solution (see below), will the DESCRIPTION and
perhaps even the file name be changed?

> > I still think your patch breaks images which use the initrd parameter to
> > reference an initrd produced by some other recipe.
> I see your point, if an initrd is produced by some other recipe it'd be 
> somewhere else, but at the same time, what if an initrd is produced by 
> the image recipe itself?, like in this case

I see two solutions:
1) keep using the recipe as currently intended and 
   add another sourceparam to bootimg-efi.py which changes the default
   source for initrd from DEPLOY_DIR_IMAGE (the current behavior) to
   IMGDEPLOYDIR
2) use two recipes, one for the initramfs (the current
   core-image-tiny-initramfs.bb, but without wic in IMAGE_FSTYPES) and
   a separate core-image-tiny.bb where do_rootfs gets replaced with
   an empty stub

I personally find the second solution cleaner. It's the standard way of
doing image + initramfs and thus will be easier to understand and have
less unexpected pitfalls.

One such pitfall in solution one exists even with your current patch:
do_image_wic does not depend on do_image_cpio (run "bitbake -g
core-image-tiny-initramfs:do_image_wic", "grep
'^.core-image-tiny-initramfs.do_image_wic' task-depends.dot") and thus
there's a race condition between the two tasks of the same recipe. That
can be fixed, of course, but it is making the solution even more
unusual.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





  reply	other threads:[~2017-07-03  6:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 17:53 [PATCH] bootimg-efi.py: Use IMGDEPLOYDIR instead of DEPLOY_DIR_IMAGE for initrd Alejandro Hernandez
2017-06-30 18:43 ` Patrick Ohly
2017-06-30 20:38   ` Alejandro Hernandez
2017-07-01 15:09     ` Patrick Ohly
2017-07-01 21:48       ` Alejandro Hernandez
2017-07-03  6:45         ` Patrick Ohly [this message]
2017-07-03  9:06         ` Ed Bartosh
2017-07-03  8:36 ` Ed Bartosh
2017-07-03  9:27   ` Patrick Ohly
2017-07-03 12:44     ` Ed Bartosh
2017-07-03 14:10       ` Patrick Ohly

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=1499064337.5259.48.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=alejandro.hernandez@linux.intel.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