mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2 1/2] libusbgx: make schemes support selectable
@ 2021-09-23 13:34 Michael Grzeschik
  2021-09-23 13:34 ` [ptxdist] [PATCH v2 2/2] gt: add gadget-tool Michael Grzeschik
  2021-10-07 10:18 ` [ptxdist] [APPLIED] libusbgx: make schemes support selectable Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Grzeschik @ 2021-09-23 13:34 UTC (permalink / raw)
  To: ptxdist

We add an option to select schemes support.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 rules/libusbgx.in   | 7 +++++++
 rules/libusbgx.make | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/rules/libusbgx.in b/rules/libusbgx.in
index 13252a3a7..e576f842e 100644
--- a/rules/libusbgx.in
+++ b/rules/libusbgx.in
@@ -2,6 +2,7 @@
 
 menuconfig LIBUSBGX
 	bool
+	select LIBCONFIG	if LIBUSBGX_SCHEMES
 	prompt "libusbgx                      "
 	help
 	  libusbgx is a C library encapsulating the kernel USB gadget-configfs
@@ -9,6 +10,12 @@ menuconfig LIBUSBGX
 
 if LIBUSBGX
 
+config LIBUSBGX_SCHEMES
+	bool "enable schemes support"
+	help
+	  With schemes support it is possible to export/import
+	  configs layout to/from declerative scheme files
+
 config SHOW_GADGETS
 	bool "install show-gadget tool"
 	help
diff --git a/rules/libusbgx.make b/rules/libusbgx.make
index da2980d95..724d1a3d8 100644
--- a/rules/libusbgx.make
+++ b/rules/libusbgx.make
@@ -42,9 +42,9 @@ LIBUSBGX_CONF_ENV	:= $(CROSS_ENV)
 LIBUSBGX_CONF_TOOL	:= autoconf
 LIBUSBGX_CONF_OPT	:= \
 	$(CROSS_AUTOCONF_USR) \
-	--without-libconfig \
+	--$(call ptx/wow, PTXCONF_LIBUSBGX_SCHEMES)-libconfig \
 	--enable-examples \
-	--disable-gadget-schemes
+	--$(call ptx/endis, PTXCONF_LIBUSBGX_SCHEMES)-gadget-schemes
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.30.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] 6+ messages in thread

* [ptxdist] [PATCH v2 2/2] gt: add gadget-tool
  2021-09-23 13:34 [ptxdist] [PATCH v2 1/2] libusbgx: make schemes support selectable Michael Grzeschik
@ 2021-09-23 13:34 ` Michael Grzeschik
  2021-09-23 14:56   ` [ptxdist] [PATCH] fixup! " Michael Grzeschik
  2021-09-29 15:12   ` [ptxdist] [PATCH v2 2/2] " Michael Olbrich
  2021-10-07 10:18 ` [ptxdist] [APPLIED] libusbgx: make schemes support selectable Michael Olbrich
  1 sibling, 2 replies; 6+ messages in thread
From: Michael Grzeschik @ 2021-09-23 13:34 UTC (permalink / raw)
  To: ptxdist

Gadget-tool is a tool to setup configfs gadget device descriptions
via a tree based declarative scheme format. This makes poking around
in configfs with several shell commands obsolete. It depends on libusbgx
and libconfig.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v2: - using github archive
    - addded license from codefile
    - added SUBDIR, since archive has different toplevel
    - fixed md5sum for archive
    - fixed permissions of gt.conf

 rules/gt.in   | 11 ++++++++++
 rules/gt.make | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 rules/gt.in
 create mode 100644 rules/gt.make

diff --git a/rules/gt.in b/rules/gt.in
new file mode 100644
index 000000000..5084a554b
--- /dev/null
+++ b/rules/gt.in
@@ -0,0 +1,11 @@
+## SECTION=shell_and_console
+
+config GT
+	tristate
+	select HOST_CMAKE
+	select LIBUSBGX
+	select LIBUSBGX_SCHEMES
+	select LIBCONFIG
+	prompt "gadget-tool (gt)"
+	help
+	  Gadget-tool - Linux command line tool for setting USB gadget using configFS
diff --git a/rules/gt.make b/rules/gt.make
new file mode 100644
index 000000000..63fa428ea
--- /dev/null
+++ b/rules/gt.make
@@ -0,0 +1,59 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Michael Grzeschik <m.grzeschik@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GT) += gt
+
+#
+# Paths and names
+#
+GT_VERSION	:= 31b135546d0d1733b5b7ca19f48748c06824d65a
+GT_MD5		:= 5ae9260049f5d2cd2ebeccef92e7888b
+GT		:= gt-$(GT_VERSION)
+GT_SUFFIX	:= tar.gz
+GT_URL		:= https://github.com/linux-usb-gadgets/gt/archive/$(GT_VERSION).$(GT_SUFFIX)
+GT_SOURCE	:= $(SRCDIR)/$(GT).$(GT_SUFFIX)
+GT_DIR		:= $(BUILDDIR)/$(GT)
+GT_SUBDIR	:= source
+GT_LICENSE	:= Apache-2.0
+GT_LICENSE_FILES	:= \
+	file://source/main.c;startline=2;endline=14;md5=239ab3ef885c745f3896a83f17482d6d \
+	file://LICENSE;md5=785f417ec07d653f268e6eb621218d5d
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+GT_CONF_TOOL	:= cmake
+GT_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/gt.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, gt)
+	@$(call install_fixup, gt, PRIORITY, optional)
+	@$(call install_fixup, gt, SECTION, base)
+	@$(call install_fixup, gt, AUTHOR, "Michael Grzeschik <m.grzeschik@pengutronix.de>")
+	@$(call install_fixup, gt, DESCRIPTION, missing)
+
+	@$(call install_copy, gt, 0, 0, 0755, -, /usr/bin/gt)
+	@$(call install_copy, gt, 0, 0, 0644,
+	        $(GT_PKGDIR)/usr/etc/gt/gt.conf, /etc/gt/gt.conf)
+
+	@$(call install_finish, gt)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.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] 6+ messages in thread

* [ptxdist] [PATCH] fixup! gt: add gadget-tool
  2021-09-23 13:34 ` [ptxdist] [PATCH v2 2/2] gt: add gadget-tool Michael Grzeschik
@ 2021-09-23 14:56   ` Michael Grzeschik
  2021-09-24  9:06     ` Roland Hieber
  2021-09-29 15:12   ` [ptxdist] [PATCH v2 2/2] " Michael Olbrich
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Grzeschik @ 2021-09-23 14:56 UTC (permalink / raw)
  To: ptxdist

---
 rules/gt.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/gt.make b/rules/gt.make
index 63fa428ea..80b58c0f8 100644
--- a/rules/gt.make
+++ b/rules/gt.make
@@ -49,7 +49,7 @@ $(STATEDIR)/gt.targetinstall:
 	@$(call install_fixup, gt, DESCRIPTION, missing)
 
 	@$(call install_copy, gt, 0, 0, 0755, -, /usr/bin/gt)
-	@$(call install_copy, gt, 0, 0, 0644,
+	@$(call install_copy, gt, 0, 0, 0644, \
 	        $(GT_PKGDIR)/usr/etc/gt/gt.conf, /etc/gt/gt.conf)
 
 	@$(call install_finish, gt)
-- 
2.30.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] 6+ messages in thread

* Re: [ptxdist] [PATCH] fixup! gt: add gadget-tool
  2021-09-23 14:56   ` [ptxdist] [PATCH] fixup! " Michael Grzeschik
@ 2021-09-24  9:06     ` Roland Hieber
  0 siblings, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2021-09-24  9:06 UTC (permalink / raw)
  To: ptxdist

On Thu, Sep 23, 2021 at 04:56:54PM +0200, Michael Grzeschik wrote:
> ---
>  rules/gt.make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

Reviewed-by: Roland Hieber <rhi@pengutronix.de>

> diff --git a/rules/gt.make b/rules/gt.make
> index 63fa428ea..80b58c0f8 100644
> --- a/rules/gt.make
> +++ b/rules/gt.make
> @@ -49,7 +49,7 @@ $(STATEDIR)/gt.targetinstall:
>  	@$(call install_fixup, gt, DESCRIPTION, missing)
>  
>  	@$(call install_copy, gt, 0, 0, 0755, -, /usr/bin/gt)
> -	@$(call install_copy, gt, 0, 0, 0644,
> +	@$(call install_copy, gt, 0, 0, 0644, \
>  	        $(GT_PKGDIR)/usr/etc/gt/gt.conf, /etc/gt/gt.conf)
>  
>  	@$(call install_finish, gt)
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH v2 2/2] gt: add gadget-tool
  2021-09-23 13:34 ` [ptxdist] [PATCH v2 2/2] gt: add gadget-tool Michael Grzeschik
  2021-09-23 14:56   ` [ptxdist] [PATCH] fixup! " Michael Grzeschik
@ 2021-09-29 15:12   ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2021-09-29 15:12 UTC (permalink / raw)
  To: Michael Grzeschik; +Cc: ptxdist

On Thu, Sep 23, 2021 at 03:34:38PM +0200, Michael Grzeschik wrote:
> Gadget-tool is a tool to setup configfs gadget device descriptions
> via a tree based declarative scheme format. This makes poking around
> in configfs with several shell commands obsolete. It depends on libusbgx
> and libconfig.
> 

Falis to build here:

'[...]/build-target/gt-31b135546d0d1733b5b7ca19f48748c06824d65a-build'
[ 61%] Generating gt.1.gz 
/bin/sh: 1: a2x: not found
make[2]: *** [manpages/CMakeFiles/manpage.dir/build.make:73:
manpages/gt.1.gz] Error 127
make[2]: Leaving directory

Maybe generating the man page can be disabled?

Michael

> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> v2: - using github archive
>     - addded license from codefile
>     - added SUBDIR, since archive has different toplevel
>     - fixed md5sum for archive
>     - fixed permissions of gt.conf
> 
>  rules/gt.in   | 11 ++++++++++
>  rules/gt.make | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 70 insertions(+)
>  create mode 100644 rules/gt.in
>  create mode 100644 rules/gt.make
> 
> diff --git a/rules/gt.in b/rules/gt.in
> new file mode 100644
> index 000000000..5084a554b
> --- /dev/null
> +++ b/rules/gt.in
> @@ -0,0 +1,11 @@
> +## SECTION=shell_and_console
> +
> +config GT
> +	tristate
> +	select HOST_CMAKE
> +	select LIBUSBGX
> +	select LIBUSBGX_SCHEMES
> +	select LIBCONFIG
> +	prompt "gadget-tool (gt)"
> +	help
> +	  Gadget-tool - Linux command line tool for setting USB gadget using configFS
> diff --git a/rules/gt.make b/rules/gt.make
> new file mode 100644
> index 000000000..63fa428ea
> --- /dev/null
> +++ b/rules/gt.make
> @@ -0,0 +1,59 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Michael Grzeschik <m.grzeschik@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_GT) += gt
> +
> +#
> +# Paths and names
> +#
> +GT_VERSION	:= 31b135546d0d1733b5b7ca19f48748c06824d65a
> +GT_MD5		:= 5ae9260049f5d2cd2ebeccef92e7888b
> +GT		:= gt-$(GT_VERSION)
> +GT_SUFFIX	:= tar.gz
> +GT_URL		:= https://github.com/linux-usb-gadgets/gt/archive/$(GT_VERSION).$(GT_SUFFIX)
> +GT_SOURCE	:= $(SRCDIR)/$(GT).$(GT_SUFFIX)
> +GT_DIR		:= $(BUILDDIR)/$(GT)
> +GT_SUBDIR	:= source
> +GT_LICENSE	:= Apache-2.0
> +GT_LICENSE_FILES	:= \
> +	file://source/main.c;startline=2;endline=14;md5=239ab3ef885c745f3896a83f17482d6d \
> +	file://LICENSE;md5=785f417ec07d653f268e6eb621218d5d
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +GT_CONF_TOOL	:= cmake
> +GT_CONF_OPT	:= \
> +	$(CROSS_CMAKE_USR)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/gt.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, gt)
> +	@$(call install_fixup, gt, PRIORITY, optional)
> +	@$(call install_fixup, gt, SECTION, base)
> +	@$(call install_fixup, gt, AUTHOR, "Michael Grzeschik <m.grzeschik@pengutronix.de>")
> +	@$(call install_fixup, gt, DESCRIPTION, missing)
> +
> +	@$(call install_copy, gt, 0, 0, 0755, -, /usr/bin/gt)
> +	@$(call install_copy, gt, 0, 0, 0644,
> +	        $(GT_PKGDIR)/usr/etc/gt/gt.conf, /etc/gt/gt.conf)
> +
> +	@$(call install_finish, gt)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [APPLIED] libusbgx: make schemes support selectable
  2021-09-23 13:34 [ptxdist] [PATCH v2 1/2] libusbgx: make schemes support selectable Michael Grzeschik
  2021-09-23 13:34 ` [ptxdist] [PATCH v2 2/2] gt: add gadget-tool Michael Grzeschik
@ 2021-10-07 10:18 ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2021-10-07 10:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Grzeschik

Thanks, applied as 457c551777da23dacc09d3e2b8b8b66301870da7.

Michael

[sent from post-receive hook]

On Thu, 07 Oct 2021 12:18:59 +0200, Michael Grzeschik <m.grzeschik@pengutronix.de> wrote:
> We add an option to select schemes support.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Message-Id: <20210923133438.17528-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 13252a3a7234..e576f842e566 100644
> --- a/rules/libusbgx.in
> +++ b/rules/libusbgx.in
> @@ -2,6 +2,7 @@
>  
>  menuconfig LIBUSBGX
>  	bool
> +	select LIBCONFIG	if LIBUSBGX_SCHEMES
>  	prompt "libusbgx                      "
>  	help
>  	  libusbgx is a C library encapsulating the kernel USB gadget-configfs
> @@ -9,6 +10,12 @@ menuconfig LIBUSBGX
>  
>  if LIBUSBGX
>  
> +config LIBUSBGX_SCHEMES
> +	bool "enable schemes support"
> +	help
> +	  With schemes support it is possible to export/import
> +	  configs layout to/from declerative scheme files
> +
>  config SHOW_GADGETS
>  	bool "install show-gadget tool"
>  	help
> diff --git a/rules/libusbgx.make b/rules/libusbgx.make
> index da2980d953fd..724d1a3d8fe4 100644
> --- a/rules/libusbgx.make
> +++ b/rules/libusbgx.make
> @@ -42,9 +42,9 @@ LIBUSBGX_CONF_ENV	:= $(CROSS_ENV)
>  LIBUSBGX_CONF_TOOL	:= autoconf
>  LIBUSBGX_CONF_OPT	:= \
>  	$(CROSS_AUTOCONF_USR) \
> -	--without-libconfig \
> +	--$(call ptx/wow, PTXCONF_LIBUSBGX_SCHEMES)-libconfig \
>  	--enable-examples \
> -	--disable-gadget-schemes
> +	--$(call ptx/endis, PTXCONF_LIBUSBGX_SCHEMES)-gadget-schemes
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-07 10:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 13:34 [ptxdist] [PATCH v2 1/2] libusbgx: make schemes support selectable Michael Grzeschik
2021-09-23 13:34 ` [ptxdist] [PATCH v2 2/2] gt: add gadget-tool Michael Grzeschik
2021-09-23 14:56   ` [ptxdist] [PATCH] fixup! " Michael Grzeschik
2021-09-24  9:06     ` Roland Hieber
2021-09-29 15:12   ` [ptxdist] [PATCH v2 2/2] " Michael Olbrich
2021-10-07 10:18 ` [ptxdist] [APPLIED] libusbgx: make schemes support selectable Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox