* [ptxdist] [PATCH] libusbgx: make example and tool selection fine grained
@ 2021-05-04 21:33 Michael Grzeschik
2021-05-06 20:26 ` [ptxdist] [PATCH v2] " Michael Grzeschik
0 siblings, 1 reply; 3+ messages in thread
From: Michael Grzeschik @ 2021-05-04 21:33 UTC (permalink / raw)
To: ptxdist
Currently all tools and exampled are unconditionally installed.
This patch changes this by adding a selection for every binary.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
rules/libusbgx.in | 85 ++++++++++++++++++++++++++++++++++++++++++++-
rules/libusbgx.make | 53 +++++++++++++++++++++++++++-
2 files changed, 136 insertions(+), 2 deletions(-)
diff --git a/rules/libusbgx.in b/rules/libusbgx.in
index 98776c026..ba1595c2a 100644
--- a/rules/libusbgx.in
+++ b/rules/libusbgx.in
@@ -1,8 +1,91 @@
## SECTION=communication
-config LIBUSBGX
+menuconfig LIBUSBGX
bool
prompt "libusbgx"
help
libusbgx is a C library encapsulating the kernel USB gadget-configfs
userspace API functionality.
+
+if LIBUSBGX
+
+config SHOW_GADGETS
+ bool "install show-gadget tool"
+ help
+ Wether to build the show-gadget tool
+ to list all already installed gadgets in configfs
+
+config SHOW_UDCS
+ bool "install show-udcs tool"
+ help
+ Wether to build the show-udcs tool
+ to list all available udcs
+
+config GADGET_VID_PID_REMOVE
+ bool "install gadget-vid-pid-remove tool"
+ help
+ Wether to build the gadget-vid-pid-remove tool
+ to remove whole configfs gadget setup defined for
+ vid and pid
+
+config GADGET_EXPORT
+ bool "install gadget-export tool"
+ help
+ Wether to build the gadget-export tool
+ to export the configfs configuration to a scheme file
+
+config GADGET_IMPORT
+ bool "install gadget-import tool"
+ help
+ Wether to build the gadget-import tool
+ to import the configfs configuration from a scheme file
+
+config GADGET_ACM_ECM
+ bool "install gadget-acm-ecm example tool"
+ help
+ Wether to build the gadget-acm-ecm example tool
+ to create an configfs gadget setup for an acm-ecm device
+
+config GADGET_UVC
+ bool "install gadget-uvc example tool"
+ help
+ Wether to build the gadget-uvc example tool
+ to create an configfs gadget setup for an uvc device
+
+config GADGET_FFS
+ bool "install gadget-ffs example tool"
+ help
+ Wether to build the gadget-ffs example tool
+ to create an configfs gadget setup for an function-fs device
+
+config GADGET_MS
+ bool "install gadget-ms example tool"
+ help
+ Wether to build the gadget-ms example tool to create an
+ configfs gadget setup for an mass-storage device
+
+config GADGET_MIDI
+ bool "install gadget-midi example tool"
+ help
+ Wether to build the gadget-midi example tool
+ to create an configfs gadget setup for an midi device
+
+config GADGET_HID
+ bool "install gadget-hid example tool"
+ help
+ Wether to build the gadget-hid example tool
+ to create an configfs gadget setup for an hid device
+
+config GADGET_UAC2
+ bool "install gadget-uac2 example tool"
+ help
+ Wether to build the gadget-uac2 example tool
+ to create an configfs gadget setup for an Audio Class device
+
+config GADGET_RNDIS_OS_DESC
+ bool "install gadget-rndis-os-desc example tool"
+ help
+ Wether to build the gadget-rndis-os-desc example tool
+ to create an configfs gadget setup for an rndis ethernet device
+
+endif
diff --git a/rules/libusbgx.make b/rules/libusbgx.make
index 6c8fce429..958b3f1e1 100644
--- a/rules/libusbgx.make
+++ b/rules/libusbgx.make
@@ -57,7 +57,58 @@ $(STATEDIR)/libusbgx.targetinstall:
@$(call install_fixup, libusbgx, DESCRIPTION, missing)
@$(call install_lib, libusbgx, 0, 0, 0644, libusbgx)
- @$(call install_tree, libusbgx, 0, 0, -, /usr/bin)
+
+ifdef PTXCONF_SHOW_GADGETS
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/show-gadgets)
+endif
+
+ifdef PTXCONF_SHOW_UDCS
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/show-gadgets)
+endif
+
+ifdef PTXCONF_GADGET_VID_PID_REMOVE
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-vid-pid-remove)
+endif
+
+ifdef PTXCONF_GADGET_IMPORT
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-import)
+endif
+
+ifdef PTXCONF_GADGET_EXPORT
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-export)
+endif
+
+ifdef PTXCONF_GADGET_ACM_ECM
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-acm-ecm)
+endif
+
+ifdef PTXCONF_GADGET_UVC
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-uvc)
+endif
+
+ifdef PTXCONF_GADGET_FFS
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-ffs)
+endif
+
+ifdef PTXCONF_GADGET_MS
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-ms)
+endif
+
+ifdef PTXCONF_GADGET_MIDI
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-midi)
+endif
+
+ifdef PTXCONF_GADGET_HID
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-hid)
+endif
+
+ifdef PTXCONF_GADGET_UAC2
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-uac2)
+endif
+
+ifdef PTXCONF_GADGET_RNDIS_OS_DESC
+ @$(call install_copy, libusbgx, 0, 0, 0755, /usr/bin/gadget-rndis-os-desc)
+endif
@$(call install_finish, libusbgx)
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ptxdist] [PATCH v2] libusbgx: make example and tool selection fine grained
2021-05-04 21:33 [ptxdist] [PATCH] libusbgx: make example and tool selection fine grained Michael Grzeschik
@ 2021-05-06 20:26 ` Michael Grzeschik
2021-05-27 6:45 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Michael Grzeschik @ 2021-05-06 20:26 UTC (permalink / raw)
To: ptxdist
Currently all tools and exampled are unconditionally installed.
This patch changes this by adding a selection for every binary.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 - v2: fixed missing '-' in install_copy entries
rules/libusbgx.in | 85 ++++++++++++++++++++++++++++++++++++++++++++-
rules/libusbgx.make | 53 +++++++++++++++++++++++++++-
2 files changed, 136 insertions(+), 2 deletions(-)
diff --git a/rules/libusbgx.in b/rules/libusbgx.in
index 98776c026..ba1595c2a 100644
--- a/rules/libusbgx.in
+++ b/rules/libusbgx.in
@@ -1,8 +1,91 @@
## SECTION=communication
-config LIBUSBGX
+menuconfig LIBUSBGX
bool
prompt "libusbgx"
help
libusbgx is a C library encapsulating the kernel USB gadget-configfs
userspace API functionality.
+
+if LIBUSBGX
+
+config SHOW_GADGETS
+ bool "install show-gadget tool"
+ help
+ Wether to build the show-gadget tool
+ to list all already installed gadgets in configfs
+
+config SHOW_UDCS
+ bool "install show-udcs tool"
+ help
+ Wether to build the show-udcs tool
+ to list all available udcs
+
+config GADGET_VID_PID_REMOVE
+ bool "install gadget-vid-pid-remove tool"
+ help
+ Wether to build the gadget-vid-pid-remove tool
+ to remove whole configfs gadget setup defined for
+ vid and pid
+
+config GADGET_EXPORT
+ bool "install gadget-export tool"
+ help
+ Wether to build the gadget-export tool
+ to export the configfs configuration to a scheme file
+
+config GADGET_IMPORT
+ bool "install gadget-import tool"
+ help
+ Wether to build the gadget-import tool
+ to import the configfs configuration from a scheme file
+
+config GADGET_ACM_ECM
+ bool "install gadget-acm-ecm example tool"
+ help
+ Wether to build the gadget-acm-ecm example tool
+ to create an configfs gadget setup for an acm-ecm device
+
+config GADGET_UVC
+ bool "install gadget-uvc example tool"
+ help
+ Wether to build the gadget-uvc example tool
+ to create an configfs gadget setup for an uvc device
+
+config GADGET_FFS
+ bool "install gadget-ffs example tool"
+ help
+ Wether to build the gadget-ffs example tool
+ to create an configfs gadget setup for an function-fs device
+
+config GADGET_MS
+ bool "install gadget-ms example tool"
+ help
+ Wether to build the gadget-ms example tool to create an
+ configfs gadget setup for an mass-storage device
+
+config GADGET_MIDI
+ bool "install gadget-midi example tool"
+ help
+ Wether to build the gadget-midi example tool
+ to create an configfs gadget setup for an midi device
+
+config GADGET_HID
+ bool "install gadget-hid example tool"
+ help
+ Wether to build the gadget-hid example tool
+ to create an configfs gadget setup for an hid device
+
+config GADGET_UAC2
+ bool "install gadget-uac2 example tool"
+ help
+ Wether to build the gadget-uac2 example tool
+ to create an configfs gadget setup for an Audio Class device
+
+config GADGET_RNDIS_OS_DESC
+ bool "install gadget-rndis-os-desc example tool"
+ help
+ Wether to build the gadget-rndis-os-desc example tool
+ to create an configfs gadget setup for an rndis ethernet device
+
+endif
diff --git a/rules/libusbgx.make b/rules/libusbgx.make
index 6c8fce429..c723174bf 100644
--- a/rules/libusbgx.make
+++ b/rules/libusbgx.make
@@ -57,7 +57,58 @@ $(STATEDIR)/libusbgx.targetinstall:
@$(call install_fixup, libusbgx, DESCRIPTION, missing)
@$(call install_lib, libusbgx, 0, 0, 0644, libusbgx)
- @$(call install_tree, libusbgx, 0, 0, -, /usr/bin)
+
+ifdef PTXCONF_SHOW_GADGETS
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/show-gadgets)
+endif
+
+ifdef PTXCONF_SHOW_UDCS
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/show-gadgets)
+endif
+
+ifdef PTXCONF_GADGET_VID_PID_REMOVE
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-vid-pid-remove)
+endif
+
+ifdef PTXCONF_GADGET_IMPORT
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-import)
+endif
+
+ifdef PTXCONF_GADGET_EXPORT
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-export)
+endif
+
+ifdef PTXCONF_GADGET_ACM_ECM
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-acm-ecm)
+endif
+
+ifdef PTXCONF_GADGET_UVC
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-uvc)
+endif
+
+ifdef PTXCONF_GADGET_FFS
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-ffs)
+endif
+
+ifdef PTXCONF_GADGET_MS
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-ms)
+endif
+
+ifdef PTXCONF_GADGET_MIDI
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-midi)
+endif
+
+ifdef PTXCONF_GADGET_HID
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-hid)
+endif
+
+ifdef PTXCONF_GADGET_UAC2
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-uac2)
+endif
+
+ifdef PTXCONF_GADGET_RNDIS_OS_DESC
+ @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-rndis-os-desc)
+endif
@$(call install_finish, libusbgx)
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [APPLIED] libusbgx: make example and tool selection fine grained
2021-05-06 20:26 ` [ptxdist] [PATCH v2] " Michael Grzeschik
@ 2021-05-27 6:45 ` Michael Olbrich
0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2021-05-27 6:45 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Grzeschik
Thanks, applied as 204be3e0f85f82e966309a79dee86269c8039d7c.
Michael
[sent from post-receive hook]
On Thu, 27 May 2021 08:45:32 +0200, Michael Grzeschik <m.grzeschik@pengutronix.de> wrote:
> Currently all tools and exampled are unconditionally installed.
> This patch changes this by adding a selection for every binary.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Message-Id: <20210506202649.15793-1-m.grzeschik@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/libusbgx.in b/rules/libusbgx.in
> index 98776c02660e..ba1595c2a485 100644
> --- a/rules/libusbgx.in
> +++ b/rules/libusbgx.in
> @@ -1,8 +1,91 @@
> ## SECTION=communication
>
> -config LIBUSBGX
> +menuconfig LIBUSBGX
> bool
> prompt "libusbgx"
> help
> libusbgx is a C library encapsulating the kernel USB gadget-configfs
> userspace API functionality.
> +
> +if LIBUSBGX
> +
> +config SHOW_GADGETS
> + bool "install show-gadget tool"
> + help
> + Wether to build the show-gadget tool
> + to list all already installed gadgets in configfs
> +
> +config SHOW_UDCS
> + bool "install show-udcs tool"
> + help
> + Wether to build the show-udcs tool
> + to list all available udcs
> +
> +config GADGET_VID_PID_REMOVE
> + bool "install gadget-vid-pid-remove tool"
> + help
> + Wether to build the gadget-vid-pid-remove tool
> + to remove whole configfs gadget setup defined for
> + vid and pid
> +
> +config GADGET_EXPORT
> + bool "install gadget-export tool"
> + help
> + Wether to build the gadget-export tool
> + to export the configfs configuration to a scheme file
> +
> +config GADGET_IMPORT
> + bool "install gadget-import tool"
> + help
> + Wether to build the gadget-import tool
> + to import the configfs configuration from a scheme file
> +
> +config GADGET_ACM_ECM
> + bool "install gadget-acm-ecm example tool"
> + help
> + Wether to build the gadget-acm-ecm example tool
> + to create an configfs gadget setup for an acm-ecm device
> +
> +config GADGET_UVC
> + bool "install gadget-uvc example tool"
> + help
> + Wether to build the gadget-uvc example tool
> + to create an configfs gadget setup for an uvc device
> +
> +config GADGET_FFS
> + bool "install gadget-ffs example tool"
> + help
> + Wether to build the gadget-ffs example tool
> + to create an configfs gadget setup for an function-fs device
> +
> +config GADGET_MS
> + bool "install gadget-ms example tool"
> + help
> + Wether to build the gadget-ms example tool to create an
> + configfs gadget setup for an mass-storage device
> +
> +config GADGET_MIDI
> + bool "install gadget-midi example tool"
> + help
> + Wether to build the gadget-midi example tool
> + to create an configfs gadget setup for an midi device
> +
> +config GADGET_HID
> + bool "install gadget-hid example tool"
> + help
> + Wether to build the gadget-hid example tool
> + to create an configfs gadget setup for an hid device
> +
> +config GADGET_UAC2
> + bool "install gadget-uac2 example tool"
> + help
> + Wether to build the gadget-uac2 example tool
> + to create an configfs gadget setup for an Audio Class device
> +
> +config GADGET_RNDIS_OS_DESC
> + bool "install gadget-rndis-os-desc example tool"
> + help
> + Wether to build the gadget-rndis-os-desc example tool
> + to create an configfs gadget setup for an rndis ethernet device
> +
> +endif
> diff --git a/rules/libusbgx.make b/rules/libusbgx.make
> index 6c8fce429c34..c723174bfc2e 100644
> --- a/rules/libusbgx.make
> +++ b/rules/libusbgx.make
> @@ -57,7 +57,58 @@ $(STATEDIR)/libusbgx.targetinstall:
> @$(call install_fixup, libusbgx, DESCRIPTION, missing)
>
> @$(call install_lib, libusbgx, 0, 0, 0644, libusbgx)
> - @$(call install_tree, libusbgx, 0, 0, -, /usr/bin)
> +
> +ifdef PTXCONF_SHOW_GADGETS
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/show-gadgets)
> +endif
> +
> +ifdef PTXCONF_SHOW_UDCS
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/show-gadgets)
> +endif
> +
> +ifdef PTXCONF_GADGET_VID_PID_REMOVE
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-vid-pid-remove)
> +endif
> +
> +ifdef PTXCONF_GADGET_IMPORT
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-import)
> +endif
> +
> +ifdef PTXCONF_GADGET_EXPORT
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-export)
> +endif
> +
> +ifdef PTXCONF_GADGET_ACM_ECM
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-acm-ecm)
> +endif
> +
> +ifdef PTXCONF_GADGET_UVC
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-uvc)
> +endif
> +
> +ifdef PTXCONF_GADGET_FFS
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-ffs)
> +endif
> +
> +ifdef PTXCONF_GADGET_MS
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-ms)
> +endif
> +
> +ifdef PTXCONF_GADGET_MIDI
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-midi)
> +endif
> +
> +ifdef PTXCONF_GADGET_HID
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-hid)
> +endif
> +
> +ifdef PTXCONF_GADGET_UAC2
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-uac2)
> +endif
> +
> +ifdef PTXCONF_GADGET_RNDIS_OS_DESC
> + @$(call install_copy, libusbgx, 0, 0, 0755, -, /usr/bin/gadget-rndis-os-desc)
> +endif
>
> @$(call install_finish, libusbgx)
>
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-27 6:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 21:33 [ptxdist] [PATCH] libusbgx: make example and tool selection fine grained Michael Grzeschik
2021-05-06 20:26 ` [ptxdist] [PATCH v2] " Michael Grzeschik
2021-05-27 6:45 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox