All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Blundell <pb@pbcl.net>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] kernel: restore scripts in the sysroot
Date: Tue, 19 Nov 2013 17:46:14 +0000	[thread overview]
Message-ID: <1384883174.23724.116.camel@phil-desktop.brightsign> (raw)
In-Reply-To: <20131119173725.GA13018@mcrowe.com>

On Tue, 2013-11-19 at 17:37 +0000, Mike Crowe wrote:
> On Tuesday 08 October 2013 at 17:12:54 -0400, Bruce Ashfield wrote:
> > When building against the sysroot, out of tree modules can require modpost
> > and other utilities normally found in the kernel's scripts directory. For
> > the kernel source in the staging dir, these scripts have been removed to
> > avoid mixing archiectures when packaging kernel-dev (among other things).
> > 
> > Rather than further complicate the kernel's install rule, or its packaging,
> > we can restore the scripts by building them in the kernel staging directory
> > after the sstate is installed, making them available to packages that need them.
> > 
> > Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > ---
> >  meta/classes/kernel.bbclass | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 4acfb7e..d5fa801 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -292,6 +292,17 @@ kernel_do_install() {
> >  }
> >  do_install[prefuncs] += "package_get_auto_pr"
> >  
> > +
> > +SSTATEPOSTINSTFUNCS += "kernelscripts_sstate_postinst"
> > +kernelscripts_sstate_postinst () {
> > +	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
> > +		( 
> > +		  cd ${STAGING_KERNEL_DIR}
> > +		  oe_runmake scripts
> > +		)
> > +	fi
> > +}
> > +
> >  sysroot_stage_all_append() {
> >  	sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
> >  }
> 
> This sstate_postinst fails for me when the compiler isn't already present
> in the sysroot.
> 
> Also, I notice that the environment and parameters passed to oe_runmake are
> not the same as those used by kernel_do_compile etc.

Also note that module.bbclass already does "make scripts" before
do_compile() so out-of-tree modules should already have access to all
the files that they need.  

If we're going to make a policy decision that the kernel is responsible
for making scripts then I guess that's fine (modulo the implementation
problems that Mike describes) but in that case the code in
module{-base}.bbclass is redundant and ought to be removed.

p.




  parent reply	other threads:[~2013-11-19 17:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 21:12 [PATCH 0/1] kernel: restore scripts in the sysroot Bruce Ashfield
2013-10-08 21:12 ` [PATCH 1/1] " Bruce Ashfield
2013-11-19 17:37   ` Mike Crowe
2013-11-19 17:37     ` [PATCH 1/2] kernel.bbclass: Ensure compiler is available for do_populate_sysroot_setscene Mike Crowe
2013-11-19 17:37       ` [PATCH 2/2] kernel.bbclass: Call make with correct variables in kernelscripts_sstate_postinst Mike Crowe
2013-11-19 17:41         ` Bruce Ashfield
2013-11-19 17:46           ` Richard Purdie
2013-11-19 17:56             ` Bruce Ashfield
2013-11-19 17:49           ` Mike Crowe
2013-11-19 17:59             ` Phil Blundell
2013-11-19 17:47       ` [PATCH 1/2] kernel.bbclass: Ensure compiler is available for do_populate_sysroot_setscene Bruce Ashfield
2013-11-19 17:46     ` Phil Blundell [this message]
2013-11-19 17:54       ` [PATCH 1/1] kernel: restore scripts in the sysroot Bruce Ashfield
2013-11-19 18:17         ` Bruce Ashfield
2013-11-19 22:29           ` Khem Raj
2013-11-19 22:36             ` Richard Purdie
2013-11-19 22:39               ` Khem Raj
2013-11-19 22:45                 ` Richard Purdie
2013-11-20  2:59                   ` Khem Raj
2013-11-20  4:43                     ` Bruce Ashfield
2013-11-19 22:37             ` Bruce Ashfield
2013-11-19 22:42               ` Richard Purdie
2013-11-19 22:46                 ` Bruce Ashfield
2013-11-19 23:44               ` Phil Blundell
2013-11-19 22:48                 ` Bruce Ashfield
2013-11-19 23:41             ` Phil Blundell
  -- strict thread matches above, loose matches on Subject: below --
2013-10-04  0:02 [PATCH 0/1] kernel: provide " Bruce Ashfield
2013-10-04  0:02 ` [PATCH 1/1] kernel: restore " Bruce Ashfield
2013-10-04  0:58   ` Khem Raj
2013-10-04  0:59     ` Bruce Ashfield
2013-10-04  7:46   ` Richard Purdie
2013-10-04 12:42     ` Bruce Ashfield
2013-10-04 20:23       ` Khem Raj
2013-10-07  5:02     ` Bruce Ashfield
2013-10-07  9:58       ` Richard Purdie
2013-10-07 15:20         ` Bruce Ashfield
2013-10-07 16:18           ` Richard Purdie
2013-10-07 16:20             ` Bruce Ashfield

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=1384883174.23724.116.camel@phil-desktop.brightsign \
    --to=pb@pbcl.net \
    --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 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.