From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] usb_modeswitch: udev helper
Date: Fri, 22 Jan 2016 16:10:32 +0100 [thread overview]
Message-ID: <20160122151032.GC6233@pengutronix.de> (raw)
In-Reply-To: <20160122133855.GA15581@localhost.localdomain>
On Fri, Jan 22, 2016 at 02:38:55PM +0100, Ladislav Michl wrote:
> Install also udev helper and systemd service file
>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
> rules/usb-modeswitch.in | 20 +++++++++++++++++---
> rules/usb-modeswitch.make | 13 +++++++++++++
> 2 files changed, 30 insertions(+), 3 deletions(-)
>
> diff --git a/rules/usb-modeswitch.in b/rules/usb-modeswitch.in
> index aaefd86..28ba777 100644
> --- a/rules/usb-modeswitch.in
> +++ b/rules/usb-modeswitch.in
> @@ -1,11 +1,25 @@
> ## SECTION=shell_and_console
>
> -config USB_MODESWITCH
> - tristate
> - prompt "usb-modeswitch"
> +menuconfig USB_MODESWITCH
> + tristate "usb-modeswitch "
> select LIBUSB
> + select TCL if USB_MODESWITCH_UDEV_HELPER || USB_MODESWITCH_SYSTEMD_UNIT
select TCL if (USB_MODESWITCH_UDEV_HELPER || USB_MODESWITCH_SYSTEMD_UNIT) && RUNTIME
> help
> USB_ModeSwitch is (surprise!) a mode switching tool
> for controlling 'multi-mode' USB devices.
>
> +if USB_MODESWITCH
> +
> +config USB_MODESWITCH_UDEV_HELPER
> + bool "install udev helper"
> + default y
> + depends on UDEV
> +
> +config USB_MODESWITCH_SYSTEMD_UNIT
> + bool "install systemd unit file"
> + default y
> + depends on SYSTEMD
> +
> +endif
> +
> # vim: set sw=8 ts=8 noet ft=kconfig:
> diff --git a/rules/usb-modeswitch.make b/rules/usb-modeswitch.make
> index 4ebf0e8..3f558f7 100644
> --- a/rules/usb-modeswitch.make
> +++ b/rules/usb-modeswitch.make
> @@ -51,6 +51,19 @@ $(STATEDIR)/usb-modeswitch.targetinstall:
>
> @$(call install_copy, usb-modeswitch, 0, 0, 0755, -, \
> /usr/sbin/usb_modeswitch)
> +ifneq ($(or $(PTXCONF_USB_MODESWITCH_UDEV_HELPER) $(PTXCONF_USB_MODESWITCH_SYSTEMD_UNIT)),)
ifneq ($(PTXCONF_USB_MODESWITCH_UDEV_HELPER)$(PTXCONF_USB_MODESWITCH_SYSTEMD_UNIT),)
should be enough.
> + @$(call install_copy, usb-modeswitch, 0, 0, 0755, -, \
> + /usr/sbin/usb_modeswitch_dispatcher)
> +endif
> +ifdef PTXCONF_USB_MODESWITCH_UDEV_HELPER
> + @$(call install_copy, usb-modeswitch, 0, 0, 0755, -, \
> + /lib/udev/usb_modeswitch)
> +endif
> +ifdef PTXCONF_USB_MODESWITCH_SYSTEMD_UNIT
> + @$(call install_copy, usb-modeswitch, 0, 0, 0644, \
> + $(USB_MODESWITCH_DIR)/usb_modeswitch@.service, \
> + /lib/systemd/system/usb_modeswitch@.service)
Avoid accessing <PKG>_DIR in targetinstall. It may not be available. Either
patch the makefile or write a install stage that copies the file to
$(<PKG>_PKGDIR)/lib/systemd/system/usb_modeswitch@.service
Michael
> +endif
>
> @$(call install_finish, usb-modeswitch)
>
> --
> 2.1.4
>
>
> _______________________________________________
> 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:[~2016-01-22 15:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 0:24 [ptxdist] [PATCH] usb_modeswitch: version bump 2.2.1 -> 2.3.0 Ladislav Michl
2016-01-22 13:38 ` [ptxdist] [PATCH] usb_modeswitch: udev helper Ladislav Michl
2016-01-22 15:10 ` Michael Olbrich [this message]
2016-01-22 16:27 ` [ptxdist] [PATCH v2] " Ladislav Michl
2016-02-11 11:25 ` Michael Olbrich
2016-02-11 11:24 ` [ptxdist] [PATCH] usb_modeswitch: version bump 2.2.1 -> 2.3.0 Michael Olbrich
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=20160122151032.GC6233@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