From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6529810911033556992 X-Received: by 10.80.243.7 with SMTP id p7mr6224847edm.1.1520408177876; Tue, 06 Mar 2018 23:36:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.190.10 with SMTP id a10ls613395edi.6.gmail; Tue, 06 Mar 2018 23:36:17 -0800 (PST) X-Google-Smtp-Source: AG47ELvsTOXzFGAoF1dibuT8wTVimqRV+dZrIKdVOyycifszUIHqefGOMLRrb1tTRT6XEy5gWeK2 X-Received: by 10.80.202.199 with SMTP id f7mr6223457edi.12.1520408177385; Tue, 06 Mar 2018 23:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520408177; cv=none; d=google.com; s=arc-20160816; b=kOjzcmciqM4bkzh9zZ5oRcuNya9v9dD2zhWFWdyROxlAERFMa0+9AZiINFcTWRXo7i 0fTSpj8cDkBtwqoEKqmMLjpwijIuKTAX+sV5kjra9rDQZ4DCaJvvHX3gJlTaFXRDAM2K hmY2V8+rEDDKgoLf8uTr5OBL0ya/ig2Fc7gstVHgtjVCBs5exiIQxn++pIKG1klPv8Ya ROrQtKuvTp6+AxtZ9bjFGTLuPpd7WqC5ntJFraGKnd6xaCIS+d1d0L0GiVPkslKp+eVt yrZ9XOTA1LzpPFXk87SY2wmL0FWRoIRzERc2GcRMIYHblpy6didhepMg04lKqOgjFY3B kHKA== 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=+miGatF6DFJfIqFVqhLRJZOHPx4b0WqYgBPrl1A1uFs=; b=GnV8ERMmIbLlCzqMWjlI6SpSpOf2kI3lN1daiugc5ZxEa+zF2hP2NKy4hKEnCLQd8j uvgVGd+4zyYQazEc4Yq06JFdN+TwMD2aJzx/uOWebJj2NyXeRkIo/6r1QS61VM8ZTZcm K9LvSMCrJNP2f/j0trW0oQNlXQDB0oup7yXGRr6FTAx30JWtV9sjM+6XJLxM4l+dnRx1 SogankHZMrkqznFyq3LFijg2ZJyorHpON8Olmkn02ub2RjftoDeTL9d8TJwhw6eoe6s5 ulUfCXJDFVz3lnK/19nofoOJ9SjwkyQNDrSRl2F3LVxQxQPuv03p+4zjocF1nB1Okp0y KaVQ== 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 h9si586633edi.4.2018.03.06.23.36.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 23:36:17 -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 w277aDKG017795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 7 Mar 2018 08:36:15 +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: Date: Wed, 7 Mar 2018 10:36:06 +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: 7bit X-TUID: tnfsd/ZfBUMe 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. Alex > > Jan > >> Description: @DESCRIPTION@ >> diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc >> index aa232f7..0684659 100644 >> --- a/meta/recipes-kernel/linux-module/module.inc >> +++ b/meta/recipes-kernel/linux-module/module.inc >> @@ -13,6 +13,8 @@ DEPENDS += "linux-headers-${KERNEL_NAME}" >> >> SRC_URI += "file://debian/" >> >> +AUTOLOAD ?= "0" >> + >> inherit dpkg >> >> dpkg_runbuild_prepend() { >> @@ -21,4 +23,9 @@ dpkg_runbuild_prepend() { >> -e 's/@KERNEL_NAME@/${KERNEL_NAME}/g' \ >> -e 's/@DESCRIPTION@/${DESCRIPTION}/g' \ >> ${WORKDIR}/${S}/debian/changelog ${WORKDIR}/${S}/debian/control >> + >> + if [ ${AUTOLOAD} = "1" ]; then >> + echo "echo ${PN} > /etc/modules-load.d/${PN}.conf" >> ${WORKDIR}/${S}/debian/postinst >> + chmod +x ${WORKDIR}/${S}/debian/postinst >> + fi >> } >> > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov