From: "Bezdeka, Florian" <florian.bezdeka@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Schild, Henning" <henning.schild@siemens.com>
Cc: "Pingfang.Liao@siemens.com" <Pingfang.Liao@siemens.com>
Subject: Re: [PATCH] linux-module: make sure out-of-tree modules win over built-in
Date: Fri, 26 Aug 2022 11:34:22 +0000 [thread overview]
Message-ID: <ec3caec7315fc4c098bc7efbdb1faf29910e9f7b.camel@siemens.com> (raw)
In-Reply-To: <20220825204052.9151-1-henning.schild@siemens.com>
On Thu, 2022-08-25 at 22:40 +0200, Henning Schild wrote:
> If we built an out of tree module that happens to be already part of the
> kernel,
>
This hopefully does not happen in the wild and is likely a very special
situation we're facing internally while working on upstreaming some
driver stuff.
I'm not sure if this is really relevant for Isar itself. If the
decision is "let's take it", I would vote for "disabled per default".
> we want to make sure depmod prefers the external one. In order
> to do so simply include a config file into every module package, by
> default using the kernels default INSTALL_MOD_DIR which is "extra".
>
> Should there be multiple modules using different such directories, all
> recipes should set INSTALL_MOD_DIR listing them all in the desired
> order. That interface for multiple such very special modules is not nice
> but since they are pretty special it might be just good enough.
>
> Reported-by: Pingfang Liao <Pingfang.Liao@siemens.com>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta/recipes-kernel/linux-module/files/debian/rules.tmpl | 1 +
> meta/recipes-kernel/linux-module/module.inc | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> index d3bd7dc30f21..abd3c88fac7e 100755
> --- a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> +++ b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> @@ -55,6 +55,7 @@ override_dh_auto_build:
>
> override_dh_auto_install:
> $(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(PWD)/debian/${PN} modules_install
> + install -D -m 0644 $(PWD)/debian/${PN}.conf $(PWD)/debian/${PN}/usr/lib/depmod.d/${PN}.conf
>
> %:
> CFLAGS= LDFLAGS= dh $@ --parallel
> diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
> index b20ec32ae20a..475e7aef05ea 100644
> --- a/meta/recipes-kernel/linux-module/module.inc
> +++ b/meta/recipes-kernel/linux-module/module.inc
> @@ -29,9 +29,12 @@ TEMPLATE_FILES = "debian/control.tmpl \
> debian/rules.tmpl"
> TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG DEBIAN_BUILD_DEPENDS PN"
>
> +INSTALL_MOD_DIR ?= "extra"
> +
> do_prepare_build() {
> cp -r ${WORKDIR}/debian ${S}/
>
> + echo "search ${INSTALL_MOD_DIR} built-in" > ${S}/debian/${PN}.conf
> for module in ${AUTOLOAD}; do
> echo "echo $module >> /etc/modules" >> ${S}/debian/postinst
> done
> --
> 2.35.1
>
next prev parent reply other threads:[~2022-08-26 11:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 20:40 Henning Schild
2022-08-26 11:34 ` Bezdeka, Florian [this message]
2022-08-26 12:32 ` Henning Schild
2022-08-26 12:53 ` Henning Schild
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=ec3caec7315fc4c098bc7efbdb1faf29910e9f7b.camel@siemens.com \
--to=florian.bezdeka@siemens.com \
--cc=Pingfang.Liao@siemens.com \
--cc=henning.schild@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