From: Alexander Smirnov <asmirnov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>, isar-users@googlegroups.com
Subject: Re: [PATCH 1/4] kernel/module: Add AUTOLOAD option
Date: Wed, 7 Mar 2018 11:13:40 +0300 [thread overview]
Message-ID: <34656d7c-ff20-8785-c181-d47f4cc2540d@ilbers.de> (raw)
In-Reply-To: <b3ec0507-fb68-19f9-92dd-80164bc772f4@siemens.com>
On 03/07/2018 10:39 AM, Jan Kiszka wrote:
> On 2018-03-07 08:36, Alexander Smirnov wrote:
>>
>>
>> On 03/07/2018 10:19 AM, Jan Kiszka wrote:
>>> On 2018-03-06 13:40, Alexander Smirnov wrote:
>>>> Add possibility to set kernel module to be autoloaded.
>>>> Also add run dependency from 'systemd' because this package owns the
>>>> content of '/etc/modules-load.d'.
>>>>
>>>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>>>> ---
>>>> meta/recipes-kernel/linux-module/files/debian/control | 2 +-
>>>> meta/recipes-kernel/linux-module/module.inc | 7 +++++++
>>>> 2 files changed, 8 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/recipes-kernel/linux-module/files/debian/control
>>>> b/meta/recipes-kernel/linux-module/files/debian/control
>>>> index 707f857..0eae9a4 100644
>>>> --- a/meta/recipes-kernel/linux-module/files/debian/control
>>>> +++ b/meta/recipes-kernel/linux-module/files/debian/control
>>>> @@ -7,5 +7,5 @@ Maintainer: ISAR project <isar-users@googlegroups.com>
>>>> Package: @PN@
>>>> Architecture: any
>>>> -Depends: linux-image-@KERNEL_NAME@
>>>> +Depends: linux-image-@KERNEL_NAME@, systemd
>>>
>>> Why this, BTW?
>>
>> See comment to the patch:
>>
>> 8<--
>> Also add run dependency from 'systemd' because this package owns the
>> content of '/etc/modules-load.d'.
>> 8<--
>>
>> So if this dependency is not set, the module.postinst script could be
>> run *before* '/etc/modules*' infrastructure is created.
>
> ...and that means?
>
> Also, is systemd now the only provider of this infrastructure in Debian?
>
I have no 100% evidences. I see that there are mainly 2 ways to load
kernel modules at boot time:
1. Add it to /etc/modules file. I've checked, this file is created by
kmod package (kmod.postinst), so dependency from kmod should be added.
2. Create separate config file with module in /etc/modules-load.d. This
folder is created by systemd. I've checked, this package is installed by
default for all the distributions: wheezy, jessie and stretch. But in
general I didn't find if that's the preferred way to load module.
Some official Debian wiki (https://wiki.debian.org/Modules) mentioned:
...
If you want to get a module to autoload when a device is accessed you
can often add a file to /etc/modutils and run update-modules to generate
/etc/modules.conf.
...
But 'man update-modules' states:
...
update-modules is an obsolete command which does nothing. Any program
calling it should be fixed by not using it anymore.
...
So, no idea what is the mainstream now.
Alex
next prev parent reply other threads:[~2018-03-07 8:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 12:40 [RFC][PATCH 0/4] Kernel module autoload Alexander Smirnov
2018-03-06 12:40 ` [PATCH 1/4] kernel/module: Add AUTOLOAD option Alexander Smirnov
2018-03-06 12:59 ` Jan Kiszka
2018-03-07 7:19 ` Jan Kiszka
2018-03-07 7:36 ` Alexander Smirnov
2018-03-07 7:39 ` Jan Kiszka
2018-03-07 8:13 ` Alexander Smirnov [this message]
2018-03-07 10:46 ` [PATCH v3 " Alexander Smirnov
2018-09-12 13:15 ` Henning Schild
2018-03-06 12:40 ` [PATCH 2/4] example-module: Do not return error on init Alexander Smirnov
2018-03-06 12:58 ` Jan Kiszka
2018-03-06 15:40 ` [PATCH v2 " Alexander Smirnov
2018-03-06 15:56 ` Jan Kiszka
2018-03-06 16:26 ` Alexander Smirnov
2018-03-06 12:40 ` [PATCH 3/4] example-module: Enable autoload Alexander Smirnov
2018-03-06 12:40 ` [PATCH 4/4] vm_smoke_test: Add check for kernel module Alexander Smirnov
2018-03-07 10:47 ` [PATCH v2 " Alexander Smirnov
2018-03-09 8:49 ` Henning Schild
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=34656d7c-ff20-8785-c181-d47f4cc2540d@ilbers.de \
--to=asmirnov@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/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