* [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script
@ 2015-03-23 15:39 Andreas Oberritter
2015-03-23 20:51 ` Bruce Ashfield
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Oberritter @ 2015-03-23 15:39 UTC (permalink / raw)
To: openembedded-core
When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
"modprobe None" to get appended to the postinst script.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/classes/kernel-module-split.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 68a23f8..e1a70e6 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -148,7 +148,7 @@ python split_kernel_module_packages () {
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
if not postinst:
bb.fatal("pkg_postinst_%s not defined" % pkg)
- postinst += d.getVar('autoload_postinst_fragment', True) % autoload
+ postinst += d.getVar('autoload_postinst_fragment', True) % (autoload or basename)
d.setVar('pkg_postinst_%s' % pkg, postinst)
# Write out any modconf fragment
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script
2015-03-23 15:39 [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script Andreas Oberritter
@ 2015-03-23 20:51 ` Bruce Ashfield
2015-03-23 22:03 ` Andreas Oberritter
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2015-03-23 20:51 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: Patches and discussions about the oe-core layer
On Mon, Mar 23, 2015 at 11:39 AM, Andreas Oberritter
<obi@opendreambox.org> wrote:
> When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
> "modprobe None" to get appended to the postinst script.
I stared at this a bit and it looks right to me, but let me ask a
question. Are you saying
that KERNEL_MODULE_AUTOLOAD isn't working for anyone ? Or just in a specific
configuration ?
I don't have a build to check this at the moment, but I swear my
autoloads were working!
Bruce
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
> meta/classes/kernel-module-split.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
> index 68a23f8..e1a70e6 100644
> --- a/meta/classes/kernel-module-split.bbclass
> +++ b/meta/classes/kernel-module-split.bbclass
> @@ -148,7 +148,7 @@ python split_kernel_module_packages () {
> postinst = d.getVar('pkg_postinst_%s' % pkg, True)
> if not postinst:
> bb.fatal("pkg_postinst_%s not defined" % pkg)
> - postinst += d.getVar('autoload_postinst_fragment', True) % autoload
> + postinst += d.getVar('autoload_postinst_fragment', True) % (autoload or basename)
> d.setVar('pkg_postinst_%s' % pkg, postinst)
>
> # Write out any modconf fragment
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script
2015-03-23 20:51 ` Bruce Ashfield
@ 2015-03-23 22:03 ` Andreas Oberritter
2015-03-24 13:25 ` Bruce Ashfield
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Oberritter @ 2015-03-23 22:03 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer
On 23.03.2015 21:51, Bruce Ashfield wrote:
> On Mon, Mar 23, 2015 at 11:39 AM, Andreas Oberritter
> <obi@opendreambox.org> wrote:
>> When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
>> "modprobe None" to get appended to the postinst script.
>
> I stared at this a bit and it looks right to me, but let me ask a
> question. Are you saying
> that KERNEL_MODULE_AUTOLOAD isn't working for anyone ? Or just in a specific
> configuration ?
>
> I don't have a build to check this at the moment, but I swear my
> autoloads were working!
It already works on boot. This patch only fixes autoloading of modules
installed from a package feed, i.e. modprobed by a postinst script.
Regards,
Andreas
>
> Bruce
>
>>
>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> ---
>> meta/classes/kernel-module-split.bbclass | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
>> index 68a23f8..e1a70e6 100644
>> --- a/meta/classes/kernel-module-split.bbclass
>> +++ b/meta/classes/kernel-module-split.bbclass
>> @@ -148,7 +148,7 @@ python split_kernel_module_packages () {
>> postinst = d.getVar('pkg_postinst_%s' % pkg, True)
>> if not postinst:
>> bb.fatal("pkg_postinst_%s not defined" % pkg)
>> - postinst += d.getVar('autoload_postinst_fragment', True) % autoload
>> + postinst += d.getVar('autoload_postinst_fragment', True) % (autoload or basename)
>> d.setVar('pkg_postinst_%s' % pkg, postinst)
>>
>> # Write out any modconf fragment
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script
2015-03-23 22:03 ` Andreas Oberritter
@ 2015-03-24 13:25 ` Bruce Ashfield
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2015-03-24 13:25 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: Patches and discussions about the oe-core layer
On Mon, Mar 23, 2015 at 6:03 PM, Andreas Oberritter
<obi@opendreambox.org> wrote:
> On 23.03.2015 21:51, Bruce Ashfield wrote:
>> On Mon, Mar 23, 2015 at 11:39 AM, Andreas Oberritter
>> <obi@opendreambox.org> wrote:
>>> When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
>>> "modprobe None" to get appended to the postinst script.
>>
>> I stared at this a bit and it looks right to me, but let me ask a
>> question. Are you saying
>> that KERNEL_MODULE_AUTOLOAD isn't working for anyone ? Or just in a specific
>> configuration ?
>>
>> I don't have a build to check this at the moment, but I swear my
>> autoloads were working!
>
> It already works on boot. This patch only fixes autoloading of modules
> installed from a package feed, i.e. modprobed by a postinst script.
Aha! Right you are, and of course the writing of the modules-load.d is already
using basename.
The entire routine could use a bit of cleaning up .. but this fix does
in fact look
fine to me.
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>
> Regards,
> Andreas
>
>>
>> Bruce
>>
>>>
>>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>>> ---
>>> meta/classes/kernel-module-split.bbclass | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
>>> index 68a23f8..e1a70e6 100644
>>> --- a/meta/classes/kernel-module-split.bbclass
>>> +++ b/meta/classes/kernel-module-split.bbclass
>>> @@ -148,7 +148,7 @@ python split_kernel_module_packages () {
>>> postinst = d.getVar('pkg_postinst_%s' % pkg, True)
>>> if not postinst:
>>> bb.fatal("pkg_postinst_%s not defined" % pkg)
>>> - postinst += d.getVar('autoload_postinst_fragment', True) % autoload
>>> + postinst += d.getVar('autoload_postinst_fragment', True) % (autoload or basename)
>>> d.setVar('pkg_postinst_%s' % pkg, postinst)
>>>
>>> # Write out any modconf fragment
>>> --
>>> 1.9.1
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-24 13:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-23 15:39 [PATCH] kernel-module-split.bbclass: fix autoloading from postinst script Andreas Oberritter
2015-03-23 20:51 ` Bruce Ashfield
2015-03-23 22:03 ` Andreas Oberritter
2015-03-24 13:25 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.