mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libpwm: New package
@ 2024-06-14 15:59 Uwe Kleine-König
  2024-06-17  9:18 ` Roland Hieber
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2024-06-14 15:59 UTC (permalink / raw)
  To: ptxdist

libpwm is a thin abstract layer to drive PWM devices under Linux.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 patches/libpwm-f7a7496fcb9d/autogen.sh |  1 +
 rules/libpwm.in                        |  8 ++++
 rules/libpwm.make                      | 57 ++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 120000 patches/libpwm-f7a7496fcb9d/autogen.sh
 create mode 100644 rules/libpwm.in
 create mode 100644 rules/libpwm.make

diff --git a/patches/libpwm-f7a7496fcb9d/autogen.sh b/patches/libpwm-f7a7496fcb9d/autogen.sh
new file mode 120000
index 000000000000..9f8a4cb7ddcb
--- /dev/null
+++ b/patches/libpwm-f7a7496fcb9d/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/rules/libpwm.in b/rules/libpwm.in
new file mode 100644
index 000000000000..6d07e056a3e5
--- /dev/null
+++ b/rules/libpwm.in
@@ -0,0 +1,8 @@
+## SECTION=system_libraries
+
+config LIBPWM
+	bool
+	prompt "libpwm"
+	select KERNEL_HEADER
+	help
+	  drive Linux PWM devices from userspace
diff --git a/rules/libpwm.make b/rules/libpwm.make
new file mode 100644
index 000000000000..b7c1810951e5
--- /dev/null
+++ b/rules/libpwm.make
@@ -0,0 +1,57 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2024 by Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBPWM) += libpwm
+
+#
+# Paths and names
+#
+LIBPWM_VERSION		:= f7a7496fcb9d
+LIBPWM_MD5		:= 8ed77baaad0328359cbaf075517b0025
+LIBPWM			:= libpwm-$(LIBPWM_VERSION)
+LIBPWM_SUFFIX		:= tar.gz
+LIBPWM_URL		:= https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/libpwm.git/snapshot/$(LIBPWM_VERSION).$(LIBPWM_SUFFIX)
+LIBPWM_SOURCE		:= $(SRCDIR)/$(LIBPWM).$(LIBPWM_SUFFIX)
+LIBPWM_DIR		:= $(BUILDDIR)/$(LIBPWM)
+LIBPWM_BUILD_OOT	:= YES
+LIBPWM_LICENSE		:= LGPL-2.1 AND 0BSD
+LIBPWM_LICENSE_FILES	:= file://COPYING;md5=41d65f310284fe1f2945ea9c57f297c7
+
+#
+# autoconf
+#
+LIBPWM_CONF_TOOL	:= autoconf
+LIBPWM_CONF_OPT		:= $(CROSS_AUTOCONF_USR)
+
+LIBPWM_CPPFLAGS := -isystem $(KERNEL_HEADERS_INCLUDE_DIR)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libpwm.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libpwm)
+	@$(call install_fixup, libpwm, PRIORITY, optional)
+	@$(call install_fixup, libpwm, SECTION, base)
+	@$(call install_fixup, libpwm, AUTHOR, "Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>")
+	@$(call install_fixup, libpwm, DESCRIPTION, missing)
+
+	@$(call install_lib, libpwm, 0, 0, 0644, libpwm)
+	@$(call install_copy, libpwm, 0, 0, 0755, -, /usr/bin/pwmtest)
+	@$(call install_copy, libpwm, 0, 0, 0755, -, /usr/bin/pwmtestperf)
+
+	@$(call install_finish, libpwm)
+
+	@$(call touch)
+
+# vim: syntax=make

base-commit: 7f9c1cc0688da418cc9d921e35a5dc8a4d3acdff
-- 
2.43.0




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

* Re: [ptxdist] [PATCH] libpwm: New package
  2024-06-14 15:59 [ptxdist] [PATCH] libpwm: New package Uwe Kleine-König
@ 2024-06-17  9:18 ` Roland Hieber
  2024-06-17 10:14   ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Hieber @ 2024-06-17  9:18 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: ptxdist

On Fri, Jun 14, 2024 at 05:59:00PM +0200, Uwe Kleine-König wrote:
> libpwm is a thin abstract layer to drive PWM devices under Linux.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Thanks for your first contribution, u.kleine-koenig@baylibre.com!

(No, seriously: nice to read you again! Do you want to add yourself to
.mailmap?)

> ---
>  patches/libpwm-f7a7496fcb9d/autogen.sh |  1 +
>  rules/libpwm.in                        |  8 ++++
>  rules/libpwm.make                      | 57 ++++++++++++++++++++++++++
>  3 files changed, 66 insertions(+)
>  create mode 120000 patches/libpwm-f7a7496fcb9d/autogen.sh
>  create mode 100644 rules/libpwm.in
>  create mode 100644 rules/libpwm.make
> 
> diff --git a/patches/libpwm-f7a7496fcb9d/autogen.sh b/patches/libpwm-f7a7496fcb9d/autogen.sh
> new file mode 120000
> index 000000000000..9f8a4cb7ddcb
> --- /dev/null
> +++ b/patches/libpwm-f7a7496fcb9d/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/rules/libpwm.in b/rules/libpwm.in
> new file mode 100644
> index 000000000000..6d07e056a3e5
> --- /dev/null
> +++ b/rules/libpwm.in
> @@ -0,0 +1,8 @@
> +## SECTION=system_libraries
> +
> +config LIBPWM
> +	bool
> +	prompt "libpwm"
> +	select KERNEL_HEADER
> +	help
> +	  drive Linux PWM devices from userspace
> diff --git a/rules/libpwm.make b/rules/libpwm.make
> new file mode 100644
> index 000000000000..b7c1810951e5
> --- /dev/null
> +++ b/rules/libpwm.make
> @@ -0,0 +1,57 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2024 by Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBPWM) += libpwm
> +
> +#
> +# Paths and names
> +#
> +LIBPWM_VERSION		:= f7a7496fcb9d

I think it makes sense here to have a pseudo-git-describe string
containing the date of the commit, so that future versions stay
sortable, e.g. 2024-04-09-gf7a7496fcb9d. (You'll have to rename the
patch folder too).

> +LIBPWM_MD5		:= 8ed77baaad0328359cbaf075517b0025
> +LIBPWM			:= libpwm-$(LIBPWM_VERSION)
> +LIBPWM_SUFFIX		:= tar.gz
> +LIBPWM_URL		:= https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/libpwm.git/snapshot/$(LIBPWM_VERSION).$(LIBPWM_SUFFIX)
> +LIBPWM_SOURCE		:= $(SRCDIR)/$(LIBPWM).$(LIBPWM_SUFFIX)
> +LIBPWM_DIR		:= $(BUILDDIR)/$(LIBPWM)
> +LIBPWM_BUILD_OOT	:= YES
> +LIBPWM_LICENSE		:= LGPL-2.1 AND 0BSD

Use LGPL-2.0-only here (SPDX 2.0), as the copyright dedication doesn't
say anything about "or later". 
Are the "test programs" mentioned in the license the ones that you
targetinstall at /usr/bin/pwmtest and /usr/bin/pwmtestperf ?

> +LIBPWM_LICENSE_FILES	:= file://COPYING;md5=41d65f310284fe1f2945ea9c57f297c7

Note: COPYING does not include the LGPL license text; since you are the
upstream maintainer, consider adding it to the repository (see
<https://www.gnu.org/licenses/gpl-faq.html#WhyMustIInclude>).

> +
> +#
> +# autoconf
> +#
> +LIBPWM_CONF_TOOL	:= autoconf
> +LIBPWM_CONF_OPT		:= $(CROSS_AUTOCONF_USR)
> +
> +LIBPWM_CPPFLAGS := -isystem $(KERNEL_HEADERS_INCLUDE_DIR)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libpwm.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libpwm)
> +	@$(call install_fixup, libpwm, PRIORITY, optional)
> +	@$(call install_fixup, libpwm, SECTION, base)
> +	@$(call install_fixup, libpwm, AUTHOR, "Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>")

This is a different e-mail address than what you wrote from.


Other than that, looks good to me.

 - Roland

> +	@$(call install_fixup, libpwm, DESCRIPTION, missing)
> +
> +	@$(call install_lib, libpwm, 0, 0, 0644, libpwm)
> +	@$(call install_copy, libpwm, 0, 0, 0755, -, /usr/bin/pwmtest)
> +	@$(call install_copy, libpwm, 0, 0, 0755, -, /usr/bin/pwmtestperf)
> +
> +	@$(call install_finish, libpwm)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> 
> base-commit: 7f9c1cc0688da418cc9d921e35a5dc8a4d3acdff
> -- 
> 2.43.0

-- 
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 |



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

