Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: "Brandt, Todd E" <todd.e.brandt@intel.com>,
	Darren Hart <dvhart@linux.intel.com>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Koen Kooi <koen@dominion.thruhere.net>,
	"Openembedded-core@lists.openembedded.org"
	<Openembedded-core@lists.openembedded.org>
Subject: Re: Packaging kernel sources
Date: Wed, 10 Sep 2014 15:24:39 +0100	[thread overview]
Message-ID: <1410359079.24030.14.camel@ted> (raw)
In-Reply-To: <54105C2A.6060006@windriver.com>

On Wed, 2014-09-10 at 10:11 -0400, Bruce Ashfield wrote:
> On 14-09-10 04:27 AM, Richard Purdie wrote:
> > On Tue, 2014-09-09 at 17:42 -0700, Darren Hart wrote:
> >> I'm working on a project which needs to have the full kernel sources
> >> installed on the target. The kernel-dev package as defined by
> >> kernel.bbclass is heavily pruned to minimize packaging time and size and
> >> is intended to enable building of external modules on the target.
> >>
> >> Is there an accepted best-practice for how to get the full source packaged
> >> and installed? I can easily write a new recipe,
> >> linux-custom-source_git.bb, to install the sources, for example, without
> >> impacting the packaging time of "virtual/kernel" package.
> >>
> >> It would be nice in some respects for it to all come from the same recipe
> >> though, but I suspect the impact to the common-case where this is not need
> >> would be far too great.
> >
> > Personally, I'm leaning towards a couple of big changes in this area:
> 
> I'd prefer this sort of larger switch as well.
> 
> >
> > a) "binning" the kernel-dev package and replacing it with some kind of
> > separate full source recipe like this.
> >
> > The benefit is a fully functional on target source which is only built
> > by people who care about it. This means for most users/builds, we no
> > longer need to generate that huge package. The downside is a little more
> > complexity for those that needs this but its not much.
> 
> And just so I'm clear, in this case, the current sysroot, grep, sed,
> hack-a-thon version of the kernel would stay as is ?

No, these are two things I think we need to do together. There are two
issues, the on target one and the sysroot mess. a) deals with the
former, b) the latter.

So b) takes care of the hack-a-thon but I think we need a) as well.

> > b) binning the separate kernel staging dir and making it work more like
> > the gcc shared work directory. This means external module builds and the
> > tools like perf and so on would use this shared source directory.
> >
> > The benefit would be that we no longer have the huge install step in the
> > main kernel recipe and the populate_sysroot step shinks in size.
> >
> > The downside has more impact here, the problem with shared work is that
> > it cannot be removed once extracted since the system never knows when
> > something else may need to use it. For gcc the argument was that we have
> > so many users (gcc-cross-initial, gcc-cross, gcc-runtime,
> > gcc-cross-canadian, gcc-crosssdk, gcc-crosssdk-initial and so on) that
> > the multiple copies were far worse. For the kernel, we can argue that we
> > have a ton of disk usage from it in the sysroot anyway so this change
> > just makes things more efficient effectively.
> >
> > The other issue is that for shared work dirs, the stamps need to be kept
> > in sync, if they step out, odd things happen (i.e. do_fetch, do_unpack,
> > do_patch task checksums need to match for linux-yocto, perf, kernel
> > modules and anything else using it). We may need to add some better
> > error cases to catch problems. Not an insurmountable problem, just one
> > that will likely need to be addressed.
> >
> > I do feel the whole situation with the current kernel size is out of
> > control and badly affecting user experience.
> 
> I like (b) myself, since I'm getting tired of copying the source tree,
> having the removals fail as we march forward through kernel versions,
> and then needing to modify everything from the SDK to the out of tree
> module builds to reconstruct scripts, etc.
> 
> We'd have the same "don't patch it" restrictions for something that
> builds out of this shared directory (like perf), so there's nothing
> new and horrible there.

Right...

Cheers,

Richard



  reply	other threads:[~2014-09-10 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10  0:42 Packaging kernel sources Darren Hart
2014-09-10  2:18 ` Koen Kooi
2014-09-10  6:28 ` Robert Yang
2014-09-10  8:27 ` Richard Purdie
2014-09-10 14:11   ` Bruce Ashfield
2014-09-10 14:24     ` Richard Purdie [this message]
2014-09-10 14:42       ` Bruce Ashfield
2014-09-10 15:13   ` Darren Hart
     [not found]     ` <11E08D716F0541429B7042699DD5C1A170875BAD@FMSMSX103.amr.corp.intel.com>
2014-09-10 16:13       ` Bruce Ashfield
2014-09-10 16:26     ` Peter A. Bigot
2014-10-02  7:25     ` Robert Yang

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=1410359079.24030.14.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Openembedded-core@lists.openembedded.org \
    --cc=bruce.ashfield@windriver.com \
    --cc=dvhart@linux.intel.com \
    --cc=koen@dominion.thruhere.net \
    --cc=todd.e.brandt@intel.com \
    --cc=tom.zanussi@linux.intel.com \
    /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