From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] template-src-linux-driver: Only install driver if selected
Date: Wed, 12 Dec 2018 12:18:46 +0100 [thread overview]
Message-ID: <20181212111846.zb3kxfs6jsc5rgef@pengutronix.de> (raw)
In-Reply-To: <20181212104238.8287-1-abbotti@mev.co.uk>
On Wed, Dec 12, 2018 at 10:42:38AM +0000, Ian Abbott wrote:
> If a local package "foo-mod" for a Linux kernel module is selected by a
> local tristate configuration option PTXCONF_FOO_MOD, then based on the
> template for Linux drivers, it would include the following in its
> foo-mod.make file:
>
> ifdef PTXCONF_FOO_MOD
> $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
> endif
>
> However, this rule will be invoked even if the PTXCONF_FOO_MOD option
> has been configured with the tristate option 'm' and has not been
> changed to 'y' by a selected_collectionconfig. This causes the Linux
> kernel module to be built and installed unintentionally. To prevent
> that happening, the above lines in the foo-mod.make file can be changed
> as follows (only the conditional test is changed):
>
> ifeq ($(PTXCONF_FOO_MOD),y)
> $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
> endif
>
> This patch changes the template for Linux driver packages in accordance
> with the above change.
No, this break building if PTXCONF_FOO_MOD=m and no collection is selected.
Untested:
ifneq ($(filter foo-mod,$(PTX_PACKAGES_SELECTED)),)
Michael
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> rules/templates/template-src-linux-driver-make | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make
> index e06a22497..c970c43d6 100644
> --- a/rules/templates/template-src-linux-driver-make
> +++ b/rules/templates/template-src-linux-driver-make
> @@ -22,7 +22,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
> @PACKAGE@_DIR := $(BUILDDIR)/$(@PACKAGE@)
> @PACKAGE@_LICENSE := unknown
>
> -ifdef PTXCONF_@PACKAGE@
> +ifeq ($(PTXCONF_@PACKAGE@),y)
> $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/@package@.targetinstall
> endif
>
> --
> 2.19.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-12-12 11:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 10:42 Ian Abbott
2018-12-12 11:18 ` Michael Olbrich [this message]
2018-12-13 12:02 ` Ian Abbott
2018-12-13 12:07 ` [ptxdist] [PATCH v2] " Ian Abbott
2019-01-18 17:37 ` Ian Abbott
2019-01-18 20:18 ` Ian Abbott
2019-01-21 8:02 ` Michael Olbrich
2019-01-21 11:19 ` Ian Abbott
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=20181212111846.zb3kxfs6jsc5rgef@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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