* [PATCH] kernel: Package additional modules files needed for systemtap
@ 2013-05-15 0:59 Drew Moseley
2013-05-15 5:39 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Drew Moseley @ 2013-05-15 0:59 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
meta/classes/kernel.bbclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6ba31bd..f23818e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -108,8 +108,6 @@ kernel_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
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
@@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
# kernel-image becomes kernel-image-${KERNEL_VERISON}
PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
FILES = ""
-FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
+FILES_kernel-image = " \
+ /boot/${KERNEL_IMAGETYPE}* \
+ ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
+ ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
+"
FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
FILES_kernel-vmlinux = "/boot/vmlinux*"
RDEPENDS_kernel = "kernel-base"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kernel: Package additional modules files needed for systemtap
2013-05-15 0:59 [PATCH] kernel: Package additional modules files needed for systemtap Drew Moseley
@ 2013-05-15 5:39 ` Richard Purdie
2013-05-15 13:23 ` Moseley, Drew
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2013-05-15 5:39 UTC (permalink / raw)
To: Drew Moseley, Ashfield, Bruce, Zanussi, Tom; +Cc: openembedded-core
On Tue, 2013-05-14 at 17:59 -0700, Drew Moseley wrote:
> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
> ---
> meta/classes/kernel.bbclass | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 6ba31bd..f23818e 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -108,8 +108,6 @@ kernel_do_install() {
> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> 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
> @@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
> # kernel-image becomes kernel-image-${KERNEL_VERISON}
> PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
> FILES = ""
> -FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
> +FILES_kernel-image = " \
> + /boot/${KERNEL_IMAGETYPE}* \
> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
> +"
> FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
> FILES_kernel-vmlinux = "/boot/vmlinux*"
> RDEPENDS_kernel = "kernel-base"
Should these really be installed into every system with a kernel?
Doesn't systemtap also need other symbol information so these files
would be better off in whatever other packages systemtap also needs?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kernel: Package additional modules files needed for systemtap
2013-05-15 5:39 ` Richard Purdie
@ 2013-05-15 13:23 ` Moseley, Drew
2013-05-15 13:34 ` Tom Zanussi
2013-05-15 13:54 ` Bruce Ashfield
0 siblings, 2 replies; 6+ messages in thread
From: Moseley, Drew @ 2013-05-15 13:23 UTC (permalink / raw)
To: Richard Purdie
Cc: Ashfield, Bruce, <openembedded-core@lists.openembedded.org>
On May 15, 2013, at 1:39 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2013-05-14 at 17:59 -0700, Drew Moseley wrote:
>> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
>> ---
>> meta/classes/kernel.bbclass | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 6ba31bd..f23818e 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -108,8 +108,6 @@ kernel_do_install() {
>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>> 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
>> @@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
>> # kernel-image becomes kernel-image-${KERNEL_VERISON}
>> PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
>> FILES = ""
>> -FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
>> +FILES_kernel-image = " \
>> + /boot/${KERNEL_IMAGETYPE}* \
>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
>> +"
>> FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
>> FILES_kernel-vmlinux = "/boot/vmlinux*"
>> RDEPENDS_kernel = "kernel-base"
>
> Should these really be installed into every system with a kernel?
> Doesn't systemtap also need other symbol information so these files
> would be better off in whatever other packages systemtap also needs?
>
> Cheers,
>
> Richard
Running systemtap probes without these files results in warning such as the following when trying to install packages:
Installing kernel-image-3.5.7.11 (3.5.7.11+gitr4+524c7f7782e2c671cccab87aafa1ee41f7202aaf-r6) to root...
Configuring kernel-image-3.5.7.11.
WARNING: could not open /lib/modules/3.5.7.11/modules.order: No such file or directory
WARNING: could not open /lib/modules/3.5.7.11/modules.builtin: No such file or directory
but I suspect systemtap is not the only place where these files are used. Below is the description of these files from the kernel Documentation/kbuild/kbuild.txt and they seem valuable on any module based system.
modules.order
--------------------------------------------------
This file records the order in which modules appear in Makefiles. This
is used by modprobe to deterministically resolve aliases that match
multiple modules.
modules.builtin
--------------------------------------------------
This file lists all modules that are built into the kernel. This is used
by modprobe to not fail when trying to load something builtin.
Regards,
Drew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kernel: Package additional modules files needed for systemtap
2013-05-15 13:23 ` Moseley, Drew
@ 2013-05-15 13:34 ` Tom Zanussi
2013-05-15 14:47 ` Moseley, Drew
2013-05-15 13:54 ` Bruce Ashfield
1 sibling, 1 reply; 6+ messages in thread
From: Tom Zanussi @ 2013-05-15 13:34 UTC (permalink / raw)
To: Moseley, Drew
Cc: Ashfield, Bruce, <openembedded-core@lists.openembedded.org>
On Wed, 2013-05-15 at 13:23 +0000, Moseley, Drew wrote:
> On May 15, 2013, at 1:39 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> > On Tue, 2013-05-14 at 17:59 -0700, Drew Moseley wrote:
> >> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
> >> ---
> >> meta/classes/kernel.bbclass | 8 +++++---
> >> 1 file changed, 5 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> >> index 6ba31bd..f23818e 100644
> >> --- a/meta/classes/kernel.bbclass
> >> +++ b/meta/classes/kernel.bbclass
> >> @@ -108,8 +108,6 @@ kernel_do_install() {
> >> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
> >> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> >> 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
> >> @@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
> >> # kernel-image becomes kernel-image-${KERNEL_VERISON}
> >> PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
> >> FILES = ""
> >> -FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
> >> +FILES_kernel-image = " \
> >> + /boot/${KERNEL_IMAGETYPE}* \
> >> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
> >> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
> >> +"
> >> FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
> >> FILES_kernel-vmlinux = "/boot/vmlinux*"
> >> RDEPENDS_kernel = "kernel-base"
> >
> > Should these really be installed into every system with a kernel?
> > Doesn't systemtap also need other symbol information so these files
> > would be better off in whatever other packages systemtap also needs?
> >
> > Cheers,
> >
> > Richard
>
> Running systemtap probes without these files results in warning such as the following when trying to install packages:
>
> Installing kernel-image-3.5.7.11 (3.5.7.11+gitr4+524c7f7782e2c671cccab87aafa1ee41f7202aaf-r6) to root...
> Configuring kernel-image-3.5.7.11.
> WARNING: could not open /lib/modules/3.5.7.11/modules.order: No such file or directory
> WARNING: could not open /lib/modules/3.5.7.11/modules.builtin: No such file or directory
>
> but I suspect systemtap is not the only place where these files are used. Below is the description of these files from the kernel Documentation/kbuild/kbuild.txt and they seem valuable on any module based system.
>
> modules.order
> --------------------------------------------------
> This file records the order in which modules appear in Makefiles. This
> is used by modprobe to deterministically resolve aliases that match
> multiple modules.
>
> modules.builtin
> --------------------------------------------------
> This file lists all modules that are built into the kernel. This is used
> by modprobe to not fail when trying to load something builtin.
>
Hmm, is this happening when using the crosstap script? I haven't seen
it before..
If this is happening when trying to compile probes on the target, that
isn't really supported yet, but there's a bug open for it in 1.5:
Bug 4442 - systemtap: make it usable on-target
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4442
Part of that would be to get all the debug symbols systemtap needs on
the target, which as Richard mentions would be overkill to install on
every system regardless of whether systemtap or something else that
needs the kernel debug symbols was also installed..
It's on my plate for 1.5, but I haven't really spend much time thinking
about it yet..
Tom
>
> Regards,
> Drew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kernel: Package additional modules files needed for systemtap
2013-05-15 13:23 ` Moseley, Drew
2013-05-15 13:34 ` Tom Zanussi
@ 2013-05-15 13:54 ` Bruce Ashfield
1 sibling, 0 replies; 6+ messages in thread
From: Bruce Ashfield @ 2013-05-15 13:54 UTC (permalink / raw)
To: Moseley, Drew; +Cc: <openembedded-core@lists.openembedded.org>
On 13-05-15 09:23 AM, Moseley, Drew wrote:
> On May 15, 2013, at 1:39 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>> On Tue, 2013-05-14 at 17:59 -0700, Drew Moseley wrote:
>>> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
>>> ---
>>> meta/classes/kernel.bbclass | 8 +++++---
>>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>> index 6ba31bd..f23818e 100644
>>> --- a/meta/classes/kernel.bbclass
>>> +++ b/meta/classes/kernel.bbclass
>>> @@ -108,8 +108,6 @@ kernel_do_install() {
>>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>>> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>>> 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
>>> @@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
>>> # kernel-image becomes kernel-image-${KERNEL_VERISON}
>>> PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
>>> FILES = ""
>>> -FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
>>> +FILES_kernel-image = " \
>>> + /boot/${KERNEL_IMAGETYPE}* \
>>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
>>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
>>> +"
>>> FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
>>> FILES_kernel-vmlinux = "/boot/vmlinux*"
>>> RDEPENDS_kernel = "kernel-base"
>>
>> Should these really be installed into every system with a kernel?
>> Doesn't systemtap also need other symbol information so these files
>> would be better off in whatever other packages systemtap also needs?
>>
>> Cheers,
>>
>> Richard
>
> Running systemtap probes without these files results in warning such as the following when trying to install packages:
>
> Installing kernel-image-3.5.7.11 (3.5.7.11+gitr4+524c7f7782e2c671cccab87aafa1ee41f7202aaf-r6) to root...
> Configuring kernel-image-3.5.7.11.
> WARNING: could not open /lib/modules/3.5.7.11/modules.order: No such file or directory
> WARNING: could not open /lib/modules/3.5.7.11/modules.builtin: No such file or directory
>
> but I suspect systemtap is not the only place where these files are used. Below is the description of these files from the kernel Documentation/kbuild/kbuild.txt and they seem valuable on any module based system.
It isn't the only place, and there have been a few silent warnings
thrown from tools (most simply continue to work when the files are
missing). We've run into them before, in particular when creating the
depmodwrapper-cross, and I know we considered changing the packaging
at that point, but instead of making it global, we made sure that
it was packaged when needed.
I've added MarkH to see if his memory is better than mine.
The files in question aren't exactly large, and they are useful in
several different scenarios.
My open question is if they should be packaged with kernel-dev, or
with kernel-image ? kernel-dev doesn't exactly fit, but that's where
other Module* artifacts are packaged (somewhat). kernel-image can
already be removed from the target, so adding the files there isn't
a big overhead.
The question to me is, does the complexity of not "just packaging"
the files, outweigh any size savings we'd have by not packaging
them.
Cheers,
Bruce
>
> modules.order
> --------------------------------------------------
> This file records the order in which modules appear in Makefiles. This
> is used by modprobe to deterministically resolve aliases that match
> multiple modules.
>
> modules.builtin
> --------------------------------------------------
> This file lists all modules that are built into the kernel. This is used
> by modprobe to not fail when trying to load something builtin.
>
>
> Regards,
> Drew
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kernel: Package additional modules files needed for systemtap
2013-05-15 13:34 ` Tom Zanussi
@ 2013-05-15 14:47 ` Moseley, Drew
0 siblings, 0 replies; 6+ messages in thread
From: Moseley, Drew @ 2013-05-15 14:47 UTC (permalink / raw)
To: Tom Zanussi
Cc: Ashfield, Bruce, <openembedded-core@lists.openembedded.org>
On May 15, 2013, at 9:34 AM, Tom Zanussi <tom.zanussi@intel.com> wrote:
> On Wed, 2013-05-15 at 13:23 +0000, Moseley, Drew wrote:
>> On May 15, 2013, at 1:39 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>>> On Tue, 2013-05-14 at 17:59 -0700, Drew Moseley wrote:
>>>> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
>>>> ---
>>>> meta/classes/kernel.bbclass | 8 +++++---
>>>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>>> index 6ba31bd..f23818e 100644
>>>> --- a/meta/classes/kernel.bbclass
>>>> +++ b/meta/classes/kernel.bbclass
>>>> @@ -108,8 +108,6 @@ kernel_do_install() {
>>>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>>>> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>>>> 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
>>>> @@ -259,7 +257,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
>>>> # kernel-image becomes kernel-image-${KERNEL_VERISON}
>>>> PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
>>>> FILES = ""
>>>> -FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
>>>> +FILES_kernel-image = " \
>>>> + /boot/${KERNEL_IMAGETYPE}* \
>>>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.order \
>>>> + ${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin \
>>>> +"
>>>> FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
>>>> FILES_kernel-vmlinux = "/boot/vmlinux*"
>>>> RDEPENDS_kernel = "kernel-base"
>>>
>>> Should these really be installed into every system with a kernel?
>>> Doesn't systemtap also need other symbol information so these files
>>> would be better off in whatever other packages systemtap also needs?
>>>
>>> Cheers,
>>>
>>> Richard
>>
>> Running systemtap probes without these files results in warning such as the following when trying to install packages:
>>
>> Installing kernel-image-3.5.7.11 (3.5.7.11+gitr4+524c7f7782e2c671cccab87aafa1ee41f7202aaf-r6) to root...
>> Configuring kernel-image-3.5.7.11.
>> WARNING: could not open /lib/modules/3.5.7.11/modules.order: No such file or directory
>> WARNING: could not open /lib/modules/3.5.7.11/modules.builtin: No such file or directory
>>
>> but I suspect systemtap is not the only place where these files are used. Below is the description of these files from the kernel Documentation/kbuild/kbuild.txt and they seem valuable on any module based system.
>>
>> modules.order
>> --------------------------------------------------
>> This file records the order in which modules appear in Makefiles. This
>> is used by modprobe to deterministically resolve aliases that match
>> multiple modules.
>>
>> modules.builtin
>> --------------------------------------------------
>> This file lists all modules that are built into the kernel. This is used
>> by modprobe to not fail when trying to load something builtin.
>>
>
> Hmm, is this happening when using the crosstap script? I haven't seen
> it before..
>
> If this is happening when trying to compile probes on the target, that
> isn't really supported yet, but there's a bug open for it in 1.5:
>
> Bug 4442 - systemtap: make it usable on-target
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=4442
>
> Part of that would be to get all the debug symbols systemtap needs on
> the target, which as Richard mentions would be overkill to install on
> every system regardless of whether systemtap or something else that
> needs the kernel debug symbols was also installed..
>
> It's on my plate for 1.5, but I haven't really spend much time thinking
> about it yet..
>
> Tom
>
Hi Tom,
This warning occurs when installing an updated kernel package using opkg. It's primarily in a debug scenario so not a terribly high priority situation.
Drew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-15 15:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 0:59 [PATCH] kernel: Package additional modules files needed for systemtap Drew Moseley
2013-05-15 5:39 ` Richard Purdie
2013-05-15 13:23 ` Moseley, Drew
2013-05-15 13:34 ` Tom Zanussi
2013-05-15 14:47 ` Moseley, Drew
2013-05-15 13:54 ` Bruce Ashfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox