* [PATCH 0/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
@ 2012-03-07 8:06 Darren Hart
2012-03-07 8:06 ` [PATCH 1/1] " Darren Hart
0 siblings, 1 reply; 8+ messages in thread
From: Darren Hart @ 2012-03-07 8:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Paul Eggleton, Darren Hart
The following changes since commit d7b8c247227f3cc82f92292407f548927e9fde78:
base.bbclass: Fix PACKAGECONFIG handling when no flags are set (2012-03-05 13:03:41 -0800)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dvhart/bug/2036
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/bug/2036
Darren Hart (1):
kernel.bbclass: Remove warnings for modutils and modprobe.d
meta/classes/kernel.bbclass | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
--
1.7.6.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-07 8:06 [PATCH 0/1] kernel.bbclass: Remove warnings for modutils and modprobe.d Darren Hart
@ 2012-03-07 8:06 ` Darren Hart
2012-03-07 8:21 ` Koen Kooi
2012-03-08 20:13 ` Richard Purdie
0 siblings, 2 replies; 8+ messages in thread
From: Darren Hart @ 2012-03-07 8:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Paul Eggleton, Darren Hart
Fixes [Yocto #2036]
The source and build directories are unused, remove them.
The modutils and modprobe.d directories may be used if modules are built that
are either autoloaded or have modprobe.d entries. This isn't known at install
time, so check after the package split if these directories are empty and
remove them if they are.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/kernel.bbclass | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8fbec90..169df33 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -105,6 +105,8 @@ kernel_do_install() {
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
+ rm "${D}/lib/modules/${KERNEL_VERSION}/build"
+ rm "${D}/lib/modules/${KERNEL_VERSION}/source"
else
bbnote "no modules to install"
fi
@@ -450,6 +452,14 @@ python populate_packages_prepend () {
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True))
+ # If modutils and modprobe.d are empty at this point, remove them to
+ # avoid warnings. removedirs only raises an OSError if an empty
+ # directory cannot be removed.
+ dvar = d.getVar('PKGD', True)
+ for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
+ if len(os.listdir(dir)) == 0:
+ os.rmdir(dir)
+
import re
metapkg = "kernel-modules"
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
--
1.7.6.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-07 8:06 ` [PATCH 1/1] " Darren Hart
@ 2012-03-07 8:21 ` Koen Kooi
2012-03-07 17:04 ` Darren Hart
2012-03-08 20:13 ` Richard Purdie
1 sibling, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2012-03-07 8:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Cc: Paul Eggleton, Darren Hart
Op 7 mrt. 2012, om 09:06 heeft Darren Hart het volgende geschreven:
> Fixes [Yocto #2036]
>
> The source and build directories are unused, remove them.
>
> The modutils and modprobe.d directories may be used if modules are built that
> are either autoloaded or have modprobe.d entries. This isn't known at install
> time, so check after the package split if these directories are empty and
> remove them if they are.
>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> CC: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> meta/classes/kernel.bbclass | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 8fbec90..169df33 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -105,6 +105,8 @@ kernel_do_install() {
> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
> + rm "${D}/lib/modules/${KERNEL_VERSION}/build"
> + rm "${D}/lib/modules/${KERNEL_VERSION}/source"
How do you want to support on-target building of exernal modules?
regards,
Koen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-07 8:21 ` Koen Kooi
@ 2012-03-07 17:04 ` Darren Hart
2012-03-08 17:39 ` Mark Hatle
0 siblings, 1 reply; 8+ messages in thread
From: Darren Hart @ 2012-03-07 17:04 UTC (permalink / raw)
To: Koen Kooi; +Cc: Paul Eggleton, Patches and discussions about the oe-core layer
On 03/07/2012 12:21 AM, Koen Kooi wrote:
>
> Op 7 mrt. 2012, om 09:06 heeft Darren Hart het volgende geschreven:
>
>> Fixes [Yocto #2036]
>>
>> The source and build directories are unused, remove them.
>>
>> The modutils and modprobe.d directories may be used if modules are built that
>> are either autoloaded or have modprobe.d entries. This isn't known at install
>> time, so check after the package split if these directories are empty and
>> remove them if they are.
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> CC: Paul Eggleton <paul.eggleton@linux.intel.com>
>> ---
>> meta/classes/kernel.bbclass | 10 ++++++++++
>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 8fbec90..169df33 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -105,6 +105,8 @@ kernel_do_install() {
>> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
>> + rm "${D}/lib/modules/${KERNEL_VERSION}/build"
>> + rm "${D}/lib/modules/${KERNEL_VERSION}/source"
>
> How do you want to support on-target building of exernal modules?
That is an open issue that needs to be addressed, but we don't install
the build or source directories now (unless I'm missing something), so
these are links to nowhere at the moment.
We do have a bug open to support on-target module building. I supect
we'll need to add these as part of a headers package or similar. So
these may come back.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-07 17:04 ` Darren Hart
@ 2012-03-08 17:39 ` Mark Hatle
2012-03-08 21:07 ` Richard Purdie
2012-03-09 23:58 ` Darren Hart
0 siblings, 2 replies; 8+ messages in thread
From: Mark Hatle @ 2012-03-08 17:39 UTC (permalink / raw)
To: openembedded-core
On 3/7/12 11:04 AM, Darren Hart wrote:
>
>
> On 03/07/2012 12:21 AM, Koen Kooi wrote:
>>
>> Op 7 mrt. 2012, om 09:06 heeft Darren Hart het volgende geschreven:
>>
>>> Fixes [Yocto #2036]
>>>
>>> The source and build directories are unused, remove them.
>>>
>>> The modutils and modprobe.d directories may be used if modules are built that
>>> are either autoloaded or have modprobe.d entries. This isn't known at install
>>> time, so check after the package split if these directories are empty and
>>> remove them if they are.
>>>
>>> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
>>> CC: Paul Eggleton<paul.eggleton@linux.intel.com>
>>> ---
>>> meta/classes/kernel.bbclass | 10 ++++++++++
>>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>> index 8fbec90..169df33 100644
>>> --- a/meta/classes/kernel.bbclass
>>> +++ b/meta/classes/kernel.bbclass
>>> @@ -105,6 +105,8 @@ kernel_do_install() {
>>> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
>>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
>>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
>>> + rm "${D}/lib/modules/${KERNEL_VERSION}/build"
>>> + rm "${D}/lib/modules/${KERNEL_VERSION}/source"
>>
>> How do you want to support on-target building of exernal modules?
>
> That is an open issue that needs to be addressed, but we don't install
> the build or source directories now (unless I'm missing something), so
> these are links to nowhere at the moment.
>
> We do have a bug open to support on-target module building. I supect
> we'll need to add these as part of a headers package or similar. So
> these may come back.
>
Just as a note.. headers package(s) are the wrong way to support kernel modules
compilation on the target. You really need to supply a configured kernel source
tree --- often you can dump the .c files though. Kernel headers (for module
compilation) and userspace are often intentionally different.. and people get
this confused often. (I can't express how often I've had to convince someone
that, no you can't guaranty a working kernel module from the stuff in /usr/include!)
The right approach is to provide, as part of the kernel itself, a source
tree/headers package tha installes into the
"{D}/lib/modules/${KERNEL_VERSION}/source" (or similar) directory, and instruct
people to use that location when building kernel modules on the target.
--Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-07 8:06 ` [PATCH 1/1] " Darren Hart
2012-03-07 8:21 ` Koen Kooi
@ 2012-03-08 20:13 ` Richard Purdie
1 sibling, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2012-03-08 20:13 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Cc: Paul Eggleton, Darren Hart
On Wed, 2012-03-07 at 00:06 -0800, Darren Hart wrote:
> Fixes [Yocto #2036]
>
> The source and build directories are unused, remove them.
>
> The modutils and modprobe.d directories may be used if modules are built that
> are either autoloaded or have modprobe.d entries. This isn't known at install
> time, so check after the package split if these directories are empty and
> remove them if they are.
>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> CC: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> meta/classes/kernel.bbclass | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-08 17:39 ` Mark Hatle
@ 2012-03-08 21:07 ` Richard Purdie
2012-03-09 23:58 ` Darren Hart
1 sibling, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2012-03-08 21:07 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, 2012-03-08 at 11:39 -0600, Mark Hatle wrote:
> On 3/7/12 11:04 AM, Darren Hart wrote:
> >
> >
> > On 03/07/2012 12:21 AM, Koen Kooi wrote:
> >>
> >> Op 7 mrt. 2012, om 09:06 heeft Darren Hart het volgende geschreven:
> >>
> >>> Fixes [Yocto #2036]
> >>>
> >>> The source and build directories are unused, remove them.
> >>>
> >>> The modutils and modprobe.d directories may be used if modules are built that
> >>> are either autoloaded or have modprobe.d entries. This isn't known at install
> >>> time, so check after the package split if these directories are empty and
> >>> remove them if they are.
> >>>
> >>> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
> >>> CC: Paul Eggleton<paul.eggleton@linux.intel.com>
> >>> ---
> >>> meta/classes/kernel.bbclass | 10 ++++++++++
> >>> 1 files changed, 10 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> >>> index 8fbec90..169df33 100644
> >>> --- a/meta/classes/kernel.bbclass
> >>> +++ b/meta/classes/kernel.bbclass
> >>> @@ -105,6 +105,8 @@ kernel_do_install() {
> >>> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
> >>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
> >>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
> >>> + rm "${D}/lib/modules/${KERNEL_VERSION}/build"
> >>> + rm "${D}/lib/modules/${KERNEL_VERSION}/source"
> >>
> >> How do you want to support on-target building of exernal modules?
> >
> > That is an open issue that needs to be addressed, but we don't install
> > the build or source directories now (unless I'm missing something), so
> > these are links to nowhere at the moment.
> >
> > We do have a bug open to support on-target module building. I supect
> > we'll need to add these as part of a headers package or similar. So
> > these may come back.
> >
>
> Just as a note.. headers package(s) are the wrong way to support kernel modules
> compilation on the target. You really need to supply a configured kernel source
> tree --- often you can dump the .c files though. Kernel headers (for module
> compilation) and userspace are often intentionally different.. and people get
> this confused often. (I can't express how often I've had to convince someone
> that, no you can't guaranty a working kernel module from the stuff in /usr/include!)
>
> The right approach is to provide, as part of the kernel itself, a source
> tree/headers package tha installes into the
> "{D}/lib/modules/${KERNEL_VERSION}/source" (or similar) directory, and instruct
> people to use that location when building kernel modules on the target.
We already provide such a source tree for external module compilation
within the build itself. There is also an open bug to provide the same
tree for on-target use so I think we have a good plan which is
consistent with the above. For now I really want to clean up the warning
messages. We can add correct symlinks once we have on target support so
I've taken Darren's patch.
Cheers,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] kernel.bbclass: Remove warnings for modutils and modprobe.d
2012-03-08 17:39 ` Mark Hatle
2012-03-08 21:07 ` Richard Purdie
@ 2012-03-09 23:58 ` Darren Hart
1 sibling, 0 replies; 8+ messages in thread
From: Darren Hart @ 2012-03-09 23:58 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 03/08/2012 09:39 AM, Mark Hatle wrote:
> On 3/7/12 11:04 AM, Darren Hart wrote:
>>
>>
>> On 03/07/2012 12:21 AM, Koen Kooi wrote:
>>>
>>> Op 7 mrt. 2012, om 09:06 heeft Darren Hart het volgende geschreven:
>>>
>>>> Fixes [Yocto #2036]
>>>>
>>>> The source and build directories are unused, remove them.
>>>>
>>>> The modutils and modprobe.d directories may be used if modules are built that
>>>> are either autoloaded or have modprobe.d entries. This isn't known at install
>>>> time, so check after the package split if these directories are empty and
>>>> remove them if they are.
>>>>
>>>> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
>>>> CC: Paul Eggleton<paul.eggleton@linux.intel.com>
>>>> ---
>>>> meta/classes/kernel.bbclass | 10 ++++++++++
>>>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>>> index 8fbec90..169df33 100644
>>>> --- a/meta/classes/kernel.bbclass
>>>> +++ b/meta/classes/kernel.bbclass
>>>> @@ -105,6 +105,8 @@ kernel_do_install() {
>>>> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
>>>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
>>>> rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
>>>> + rm "${D}/lib/modules/${KERNEL_VERSION}/build"
>>>> + rm "${D}/lib/modules/${KERNEL_VERSION}/source"
>>>
>>> How do you want to support on-target building of exernal modules?
>>
>> That is an open issue that needs to be addressed, but we don't install
>> the build or source directories now (unless I'm missing something), so
>> these are links to nowhere at the moment.
>>
>> We do have a bug open to support on-target module building. I supect
>> we'll need to add these as part of a headers package or similar. So
>> these may come back.
>>
>
> Just as a note.. headers package(s) are the wrong way to support kernel modules
> compilation on the target. You really need to supply a configured kernel source
> tree --- often you can dump the .c files though. Kernel headers (for module
> compilation) and userspace are often intentionally different.. and people get
> this confused often. (I can't express how often I've had to convince someone
> that, no you can't guaranty a working kernel module from the stuff in /usr/include!)
>
> The right approach is to provide, as part of the kernel itself, a source
> tree/headers package tha installes into the
> "{D}/lib/modules/${KERNEL_VERSION}/source" (or similar) directory, and instruct
> people to use that location when building kernel modules on the target.
Understood. The terminology is a bit loose I guess. I understand the
distinction between linux-libc-headers and the "kernel-headers" that
most distros provide for building modules.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-10 0:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 8:06 [PATCH 0/1] kernel.bbclass: Remove warnings for modutils and modprobe.d Darren Hart
2012-03-07 8:06 ` [PATCH 1/1] " Darren Hart
2012-03-07 8:21 ` Koen Kooi
2012-03-07 17:04 ` Darren Hart
2012-03-08 17:39 ` Mark Hatle
2012-03-08 21:07 ` Richard Purdie
2012-03-09 23:58 ` Darren Hart
2012-03-08 20:13 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox