Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Koen Kooi <koen@dominion.thruhere.net>
Cc: openembedded-core@lists.openembedded.org, poky@yoctoproject.org
Subject: Re: [poky] [PATCH 04/13] module: build hostprogs for each module
Date: Fri, 04 Mar 2011 13:44:16 -0800	[thread overview]
Message-ID: <4D715D30.3030608@linux.intel.com> (raw)
In-Reply-To: <A53A0FEC-74B3-483C-916C-EB87748A1AC8@dominion.thruhere.net>

On 03/04/2011 12:04 PM, Koen Kooi wrote:
>
> Op 4 mrt 2011, om 20:42 heeft Saul Wold het volgende geschreven:
>
>> 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 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.
>>
>> We don't have to clean the hostprogs as modules depend on the kernel being
>> populate_staging, so its done with the staging directory by the time we run.
>>
>> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
>> CC: Gary Thomas<gary@mlbassoc.com>
>> ---
>> meta/classes/module.bbclass |   12 +++++++++++-
>> 1 files changed, 11 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>> index d16d462..bbceaf7 100644
>> --- a/meta/classes/module.bbclass
>> +++ b/meta/classes/module.bbclass
>> @@ -3,6 +3,13 @@ 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} scripts
>> +}
>> +
>> module_do_compile() {
>> 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>> 	oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
>> @@ -15,7 +22,10 @@ module_do_compile() {
>
> Why not put it in do_compile itself?

My rationale was that a module recipe may override do_compile for one 
reason or another, but they will still need the hostprogs which we 
stripped in kernel.bbclass. This way, even if they override do_compile, 
the _prepend will still get run and prepare the hostprogs.

Thanks,

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



  reply	other threads:[~2011-03-04 21:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 19:42 [PATCH 00/13] Consolidated Pull Request from Yocto Team Saul Wold
2011-03-04 19:42 ` [PATCH 01/13] distro tracking: Updates to Tracking infor for clutter and other changes Saul Wold
2011-03-04 19:42 ` [PATCH 02/13] distrodata.bbclass: Get git repo tag information Saul Wold
2011-03-04 19:42 ` [PATCH 03/13] LSB_Setup.sh:Install LSB Test Suite and set lsb test environment Saul Wold
2011-03-04 19:42 ` [PATCH 04/13] module: build hostprogs for each module Saul Wold
2011-03-04 20:04   ` [poky] " Koen Kooi
2011-03-04 21:44     ` Darren Hart [this message]
2011-03-04 22:28       ` Koen Kooi
2011-03-04 22:30         ` Koen Kooi
2011-03-04 23:20           ` Darren Hart
2011-03-07 16:30             ` Darren Hart
2011-03-14 18:10               ` Koen Kooi
2011-03-14 18:46                 ` Darren Hart
2011-03-04 19:42 ` [PATCH 05/13] hello-mod: add a module for testing module.bbclass Saul Wold
2011-03-04 19:42 ` [PATCH 06/13] task-poky-lsb: add python-misc Saul Wold
2011-03-04 19:42 ` [PATCH 07/13] qemu-script: Remove mmap_min_addr check Saul Wold
2011-03-04 19:42 ` [PATCH 09/13] documentation/kernel-manual/figures/kernel-title.png: Updated title graphic Saul Wold
2011-03-04 19:42 ` [PATCH 08/13] x11vnc: fix the endian issue in mips for bug 782 Saul Wold
2011-03-04 19:42 ` [PATCH 10/13] documentation/kernel-manual: Kernel manual Style changes Saul Wold
2011-03-04 19:42 ` [PATCH 11/13] creat-lsb-image: Add some functions for creating a appropriate image to make lsb test Saul Wold
2011-03-04 19:42 ` [PATCH 12/13] task-poky-lsb: Add packges needed by LSB Test Suite Saul Wold
2011-03-04 19:42 ` [PATCH 13/13] toolchain-script.bbclass: Added --sysroot to LDFLAGS Saul Wold

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=4D715D30.3030608@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=koen@dominion.thruhere.net \
    --cc=openembedded-core@lists.openembedded.org \
    --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