Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Phil Blundell <pb@pbcl.net>
Cc: Otavio Salvador <otavio@ossystems.com.br>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] kernel.bbclass: Tolerate empty INITRAMFS_IMAGE when INITRAMFS_TASK is set
Date: Mon, 18 Nov 2013 12:26:49 +0000	[thread overview]
Message-ID: <1384777609.6460.224.camel@ted> (raw)
In-Reply-To: <1384625383.3814.34.camel@x121e.pbcl.net>

On Sat, 2013-11-16 at 18:09 +0000, Phil Blundell wrote:
> On Fri, 2013-11-15 at 11:26 -0200, Otavio Salvador wrote:
> > Hello Phil,
> > 
> > On Fri, Nov 15, 2013 at 11:05 AM, Phil Blundell <pb@pbcl.net> wrote:
> > > The idiomatic way to reinstate the old-style initramfs handling appears to be to
> > > set:
> > >
> > > INITRAMFS_TASK = "${INITRAMFS_IMAGE}:do_rootfs"
> > 
> > What problems are you having with the 'new-style'?
> 
> Good question.  When I first merged the version of kernel.bbclass that
> implemented the "new-style" system I was having a bunch of problems
> which seemed to be due to the new code.  However, after a bit of further
> debugging it now appears that most of them are issues with the
> implementation rather than with the concept and selecting INITRAMFS_TASK
> doesn't actually help very much because the code that was causing my
> problems is shared between the two paths.
> 
> The main difficulty I was having was that kernel.bbclass was looking for
> the initramfs image with slightly the wrong filename.  After a certain
> amount of sleuthing and some clues from Andrea it eventually became
> apparent that kernel.bbclass relies on the initramfs image recipe
> leaving ${IMAGE_LINK_NAME} at its default value and will fail if it's
> set to anything else.  This seems slightly fragile and it seems as
> though it would be better for kernel.bbclass to look for the initramfs
> image at its primary location rather than relying on the symlink.
> 
> I also discovered that the new code in kernel.bbclass uncompresses the
> initramfs image before embedding it in the kernel.  I can guess why this
> seemed like a good plan, but it's slightly surprising behaviour and it
> seems like anybody who wanted to embed the initramfs in uncompressed
> form would just select IMAGE_TYPE = "cpio" for it in the first place.
> Also, Andrea reports that he does actually get worse compression overall
> with this approach in at least some circumstances.
> 
> Anyway, with those things fixed I can now at least build images again
> and it's entirely possible that the "new style" system would also work
> for me.  However, it doesn't seem as though the new technology would
> bring me any particular benefits, and as far as I can tell it would
> introduce an extra kernel compile step that I don't particularly want,
> so I am inclined to stick with INITRAMFS_TASK for the moment.

FWIW I would *love* to simplify this code and have one good/efficient
codepath everyone uses. The initramfs decompression code looks nasty to
me for example and I agree with your thoughts on that.

Cheers,

Richard



  reply	other threads:[~2013-11-18 12:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 13:05 [PATCH] kernel.bbclass: Tolerate empty INITRAMFS_IMAGE when INITRAMFS_TASK is set Phil Blundell
2013-11-15 13:26 ` Otavio Salvador
2013-11-16 18:09   ` Phil Blundell
2013-11-18 12:26     ` Richard Purdie [this message]
2013-11-18 23:26       ` Andrea Adami
2013-11-22 22:25         ` Andrea Adami

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=1384777609.6460.224.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    --cc=pb@pbcl.net \
    /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