Poky Project Discussions
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Gary Thomas <gary@mlbassoc.com>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 1/2] module: build and clean hostprogs for each module
Date: Thu, 03 Mar 2011 20:36:47 -0800	[thread overview]
Message-ID: <4D706C5F.6010106@linux.intel.com> (raw)
In-Reply-To: <4D6FC6E0.3070303@mlbassoc.com>

On 03/03/2011 08:50 AM, Gary Thomas wrote:
> On 03/02/2011 11:00 AM, Darren Hart wrote:
>> From: Darren Hart<dvhart@linux.intel.com>
>>
>> This fixes [BUGID #241]
>>
>> The kernel hostprogs are built for the host architecture. They should not
>> be deployed with to the target, and they should not be included in an
>> sstate
>> package which might get reused on a host of a different architecture.
>>
>> As we don't build many out-of-tree modules, this patch takes the approach
>> of building the hostprogs as part of the module compile process with a
>> do_compile_prepend() routine in module.bbclass. To ensure the hostprogs
>> don't contaminate the build, they are removed in do_install_append().
>>
>> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
>> CC: Gary Thomas<gary@mlbassoc.com>
>
> Sadly, this doesn't seem to work for me. I don't see any indication in
> run.do_compile that the extra steps were added at all.
>
> Will it matter if my recipe overrides the do_compile() method?

No, if you override do_compile(), the do_compile_prepend() from 
module.bbclass will still run - provided of course that you:

inherit module

--
Darren

>
>> ---
>> meta/classes/module.bbclass | 21 ++++++++++++++++++++-
>> 1 files changed, 20 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>> index d16d462..78f9b0a 100644
>> --- a/meta/classes/module.bbclass
>> +++ b/meta/classes/module.bbclass
>> @@ -3,6 +3,15 @@ DEPENDS += "virtual/kernel"
>>
>> inherit module-base
>>
>> +# Ensure the hostprogs are available for module compilation
>> +module_do_compile_prepend() {
>> + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>> + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
>> + -C ${STAGING_KERNEL_DIR} clean SUBDIRS=scripts
>> + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
>> + -C ${STAGING_KERNEL_DIR} scripts
>> +}
>> +
>> module_do_compile() {
>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>> oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
>> @@ -15,7 +24,17 @@ module_do_compile() {
>>
>> module_do_install() {
>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>> - oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}"
>> LD="${KERNEL_LD}" modules_install
>> + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
>> + KERNEL_SRC=${STAGING_KERNEL_DIR} \
>> + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
>> + modules_install
>> +}
>> +
>> +# Remove the hostprogs from the STAGING_KERNEL_DIR
>> +module_do_install_append() {
>> + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>> + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
>> + -C ${STAGING_KERNEL_DIR} clean SUBDIRS=scripts
>> }
>>
>> pkg_postinst_append () {
>


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


      parent reply	other threads:[~2011-03-04  4:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 18:00 [PATCH 1/2] module: build and clean hostprogs for each module Darren Hart
2011-03-03 16:50 ` Gary Thomas
2011-03-03 16:59   ` Gary Thomas
2011-03-04  4:39     ` Darren Hart
2011-03-04 11:44       ` Gary Thomas
2011-03-04 20:33         ` Darren Hart
2011-03-04 21:31           ` Darren Hart
2011-03-06 16:21             ` Gary Thomas
2011-03-07 22:16               ` Darren Hart
2011-03-04  4:36   ` Darren Hart [this message]

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=4D706C5F.6010106@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=gary@mlbassoc.com \
    --cc=poky@yoctoproject.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