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 1/3] example-module: improve Makefile to be more realistic
Date: Thu, 1 Sep 2022 18:08:06 +0200 [thread overview]
Message-ID: <f85cccb4-142f-a9a4-1039-bcabeac467d1@siemens.com> (raw)
In-Reply-To: <20220827085905.6116-1-henning.schild@siemens.com>
On 27.08.22 10:59, Henning Schild wrote:
> A real out-of-tree module would be able to "make" on its own, finding
> its own KDIR and not rely on some external entity to provide that. But
> of cause allow KDIR to be provided from outside.
>
> Fixes: 8d9e4e3c0857 ("Add exemplary kernel module")
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> .../example-module/files/src/Makefile | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/meta-isar/recipes-kernel/example-module/files/src/Makefile b/meta-isar/recipes-kernel/example-module/files/src/Makefile
> index 2561cfd410e5..df3241652cf1 100644
> --- a/meta-isar/recipes-kernel/example-module/files/src/Makefile
> +++ b/meta-isar/recipes-kernel/example-module/files/src/Makefile
> @@ -1,8 +1,20 @@
> # Example module
> #
> # This software is a part of ISAR.
> -# Copyright (c) Siemens AG, 2018
> +# Copyright (c) Siemens AG, 2018-2022
> #
> # SPDX-License-Identifier: GPL-2.0
>
> obj-m := example-module.o
> +
> +INSTALL_MOD_PATH ?= $(DESTDIR)
> +export INSTALL_MOD_PATH
> +
> +KDIR ?= /lib/modules/$(shell uname -r)/build
> +
> +modules modules_install clean:
> + $(MAKE) -C $(KDIR) M=$(PWD) $@
> +
> +install: modules_install
> +
> +.PHONY: modules modules_install install clean
This is convenient of you call things on the command line but unneeded
for the minimal case that we also support in Isar. Therefore, it was not
added to this example.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
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 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
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 ` Jan Kiszka [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=f85cccb4-142f-a9a4-1039-bcabeac467d1@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