From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6600302104896602112 X-Received: by 2002:adf:dd8e:: with SMTP id x14-v6mr245279wrl.19.1537897061339; Tue, 25 Sep 2018 10:37:41 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:c205:: with SMTP id x5-v6ls1780851wmi.8.canary-gmail; Tue, 25 Sep 2018 10:37:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV62lf1czbLkyj+xhX+dA3mpKXIGHcQpyBebHSqXyCwnE6BQluIPGiUoVUs+3ppmW6ctpPY7f X-Received: by 2002:a7b:c215:: with SMTP id x21-v6mr210647wmi.4.1537897060886; Tue, 25 Sep 2018 10:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537897060; cv=none; d=google.com; s=arc-20160816; b=UuaE4z5kvs7juRK0IG2NKXh4i94N3+Zr2tjHfEyRTW0rgiSKTVEcjTYF4dxPqFV2gS V7nPW4j8a3ZYifwENLqU0Y2LUcMUlfVQx0SeCZ9D0XA8vtGZ6W6o9p4z8iP4rJkpOEoG CVSCrfG5ZnYaligUQ0CI4DACjmf94PDbshzilLoDP+ThqncXVwAfS6kfDL44ME/c15FS vjPA3d9cM3bm51HRvfdvraABnx4rnoqcHyzXc71rOmlH1DpN/FYRXduKEJCb3i2x9zK/ FaOkRPBHlM6RlqXKeoCQTj51SWlmrfq3E4C/AfqdKWVMxexsd+zqm64zBAIFV9WHLvJK A/Lg== 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:organization:from:references:cc:to :subject; bh=Kwz/c2XPdjacowIRgAqD60fbMV1JdST7SsGptZUrH7E=; b=uMFPukWmV27yzTqLGJHWtV3YzfGZcearFEhCWDgWmbHbHG+XcH58xvFqVSbx7PtsZj nOqaQH0A2M00XnFfqdWORX5PMgbQ7AC3Zhmg1M6vt5hZRNc2FQOoqy5uATe5gIBC+ckj sQtuCDtj2i9Cn7fH5Q7csfsdmQGwZ7qL5EbRzC2Xk6GYifo18fAWr5YaTLYFEblGEg14 kH4oCynK7foaC4400gq4+j8M7a5su0fQpJ85ImwiohFcaFp0CEz/8E4xzegHSvxZncXA rO+pj26Z+x3Xj6MxTrKErYu5UKPztkJNL/WAqwPSrTEUyYzYHCvtb+iFG5pgGF5HDTOz yLkw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id z21-v6si122671wmi.2.2018.09.25.10.37.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 10:37:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of mosipov@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 mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (nat-ppp-217.71.235.199-satnet-spb.ru [217.71.235.199] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w8PHbXVo017231 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 25 Sep 2018 19:37:35 +0200 Subject: Re: [PATCH] linux-module/autoload: allow defining multiple modules with custom name To: claudius.heine.ext@siemens.com, isar-users@googlegroups.com Cc: Claudius Heine References: <20180912114258.19139-1-claudius.heine.ext@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <0402d1d4-63b8-6d4c-3185-9ada89bdd749@ilbers.de> Date: Tue, 25 Sep 2018 20:37:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180912114258.19139-1-claudius.heine.ext@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 3ZyICxlMv6VP On 9/12/18 2:42 PM, claudius.heine.ext@siemens.com wrote: > 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. Applied to the 'next', Thanks, Maxim. > 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 > } > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov