From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6600302104896602112 X-Received: by 2002:a19:e4cc:: with SMTP id x73-v6mr51735lfi.19.1536754959870; Wed, 12 Sep 2018 05:22:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9e03:: with SMTP id e3-v6ls167329ljk.4.gmail; Wed, 12 Sep 2018 05:22:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbhuZcUgZ82D3mG+foa04s2K/0wGvRUT+x5wOwUKnoH88hwcu4LYWlRornTC+qXkrEWSiox X-Received: by 2002:a2e:9048:: with SMTP id n8-v6mr39338ljg.44.1536754959420; Wed, 12 Sep 2018 05:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536754959; cv=none; d=google.com; s=arc-20160816; b=I7x7aQHb4gKWCtBSzg+Ol/TljxGtfds6CDKGpXabpJV0eUNTqa7tHUbL8Z4ia5edgD PfPC8GABjnzR+RozrSIdRiWsUlIcb9ObWepbqG0jVwwDv/WKoBxPVS8qBO1wSpbQklTA eHFbsjnzB3VW/txsLK4qCAN00QewyJh473Wiu7ioouyO1dJTw2SfNkg23BX116QAq0IQ m0hxlnQ60ei1fLVbzqKGkzcwCDEiMoMtya55kPCqrnNs13dxgq7eRMhgdDdD0whEqMJ5 A5eNFlS/iTNd8QS/SWuJZ8BvA+bBlenWgGvjMQ39WaQ2yS0bkmLkSKY9Gwy4KQTwhZK1 NPRQ== 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=JSvjh0lUGknWaltBZCnndUmwgpQZiNqZTRYtKnqbQ5U=; b=UGoTKrEeDfryjDGpncN7oBTth6yU68hFv8yDZCe/Yxezy5/6e7u7CoR6K61jwBd3Sx NXqZpWjhxlZnNn2otS9Nqw9n4Y9aXYH85GlSjJHWlgXwxvmCdl2tu7QndAjw3mcb/i2j WlnKsugnlTFUCMtaKoL/9jiZcB5ONHLO0T+6Y6SiVYxGSWGIHCN0A60h5+uvt8QwJJy9 /anL4//8zDDwML+Yfy+6I1qz4M/SkAN+Z65CoqOyF6CVZ2/Uorx0w7/gmMR3B/ml67aq O7W/3scc77MOfWGTb6MTgzUzQ190l6s4UFzIOkmHLN3jNyD7wK3XUbBY5xW22vZCTFa8 Okow== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id i67-v6si25683lfb.3.2018.09.12.05.22.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:22:39 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w8CCMcgT021437 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 14:22:38 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w8CCMbhp022896; Wed, 12 Sep 2018 14:22:37 +0200 Date: Wed, 12 Sep 2018 14:22:37 +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: <20180912142237.492d99cb@md1pvb1c.ad001.siemens.net> In-Reply-To: <20180912114258.19139-1-claudius.heine.ext@siemens.com> References: <20180912114258.19139-1-claudius.heine.ext@siemens.com> 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: rIOxD4KHJDYU 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. Henning > }