From: Darren Hart <dvhart@linux.intel.com>
To: Koen Kooi <koen@dominion.thruhere.net>
Cc: poky <poky@yoctoproject.org>,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [poky] [PATCH 04/13] module: build hostprogs for each module
Date: Mon, 14 Mar 2011 11:46:33 -0700 [thread overview]
Message-ID: <4D7E6289.2050208@linux.intel.com> (raw)
In-Reply-To: <4A916656-9670-438B-AA5E-21309243FBA1@dominion.thruhere.net>
On 03/14/2011 11:10 AM, Koen Kooi wrote:
>
> Op 7 mrt 2011, om 17:30 heeft Darren Hart het volgende geschreven:
>
>> On 03/04/2011 03:20 PM, Darren Hart wrote:
>>> On 03/04/2011 02:30 PM, Koen Kooi wrote:
>>>>
>>>> Op 4 mrt 2011, om 23:28 heeft Koen Kooi het volgende geschreven:
>>>>
>>>>>
>>>>> Op 4 mrt 2011, om 22:44 heeft Darren Hart het volgende geschreven:
>>>>>
>>>>>> 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.
>>>>>
>>>>> Are you sure that actually works? AIUI bitbake will fold the compile
>>>>> and prepend into one when you try to override it.
>>>>
>>>> What I actually meant to say is: If you need to prepend it to
>>>> do_compile, even when someone will override it, use addtask to insert
>>>> it between configure and compile. That makes the intention a lot
>>>> clearer and isn't depending on faulty bitbake behaviour.
>>>
>>> You could be right, I'm not terribly familiar with how the "inheritance"
>>> model works. It seems to me the "addtask" method would work regardless
>>> as you suggest, and I have no objection to taking that route.
>>>
>>> Richard, do you have a preference? Can you clear up the inheritance
>>> question?
>>>
>>
>> Had a chat with Richard. His suggestion was to use a new function, ie do_hostprogs, which do_compile() calls. If a recipe overrides do_compile() it can call do_hostprogs() or manage it on its own. I'll do some testing and send out a follow-on patch.
>
> Any news on this? I just hit the issue:
>
> | CC [M] /OE/tentacle/build/tmp-angstrom_2010_x/work/beagleboard-angstrom-linux-gnueabi/ti-dsplink-1_1_65_00_03-r99i/dsplink_linux_1_65_00_03/dsplink/gpp/src/../../gpp/src/arch/CFG_map.o
> | /bin/sh: scripts/basic/fixdep: No such file or directory
Yes, I have a working solution, but have been trying to polish it up and
getting pulled away on other bugs. I'll clean it up and push it out by
tonight, although I expect a few review cycles will be needed before we
are all happy with it.
The tricky part is balancing the complexity of building the configured
source tree with the size it takes up in sysroots. It can be done in as
little as 80MB, but the easiest way (and the easiest to maintain going
forward) is 500MB. More on that tonight.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-03-14 18:48 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 05/13] hello-mod: add a module for testing module.bbclass 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
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 [this message]
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 08/13] x11vnc: fix the endian issue in mips for bug 782 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 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=4D7E6289.2050208@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