From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6600302104896602112 X-Received: by 2002:a2e:95ce:: with SMTP id y14-v6mr41109ljh.12.1536755510513; Wed, 12 Sep 2018 05:31:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:434e:: with SMTP id o14-v6ls121107lfl.17.gmail; Wed, 12 Sep 2018 05:31:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/RT4gzSvWmjUCP0vMRFgSXwBKdblNr38D9cpUCIeiDC6Yx0jdOhPSN7poD19u5l1mTq/R X-Received: by 2002:a19:c9c2:: with SMTP id z185-v6mr55365lff.10.1536755510059; Wed, 12 Sep 2018 05:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536755510; cv=none; d=google.com; s=arc-20160816; b=YkX3JZwxIWyQqKchB1Q3Cp2fNLXEZUPQF7G7EJO0yl0Ce+bxTFqa03qQrUx2rAHl6k qDNO/WFOHtErQK4Lo08Wu58UUjWVTjZHp69daVk0GDifFVjkDmrGwHRPJ6R6k+r29mVP +hfaYNqbEK/tXcgoBwpTZh2n6gK25vTK2QDpz11r7WuAL5EsTWA06QA5R5dgDdUpYrmj qvv3Yg6z4WNSCaJ+YWgKxjQ/LnT3LNqBMEWmhuOuCCb113I+3/gqpouUItH1KL/rw3Lu jLTM0Y61BP09GsoC7q6Ny3kvc677U1Vwg81vNk+eT23WJ8/mAWbzezvuIfOdLgpJH+lQ Izrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=rd4djp/7ueim5UUF0jmhNBMiUYKwXQuMzcrGe5wAnLQ=; b=0BqVR+9TC/8RyXAzg5cUfZyxRHXO0cdC/atrT3hQWs2EXo3MBvfAtEYewHu0vf8QA2 UBBYwi/aK8+RsLyTfkSHQVre9yL5gUYjN5XsfmH/ujhPdJgG453Z2JyHVeUQAv9ezPJ0 ehZzuI5FIzzfyQ+TmTbGSyPMlFAoL4RWuc/6iq8pby2EpkvjfAQJ2Z4TjOhF0k65yP8a k6D7AbAVtMtgWQGn6gz8yrj1T127+qvEihYN/1F16lSkKKh1LsOgUr1/Zyzfobm/GmFv j9WNqAqdMWQq8Gu/9/SK3jWhg8XtJyjVlgLMAd8S4Fh+6W8CuMoAcPKnBC6cmeUc/3yA BQBg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id q4-v6si25253ljj.5.2018.09.12.05.31.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w8CCVl1X018076 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 14:31:48 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w8CCVllC011129; Wed, 12 Sep 2018 14:31:47 +0200 Date: Wed, 12 Sep 2018 14:31:47 +0200 From: Henning Schild To: "[ext] claudius.heine.ext@siemens.com" Cc: , Claudius Heine , "Kiszka, Jan (CT RDA IOT SES-DE)" Subject: Re: [PATCH] linux-module/autoload: allow defining multiple modules with custom name Message-ID: <20180912143147.5112e22b@md1pvb1c.ad001.siemens.net> In-Reply-To: <20180912142237.492d99cb@md1pvb1c.ad001.siemens.net> References: <20180912114258.19139-1-claudius.heine.ext@siemens.com> <20180912142237.492d99cb@md1pvb1c.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: lSLcHJgDNGeX Am Wed, 12 Sep 2018 14:22:37 +0200 schrieb "[ext] Henning Schild" : > Am Wed, 12 Sep 2018 13:42:58 +0200 > schrieb "[ext] claudius.heine.ext@siemens.com" > : > > > From: Claudius Heine > > > > Currently `AUTOLOAD` only supports binary operation that defines if > > a module (with the same name as the recipe) should be loaded or not. > > This is very cumbersome to work with if one recipe allows deployment > > of multiple modules or if the module name differs from the recipe > > name. > > > > With this patch `AUTOLOAD` will have a new meaning, it revers to a > > bitbake array that contains the module names. > > > > This commit breaks the usage of `AUTOLOAD`. Recipes will need to > > replace all their: > > > > AUTOLOAD = "1" > > > > lines with: > > > > AUTOLOAD = "${PN}" > > > > And their: > > > > AUTOLOAD = "0" > > > > lines with: > > > > AUTOLOAD = "" > > > > in order to migrate to the new interface. > > > > Signed-off-by: Claudius Heine > > --- > > meta-isar/recipes-kernel/example-module/example-module.bb | 2 +- > > meta/recipes-kernel/linux-module/module.inc | 8 > > ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git > > a/meta-isar/recipes-kernel/example-module/example-module.bb > > b/meta-isar/recipes-kernel/example-module/example-module.bb index > > 6b63ae3..1a4554a 100644 --- > > a/meta-isar/recipes-kernel/example-module/example-module.bb +++ > > b/meta-isar/recipes-kernel/example-module/example-module.bb @@ -11,7 > > +11,7 @@ SRC_URI += "file://src" S = "${WORKDIR}/src" > > > > -AUTOLOAD = "1" > > +AUTOLOAD = "${PN}" > > > > # Cross-compilation is not supported for the default Debian > > kernels. # For example, package with kernel headers for ARM: > > diff --git a/meta/recipes-kernel/linux-module/module.inc > > b/meta/recipes-kernel/linux-module/module.inc index 7bc29a8..af7526f > > 100644 --- a/meta/recipes-kernel/linux-module/module.inc > > +++ b/meta/recipes-kernel/linux-module/module.inc > > @@ -13,7 +13,7 @@ DEPENDS += "linux-headers-${KERNEL_NAME}" > > > > SRC_URI += "file://debian/" > > > > -AUTOLOAD ?= "0" > > +AUTOLOAD ?= "" > > > > inherit dpkg > > > > @@ -24,7 +24,7 @@ do_prepare_prepend() { > > -e 's/@DESCRIPTION@/${DESCRIPTION}/g' \ > > ${S}/debian/changelog ${S}/debian/control > > > > - if [ ${AUTOLOAD} = "1" ]; then > > - echo "echo ${PN} >> /etc/modules" >> ${S}/debian/postinst > > - fi > > + for module in "${AUTOLOAD}"; do > > + echo "echo $module >> /etc/modules" >> ${S}/debian/postinst > > + done > > I know that is not the scope of the patch, but here we have an > update/uninstall problem here. > > In fact we should probably package /etc/modules-load.d/${PN}.conf > with a "\n" separated list of modules to autoload. > > Now ... thinking about it this way, the debianization of the package > should do that and the whole AUTOLOAD thingy should be dropped from > Isar. Ok, that code is actually a debianization helper so it has to deal with that. In that case it is all fine, except that we might want to enable generation of /etc/modules-load.d/ files some day. And do the postinst steps only if we are not running on systemd. And think about postrm steps as well. Henning > Henning > > > } >