From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6529810911033556992 X-Received: by 10.223.184.60 with SMTP id h57mr2014320wrf.0.1520410429315; Wed, 07 Mar 2018 00:13:49 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.214.21 with SMTP id n21ls252241wmg.10.canary-gmail; Wed, 07 Mar 2018 00:13:48 -0800 (PST) X-Google-Smtp-Source: AG47ELvM2MNkTqXrPdHuNgCdL2y6B5RxCFZ7SPlFL/1MNBao4BEIRrceB1cyt8Ucn6Xf4hIwdSpm X-Received: by 10.28.230.84 with SMTP id d81mr868192wmh.12.1520410428714; Wed, 07 Mar 2018 00:13:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520410428; cv=none; d=google.com; s=arc-20160816; b=zGe+EUN97r1oz7J0cAme+N7eTi3AURhXkooSFVdfTjIISxiQLJpK3R7f5jLjVRyisk 1uK2pwsPyu3b5Mh1c1p3T2CB/MCS7pXjLKildwwN7mbM79izrDEk/ZrOKr6tAbrCdG0/ XCHAOZloBXZWiQKWrylLCWxQdWTRQ9ZcmuFPAtRWPuaCE6sURlAfC2OMrHIz+woxn6nZ gOnnyJterdPid7p2P/HHwknixxoTIsc5F/070t5E2fLbjtiLfWwADLSNf61h/NEt3bUw rnv/ViMOY0S2ePmQglxjJEw1oOn9jCWUdXAq602SmdJmRxUeIyLCw2t7u6nG12P2L30q nMmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=FNIimEfsjjcbq9pAbzPP2fpgTjmh5towqm0d1jkcMow=; b=SMbMajlsBGZgMrc8BeFIDX9uiHe/PRA3VQSZIN36LugOpEdaxPvtsJa3aSadfc814D MCXV6bF4IOYORGWrCRyI3mZ+tCyKP4nmVcYoy8I3+1IxwnW9Absqfy4hP/JPtu2qwZZX MZ6qSCBfk4Sm9RCstavdb2/TUhM90liaIZQyecsE9XeRmgP6qwRMYKBeeNwW5/wrmWEI YItDa7DA2qvWFyMmyDW6A14bx30vcL0tvnjNfmGwA908mi41gR20NWvSNIWALWePGYOg MUkV68s0v9VP099FA9iYf7ewoqLSs7x7Zdikf4PXm45zbw52uikjAxHp5xJgAnJxShgh 4aqA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id r10si510603wmg.2.2018.03.07.00.13.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 00:13:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w278Djq8017973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 7 Mar 2018 09:13:47 +0100 Subject: Re: [PATCH 1/4] kernel/module: Add AUTOLOAD option To: Jan Kiszka , isar-users@googlegroups.com References: <20180306124055.15990-1-asmirnov@ilbers.de> <20180306124055.15990-2-asmirnov@ilbers.de> From: Alexander Smirnov Message-ID: <34656d7c-ff20-8785-c181-d47f4cc2540d@ilbers.de> Date: Wed, 7 Mar 2018 11:13:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: PPFf4kEZfr9c 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 >>>> --- >>>>   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 >>>>     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