From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>,
<isar-users@googlegroups.com>
Cc: Pingfang Liao <Pingfang.Liao@siemens.com>,
Florian Bezdeka <florian.bezdeka@siemens.com>
Subject: Re: [PATCH v2 2/3] linux-module: honor modules Makefile
Date: Thu, 1 Sep 2022 18:08:08 +0200 [thread overview]
Message-ID: <ac865a78-6754-59e8-d4a4-9fb7bfdde9b9@siemens.com> (raw)
In-Reply-To: <20220827085905.6116-2-henning.schild@siemens.com>
On 27.08.22 10:59, Henning Schild wrote:
> External modules might have their own appends and target definitions in
> their Makefile. All we need to give them is the target name and KDIR,
> not dive into KDIR right away.
My observation with external modules makefile having their own rules is
that they generally also have their own KDIR variables. There is no
standard way of telling those pick up the kernel from a standard place
and install it at the standard location.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta/recipes-kernel/linux-module/files/debian/rules.tmpl | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> index d3bd7dc30f21..0d16186b5ff3 100755
> --- a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> +++ b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
> @@ -48,13 +48,13 @@ KDIR := $(shell dpkg -L $(KERNEL_DEP) | grep "/lib/modules/.*/build")
> endif
>
> override_dh_auto_clean:
> - $(MAKE) -C $(KDIR) M=$(PWD) clean
> + $(MAKE) KDIR=$(KDIR) clean
>
> override_dh_auto_build:
> - $(MAKE) -C $(KDIR) M=$(PWD) modules
> + $(MAKE) KDIR=$(KDIR) modules
>
> override_dh_auto_install:
> - $(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(PWD)/debian/${PN} modules_install
> + $(MAKE) KDIR=$(KDIR) INSTALL_MOD_PATH=$(PWD)/debian/${PN} modules_install
>
> %:
> CFLAGS= LDFLAGS= dh $@ --parallel
This breaks existing users with makefile that are unusable or do not
have own rules. I would refrain from that breakage.
If you have a more complex case than what we support, you can simply
provide your own rules and can then even account for the other
specialties that usually come with such module makefiles.
Same arguing applies to patch 3.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
next prev parent reply other threads:[~2022-09-01 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 8:59 [PATCH v2 1/3] example-module: improve Makefile to be more realistic Henning Schild
2022-08-27 8:59 ` [PATCH v2 2/3] linux-module: honor modules Makefile Henning Schild
2022-09-01 16:08 ` Jan Kiszka [this message]
2022-09-01 17:17 ` Henning Schild
2022-09-01 19:46 ` Jan Kiszka
2022-08-27 8:59 ` [PATCH v2 3/3] linux-module: call the install target of external modules Henning Schild
2022-09-01 16:08 ` [PATCH v2 1/3] example-module: improve Makefile to be more realistic Jan Kiszka
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=ac865a78-6754-59e8-d4a4-9fb7bfdde9b9@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=Pingfang.Liao@siemens.com \
--cc=florian.bezdeka@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