* Re: [ptxdist] [PATCH] libpwm: New package
  2024-06-17  9:18 ` Roland Hieber
@ 2024-06-17 10:14   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2024-06-17 10:14 UTC (permalink / raw)
  To: Roland Hieber; +Cc: ptxdist

[-- Attachment #1: Type: text/plain, Size: 3826 bytes --]

Hello Roland,

On Mon, Jun 17, 2024 at 11:18:03AM +0200, Roland Hieber wrote:
> On Fri, Jun 14, 2024 at 05:59:00PM +0200, Uwe Kleine-König wrote:
> > libpwm is a thin abstract layer to drive PWM devices under Linux.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> 
> Thanks for your first contribution, u.kleine-koenig@baylibre.com!
> 
> (No, seriously: nice to read you again!

:-)

> Do you want to add yourself to .mailmap?)

Wouldn't that make all my prior contributions to appear having been done
with my current email address? If so, I don't want to add such a
mapping.

> > ---
> >  patches/libpwm-f7a7496fcb9d/autogen.sh |  1 +
> >  rules/libpwm.in                        |  8 ++++
> >  rules/libpwm.make                      | 57 ++++++++++++++++++++++++++
> >  3 files changed, 66 insertions(+)
> >  create mode 120000 patches/libpwm-f7a7496fcb9d/autogen.sh
> >  create mode 100644 rules/libpwm.in
> >  create mode 100644 rules/libpwm.make
> > 
> > diff --git a/patches/libpwm-f7a7496fcb9d/autogen.sh b/patches/libpwm-f7a7496fcb9d/autogen.sh
> > new file mode 120000
> > index 000000000000..9f8a4cb7ddcb
> > --- /dev/null
> > +++ b/patches/libpwm-f7a7496fcb9d/autogen.sh
> > @@ -0,0 +1 @@
> > +../autogen.sh
> > \ No newline at end of file
> > diff --git a/rules/libpwm.in b/rules/libpwm.in
> > new file mode 100644
> > index 000000000000..6d07e056a3e5
> > --- /dev/null
> > +++ b/rules/libpwm.in
> > @@ -0,0 +1,8 @@
> > +## SECTION=system_libraries
> > +
> > +config LIBPWM
> > +	bool
> > +	prompt "libpwm"
> > +	select KERNEL_HEADER
> > +	help
> > +	  drive Linux PWM devices from userspace
> > diff --git a/rules/libpwm.make b/rules/libpwm.make
> > new file mode 100644
> > index 000000000000..b7c1810951e5
> > --- /dev/null
> > +++ b/rules/libpwm.make
> > @@ -0,0 +1,57 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2024 by Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_LIBPWM) += libpwm
> > +
> > +#
> > +# Paths and names
> > +#
> > +LIBPWM_VERSION		:= f7a7496fcb9d
> 
> I think it makes sense here to have a pseudo-git-describe string
> containing the date of the commit, so that future versions stay
> sortable, e.g. 2024-04-09-gf7a7496fcb9d. (You'll have to rename the
> patch folder too).

Yup.

> 
> > +LIBPWM_MD5		:= 8ed77baaad0328359cbaf075517b0025
> > +LIBPWM			:= libpwm-$(LIBPWM_VERSION)
> > +LIBPWM_SUFFIX		:= tar.gz
> > +LIBPWM_URL		:= https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/libpwm.git/snapshot/$(LIBPWM_VERSION).$(LIBPWM_SUFFIX)
> > +LIBPWM_SOURCE		:= $(SRCDIR)/$(LIBPWM).$(LIBPWM_SUFFIX)
> > +LIBPWM_DIR		:= $(BUILDDIR)/$(LIBPWM)
> > +LIBPWM_BUILD_OOT	:= YES
> > +LIBPWM_LICENSE		:= LGPL-2.1 AND 0BSD
> 
> Use LGPL-2.0-only here (SPDX 2.0), as the copyright dedication doesn't
> say anything about "or later". 
> Are the "test programs" mentioned in the license the ones that you
> targetinstall at /usr/bin/pwmtest and /usr/bin/pwmtestperf ?

Yes.

> > +LIBPWM_LICENSE_FILES	:= file://COPYING;md5=41d65f310284fe1f2945ea9c57f297c7
> 
> Note: COPYING does not include the LGPL license text; since you are the
> upstream maintainer, consider adding it to the repository (see
> <https://www.gnu.org/licenses/gpl-faq.html#WhyMustIInclude>).

I'll add that to my todo list.

> > +	@$(call install_fixup, libpwm, AUTHOR, "Uwe Kleine-Koenig <u.kleine-koeng@baylibre.com>")
> 
> This is a different e-mail address than what you wrote from.

Oops, same typo further up in the same file.
 
> Other than that, looks good to me.

Thanks
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2024-06-17 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 15:59 [ptxdist] [PATCH] libpwm: New package Uwe Kleine-König
2024-06-17  9:18 ` Roland Hieber
2024-06-17 10:14   ` Uwe Kleine-König

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