[OE-core] [PATCH] [RFC] kernel: rework kernel and module classes to allow for building out-of-tree modules
Darren Hart
dvhart at linux.intel.com
Wed Mar 16 06:50:01 UTC 2011
On 03/15/2011 10:25 AM, Koen Kooi wrote:
>
> Op 15 mrt 2011, om 18:07 heeft Darren Hart het volgende geschreven:
>
>>
>>
>> On 03/15/2011 01:31 AM, Koen Kooi wrote:
>>>
>>> Op 15 mrt 2011, om 08:25 heeft Darren Hart het volgende geschreven:
>>>
>>>> NOT FOR INCLUSION
>>>>
>>>> Before we include something like this, it needs review from folks
>>>> like Koen and Gary to confirm it works in their environment as
>>>> well.
>>>>
>>>> The existing infrastructure uses an external build tree which
>>>> references the kernel source in the work dir. If run with rm work,
>>>> building external modules will fail.
>>>>
>>>> This patch places a configured source tree in sysroots. Striking a
>>>> balance between minimal size and minimal maintenance is difficult.
>>>> This version leans on the side of caution and removes only the
>>>> obviously unecessary parts of the source tree to conserve space.
>>>>
>>>> Care is also taken to clean the hostprogs in scripts, and the
>>>> modules are responsible for building them as needed.
>>>
>>> I get this:
>>>
>>> | cp: cannot open
>>> `./.pc/0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch/crypto/ocf/ixp4xx/ixp4xx.c'
>>> for reading: Permission denied
>>>
>>> After adding 'do_make_scripts' in my module do_compile and applying
>>> your patch. So it seems to be tripping on the quilt directory :(
>>
>> What are the ownership and perms on those?
>
> drwxr-xr-x 126 koen koen 16384 2011-03-10 15:42 .pc/
>
> and
>
> drwxr-xr-x 5 koen koen 4096 2011-03-10 15:42 0001-Added-Crane-Board-support.patch/
> drwxr-xr-x 3 koen koen 4096 2011-03-10 15:42 0001-BeagleBoard-Adjust-USER-button-pin-for-xM.patch/
> drwxr-xr-x 4 koen koen 4096 2011-03-10 15:42 0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch/
>
> etc.
>
> and finally:
>
> ---------- 1 koen koen 0 2011-03-10 15:42 git/.pc/0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch/crypto/ocf/ixp4xx/ixp4xx.c
Interesting, I just did a test patch with quilt to change the Makefile
(outside the build system) and don't see that kind of wanton abuse of
permissions:
dvhart at rage:linux$ ls -la .pc
total 28
drwxrwxr-x 3 dvhart dvhart 4096 2011-03-15 23:32 .
drwxrwxr-x 27 dvhart dvhart 4096 2011-03-15 23:33 ..
-rw-rw-r-- 1 dvhart dvhart 8 2011-03-15 23:32 .quilt_patches
-rw-rw-r-- 1 dvhart dvhart 7 2011-03-15 23:32 .quilt_series
-rw-rw-r-- 1 dvhart dvhart 2 2011-03-15 23:32 .version
-rw-rw-r-- 1 dvhart dvhart 17 2011-03-15 23:32 applied-patches
drwxrwxr-x 2 dvhart dvhart 4096 2011-03-15 23:33 quilt-test.patch
dvhart at rage:linux$ ls -la .pc/quilt-test.patch/
total 60
drwxrwxr-x 2 dvhart dvhart 4096 2011-03-15 23:33 .
drwxrwxr-x 3 dvhart dvhart 4096 2011-03-15 23:32 ..
-rw-rw-r-- 1 dvhart dvhart 0 2011-03-15 23:33 .timestamp
-rw-rw-r-- 1 dvhart dvhart 52198 2011-03-15 23:32 Makefile
dvhart at rage:linux$
Unfortunately, some versions/scenarios do, so I'll work around it.
>
>> I suppose we could avoid the .pc directory - but it's going to require something more than cp or some additional scripting. Something like tar's exclude functionality might be needed - but I hate to add the intermediate step as the kernel recipes are already so slow.
>
> It's that or forbidding people to apply patches to the kernel :)
Hrm.... interesting notion... do you think people would mind? ;-)
Fix is under test, hope to post yet tonight.
--
Darren
>
> regards,
>
> Koen
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
More information about the Openembedded-core
mailing list