public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: claudius.heine.ext@siemens.com, isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: Re: [PATCH] linux-module/autoload: allow defining multiple modules with custom name
Date: Tue, 25 Sep 2018 20:37:28 +0300	[thread overview]
Message-ID: <0402d1d4-63b8-6d4c-3185-9ada89bdd749@ilbers.de> (raw)
In-Reply-To: <20180912114258.19139-1-claudius.heine.ext@siemens.com>

On 9/12/18 2:42 PM, claudius.heine.ext@siemens.com wrote:
> From: Claudius Heine <ch@denx.de>
> 
> 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 <ch@denx.de>
> ---
>   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

      parent reply	other threads:[~2018-09-25 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 11:42 claudius.heine.ext
2018-09-12 12:22 ` Henning Schild
2018-09-12 12:31   ` Henning Schild
2018-09-25 17:37 ` Maxim Yu. Osipov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0402d1d4-63b8-6d4c-3185-9ada89bdd749@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=ch@denx.de \
    --cc=claudius.heine.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox