mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] host-system-python3: Add flags for ply, pyyaml, jinja2
@ 2021-03-22 13:48 Marian Cichy
  2021-03-22 13:48 ` [ptxdist] [PATCH 2/2] libcamera: Add package Marian Cichy
  0 siblings, 1 reply; 4+ messages in thread
From: Marian Cichy @ 2021-03-22 13:48 UTC (permalink / raw)
  To: ptxdist; +Cc: Marian Cichy

These modules are a dependency for libcamera.

Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
---
 rules/host-system-python3.in   |  9 +++++++++
 rules/host-system-python3.make | 18 ++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/rules/host-system-python3.in b/rules/host-system-python3.in
index c6ce3360a..3a0df4307 100644
--- a/rules/host-system-python3.in
+++ b/rules/host-system-python3.in
@@ -20,4 +20,13 @@ config HOST_SYSTEM_PYTHON3_SETUPTOOLS
 config HOST_SYSTEM_PYTHON3_SIX
 	bool
 
+config HOST_SYSTEM_PYTHON3_PLY
+	bool
+
+config HOST_SYSTEM_PYTHON3_PYYAML
+	bool
+
+config HOST_SYSTEM_PYTHON3_JINJA2
+	bool
+
 endif
diff --git a/rules/host-system-python3.make b/rules/host-system-python3.make
index 7f97f9349..81c400473 100644
--- a/rules/host-system-python3.make
+++ b/rules/host-system-python3.make
@@ -53,6 +53,24 @@ ifdef PTXCONF_HOST_SYSTEM_PYTHON3_SIX
 	@$(SYSTEMPYTHON3) -c 'import six' 2>/dev/null || \
 		ptxd_bailout "Python six module not found! \
 	Please install python3-six (debian)";
+endif
+ifdef PTXCONF_HOST_SYSTEM_PYTHON3_PLY
+	@echo "Checking for Python ply ..."
+	@$(SYSTEMPYTHON3) -c 'import ply' 2>/dev/null || \
+		ptxd_bailout "Python ply module not found! \
+	Please install python3-ply (debian)";
+endif
+ifdef PTXCONF_HOST_SYSTEM_PYTHON3_JINJA2
+	@echo "Checking for Python jinja2 ..."
+	@$(SYSTEMPYTHON3) -c 'import jinja2' 2>/dev/null || \
+		ptxd_bailout "Python jinja2 module not found! \
+	Please install python3-jinja2 (debian)";
+endif
+ifdef PTXCONF_HOST_SYSTEM_PYTHON3_PYYAML
+	@echo "Checking for Python pyyaml ..."
+	@$(SYSTEMPYTHON3) -c 'import yaml' 2>/dev/null || \
+		ptxd_bailout "Python pyyaml module not found! \
+	Please install python3-yaml (debian)";
 endif
 	@$(call touch)
 
-- 
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] 4+ messages in thread

* [ptxdist] [PATCH 2/2] libcamera: Add package
  2021-03-22 13:48 [ptxdist] [PATCH 1/2] host-system-python3: Add flags for ply, pyyaml, jinja2 Marian Cichy
@ 2021-03-22 13:48 ` Marian Cichy
  2021-05-03 10:27   ` Marco Felsch
  0 siblings, 1 reply; 4+ messages in thread
From: Marian Cichy @ 2021-03-22 13:48 UTC (permalink / raw)
  To: ptxdist; +Cc: Marian Cichy

libcamera is a new library to ease usage and configuration for
camera devices.

Currently, libcamera has no release tags. This version is based on
commit 5154e14b from 2021-03-22.

Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
---
 rules/libcamera.in   |  75 +++++++++++++++++++++++++++
 rules/libcamera.make | 117 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 192 insertions(+)
 create mode 100644 rules/libcamera.in
 create mode 100644 rules/libcamera.make

diff --git a/rules/libcamera.in b/rules/libcamera.in
new file mode 100644
index 000000000..886f716f6
--- /dev/null
+++ b/rules/libcamera.in
@@ -0,0 +1,75 @@
+## SECTION=multimedia_libs
+
+menuconfig LIBCAMERA
+	tristate
+	prompt "libcamera                     "
+	select HOST_MESON
+	select HOST_SYSTEM_PYTHON3
+	select HOST_SYSTEM_PYTHON3_PLY
+	select HOST_SYSTEM_PYTHON3_PYYAML
+	select HOST_SYSTEM_PYTHON3_JINJA2
+	select GNUTLS
+	select OPENSSL
+	select BOOST			if LIBCAMERA_PIPELINES_RASPBERRYPI
+	select GSTREAMER1		if LIBCAMERA_GSTREAMER
+	select GST_PLUGINS_BASE1	if LIBCAMERA_GSTREAMER
+	select LIBEVENT			if LIBCAMERA_CAM
+	select QT5			if LIBCAMERA_QCAM
+	help
+	  libcamera is a library to ease configuration and usage of camera devices/
+
+if LIBCAMERA
+
+config LIBCAMERA_GSTREAMER
+	bool
+	prompt "libcamera GStreamer plugin"
+	help
+	  Gstreamer libcamerasrc element
+
+config LIBCAMERA_CAM
+	bool
+	prompt "cam test application"
+	help
+	  Demo application for libcamera
+
+config LIBCAMERA_QCAM
+	bool
+	prompt "qcam test application"
+	help
+	  Qt demo application for libcamera
+
+config LIBCAMERA_TRACING
+	bool
+	prompt "Enable tracing"
+
+config LIBCAMERA_V4L2
+	bool
+	prompt "V4L2 compatibility layer"
+
+comment "Pipelines"
+
+config LIBCAMERA_PIPELINES_IPU3
+	bool
+	prompt "ipu3"
+
+config LIBCAMERA_PIPELINES_RASPBERRYPI
+	bool
+	prompt "raspberrypi"
+
+config LIBCAMERA_PIPELINES_RKISP1
+	bool
+	prompt "rkisp1"
+
+config LIBCAMERA_PIPELINES_SIMPLE
+	bool
+	prompt "simple"
+
+config LIBCAMERA_PIPELINES_UVCVIDEO
+	bool
+	prompt "uvcvideo"
+
+config LIBCAMERA_PIPELINES_VIMC
+	bool
+	prompt "vimc"
+
+endif
diff --git a/rules/libcamera.make b/rules/libcamera.make
new file mode 100644
index 000000000..7e1ab6ae7
--- /dev/null
+++ b/rules/libcamera.make
@@ -0,0 +1,117 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Marian Cichy <m.cichy@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBCAMERA) += libcamera
+
+#
+# Paths and names
+#
+LIBCAMERA_VERSION	:= 2021-02-01-g5154e14b
+LIBCAMERA_MD5		:= df003c77b6e6bda22d5ef72fed2540ad
+LIBCAMERA		:= libcamera-$(LIBCAMERA_VERSION)
+LIBCAMERA_SUFFIX	:= tar.xz
+LIBCAMERA_URL		:= git://linuxtv.org/libcamera.git;tag=$(LIBCAMERA_VERSION)
+LIBCAMERA_SOURCE	:= $(SRCDIR)/$(LIBCAMERA).$(LIBCAMERA_SUFFIX)
+LIBCAMERA_DIR		:= $(BUILDDIR)/$(LIBCAMERA)
+LIBCAMERA_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+#$(LIBCAMERA_SOURCE):
+#	@$(call targetinfo)
+#	@$(call get, LIBCAMERA)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#LIBCAMERA_CONF_ENV	:= $(CROSS_ENV)
+
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_IPU3)		+= ipu3
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_RASPBERRYPI)	+= raspberrypi
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_RKISP1)	+= rkisp1
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_SIMPLE)	+= simple
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_UVCVIDEO)	+= uvcvideo
+LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_VIMC)		+= vimc
+
+LIBCAMERA_CONF_TOOL	:= meson
+LIBCAMERA_CONF_OPT	:=  \
+	$(CROSS_MESON_USR) \
+	-Dandroid=disabled\
+	-Ddocumentation=disabled \
+	-Dgstreamer=$(call ptx/endis, PTXCONF_LIBCAMERA_GSTREAMER)d \
+	-Dpipelines=$(subst $(space),$(comma),$(LIBCAMERA_PIPELINES-y)) \
+	-Dqcam=$(call ptx/endis, PTXCONF_LIBCAMERA_QCAM)d \
+	-Dtest=$(call ptx/truefalse, PTXCONF_LIBCAMERA_TEST) \
+	-Dtracing=$(call ptx/endis, PTXCONF_LIBCAMERA_TRACING)d \
+	-Dv4l2=$(call ptx/truefalse, PTXCONF_LIBCAMERA_V4L2)
+
+#$(STATEDIR)/libcamera.prepare:
+#	@$(call targetinfo)
+#	@$(call world/prepare, LIBCAMERA)
+#	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/libcamera.compile:
+#	@$(call targetinfo)
+#	@$(call world/compile, LIBCAMERA)
+#	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/libcamera.install:
+#	@$(call targetinfo)
+#	@$(call world/install, LIBCAMERA)
+#	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libcamera.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libcamera)
+	@$(call install_fixup, libcamera,PRIORITY,optional)
+	@$(call install_fixup, libcamera,SECTION,base)
+	@$(call install_fixup, libcamera,AUTHOR,"Marian Cichy <m.cichy@pengutronix.de>")
+	@$(call install_fixup, libcamera,DESCRIPTION,missing)
+
+	@$(call install_lib, libcamera, 0, 0, 0644, libcamera)
+
+ifdef PTXCONF_LIBCAMERA_GSTREAMER
+	@$(call install_lib, libcamera, 0, 0, 0644, gstreamer-1.0/libgstlibcamera)
+endif
+
+ifdef PTXCONF_LIBCAMERA_CAM
+	@$(call install_copy, libcamera, 0, 0, 0755, -, /usr/bin/cam)
+endif
+
+	@$(call install_finish, libcamera)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/libcamera.clean:
+#	@$(call targetinfo)
+#	@$(call clean_pkg, LIBCAMERA)
+
+# vim: syntax=make
-- 
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] 4+ messages in thread

* Re: [ptxdist] [PATCH 2/2] libcamera: Add package
  2021-03-22 13:48 ` [ptxdist] [PATCH 2/2] libcamera: Add package Marian Cichy
@ 2021-05-03 10:27   ` Marco Felsch
  2021-05-03 11:21     ` Marco Felsch
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Felsch @ 2021-05-03 10:27 UTC (permalink / raw)
  To: ptxdist; +Cc: Marian Cichy

Hi all,

a few nits on this.

On 21-03-22 14:48, Marian Cichy wrote:
> libcamera is a new library to ease usage and configuration for
> camera devices.
> 
> Currently, libcamera has no release tags. This version is based on
> commit 5154e14b from 2021-03-22.
> 
> Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
> ---
>  rules/libcamera.in   |  75 +++++++++++++++++++++++++++
>  rules/libcamera.make | 117 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 192 insertions(+)
>  create mode 100644 rules/libcamera.in
>  create mode 100644 rules/libcamera.make
> 
> diff --git a/rules/libcamera.in b/rules/libcamera.in
> new file mode 100644
> index 000000000..886f716f6
> --- /dev/null
> +++ b/rules/libcamera.in
> @@ -0,0 +1,75 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig LIBCAMERA
> +	tristate
> +	prompt "libcamera                     "
> +	select HOST_MESON
> +	select HOST_SYSTEM_PYTHON3
> +	select HOST_SYSTEM_PYTHON3_PLY
> +	select HOST_SYSTEM_PYTHON3_PYYAML
> +	select HOST_SYSTEM_PYTHON3_JINJA2
> +	select GNUTLS
> +	select OPENSSL
> +	select BOOST			if LIBCAMERA_PIPELINES_RASPBERRYPI
> +	select GSTREAMER1		if LIBCAMERA_GSTREAMER
> +	select GST_PLUGINS_BASE1	if LIBCAMERA_GSTREAMER
> +	select LIBEVENT			if LIBCAMERA_CAM
> +	select QT5			if LIBCAMERA_QCAM
> +	help
> +	  libcamera is a library to ease configuration and usage of camera devices/
> +
> +if LIBCAMERA
> +
> +config LIBCAMERA_GSTREAMER
> +	bool
> +	prompt "libcamera GStreamer plugin"
> +	help
> +	  Gstreamer libcamerasrc element
> +
> +config LIBCAMERA_CAM
> +	bool
> +	prompt "cam test application"
> +	help
> +	  Demo application for libcamera
> +
> +config LIBCAMERA_QCAM
> +	bool
> +	prompt "qcam test application"
> +	help
> +	  Qt demo application for libcamera
> +
> +config LIBCAMERA_TRACING
> +	bool
> +	prompt "Enable tracing"
> +
> +config LIBCAMERA_V4L2
> +	bool
> +	prompt "V4L2 compatibility layer"
> +
> +comment "Pipelines"
> +
> +config LIBCAMERA_PIPELINES_IPU3
> +	bool
> +	prompt "ipu3"
> +
> +config LIBCAMERA_PIPELINES_RASPBERRYPI
> +	bool
> +	prompt "raspberrypi"
> +
> +config LIBCAMERA_PIPELINES_RKISP1
> +	bool
> +	prompt "rkisp1"
> +
> +config LIBCAMERA_PIPELINES_SIMPLE
> +	bool
> +	prompt "simple"
> +
> +config LIBCAMERA_PIPELINES_UVCVIDEO
> +	bool
> +	prompt "uvcvideo"
> +
> +config LIBCAMERA_PIPELINES_VIMC
> +	bool
> +	prompt "vimc"
> +
> +endif
> diff --git a/rules/libcamera.make b/rules/libcamera.make
> new file mode 100644
> index 000000000..7e1ab6ae7
> --- /dev/null
> +++ b/rules/libcamera.make
> @@ -0,0 +1,117 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Marian Cichy <m.cichy@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBCAMERA) += libcamera
> +
> +#
> +# Paths and names
> +#
> +LIBCAMERA_VERSION	:= 2021-02-01-g5154e14b
> +LIBCAMERA_MD5		:= df003c77b6e6bda22d5ef72fed2540ad
> +LIBCAMERA		:= libcamera-$(LIBCAMERA_VERSION)
> +LIBCAMERA_SUFFIX	:= tar.xz
> +LIBCAMERA_URL		:= git://linuxtv.org/libcamera.git;tag=$(LIBCAMERA_VERSION)
> +LIBCAMERA_SOURCE	:= $(SRCDIR)/$(LIBCAMERA).$(LIBCAMERA_SUFFIX)
> +LIBCAMERA_DIR		:= $(BUILDDIR)/$(LIBCAMERA)
> +LIBCAMERA_LICENSE	:= unknown

This project is a has multiple licenses:

- core-lib: LGPL-2.1-or-later
- IPA modules:
  - IPA API: LGPL-2.1-or-later
  - within libcamera: "The IPA modules, located in src/ipa/, are covered
    by free software licenses hosen by the module authors. The
    LGPL-2.1-or-later license is recommended.
    "
  - external: "Third-party closed-source IPA modules are thus permitted,
    provided they comply with the licensing requirements of any software
    they include or link to."
- cam/qcam/test: GPL-2.0-or-later
- 3rd party libs: their own licenses

> +# ----------------------------------------------------------------------------
> +# Get
> +# ----------------------------------------------------------------------------
> +
> +#$(LIBCAMERA_SOURCE):
> +#	@$(call targetinfo)
> +#	@$(call get, LIBCAMERA)

Default stage should be removed.

> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#LIBCAMERA_CONF_ENV	:= $(CROSS_ENV)
> +
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_IPU3)		+= ipu3
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_RASPBERRYPI)	+= raspberrypi
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_RKISP1)	+= rkisp1
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_SIMPLE)	+= simple
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_UVCVIDEO)	+= uvcvideo
> +LIBCAMERA_PIPELINES-$(PTXCONF_LIBCAMERA_PIPELINES_VIMC)		+= vimc

We should have at least one pipeline enabled since the whole lib makes no
sense without. We could set simple to be be always-on or we error out
here if it is zero (the user didn't configured it).

> +LIBCAMERA_CONF_TOOL	:= meson
> +LIBCAMERA_CONF_OPT	:=  \
> +	$(CROSS_MESON_USR) \
> +	-Dandroid=disabled\
> +	-Ddocumentation=disabled \
> +	-Dgstreamer=$(call ptx/endis, PTXCONF_LIBCAMERA_GSTREAMER)d \
> +	-Dpipelines=$(subst $(space),$(comma),$(LIBCAMERA_PIPELINES-y)) \
> +	-Dqcam=$(call ptx/endis, PTXCONF_LIBCAMERA_QCAM)d \
> +	-Dtest=$(call ptx/truefalse, PTXCONF_LIBCAMERA_TEST) \
> +	-Dtracing=$(call ptx/endis, PTXCONF_LIBCAMERA_TRACING)d \
> +	-Dv4l2=$(call ptx/truefalse, PTXCONF_LIBCAMERA_V4L2)
> +
> +#$(STATEDIR)/libcamera.prepare:
> +#	@$(call targetinfo)
> +#	@$(call world/prepare, LIBCAMERA)
> +#	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libcamera.compile:
> +#	@$(call targetinfo)
> +#	@$(call world/compile, LIBCAMERA)
> +#	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libcamera.install:
> +#	@$(call targetinfo)
> +#	@$(call world/install, LIBCAMERA)
> +#	@$(call touch)

Default stages could be removed.

> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libcamera.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libcamera)
> +	@$(call install_fixup, libcamera,PRIORITY,optional)
> +	@$(call install_fixup, libcamera,SECTION,base)
> +	@$(call install_fixup, libcamera,AUTHOR,"Marian Cichy <m.cichy@pengutronix.de>")
> +	@$(call install_fixup, libcamera,DESCRIPTION,missing)
> +
> +	@$(call install_lib, libcamera, 0, 0, 0644, libcamera)
> +
> +ifdef PTXCONF_LIBCAMERA_GSTREAMER
> +	@$(call install_lib, libcamera, 0, 0, 0644, gstreamer-1.0/libgstlibcamera)
> +endif
> +
> +ifdef PTXCONF_LIBCAMERA_CAM
> +	@$(call install_copy, libcamera, 0, 0, 0755, -, /usr/bin/cam)
> +endif

Missing qcaml targetinstall stage.


> +
> +	@$(call install_finish, libcamera)
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libcamera.clean:
> +#	@$(call targetinfo)
> +#	@$(call clean_pkg, LIBCAMERA)

Default stages could be removed.

Regards,
  Marco

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


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

* Re: [ptxdist] [PATCH 2/2] libcamera: Add package
  2021-05-03 10:27   ` Marco Felsch
@ 2021-05-03 11:21     ` Marco Felsch
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Felsch @ 2021-05-03 11:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Marian Cichy

On 21-05-03 12:27, Marco Felsch wrote:
> Hi all,
> 
> a few nits on this.
> 
> On 21-03-22 14:48, Marian Cichy wrote:

...

> > +config LIBCAMERA_TRACING
> > +	bool
> > +	prompt "Enable tracing"

If enabled it causes an error, that 'lttng-ust' is not found. For the
initial brinup we should remove the option and disable it within the
makefile. Later on we can add the support for it.

Regards,
  Marco

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


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

end of thread, other threads:[~2021-05-03 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 13:48 [ptxdist] [PATCH 1/2] host-system-python3: Add flags for ply, pyyaml, jinja2 Marian Cichy
2021-03-22 13:48 ` [ptxdist] [PATCH 2/2] libcamera: Add package Marian Cichy
2021-05-03 10:27   ` Marco Felsch
2021-05-03 11:21     ` Marco Felsch

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