Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-14 Thread Michael Olbrich
On Wed, Sep 14, 2022 at 09:50:41AM +0200, Marco Felsch wrote:
> On 22-09-14, Matthias Fend wrote:
> > Thanks for your input. I will also include the additional crypto options.
> > Is the reason for disabling module signing to reduce dependencies on the
> > target, or anything else?
> 
> Yes, it would reduce the dependencies if off. Also this gives the user
> the ability to select the crypto lib which is already used on the
> target. Since the worst case would be to pull a 2nd lib if one already
> have one.
> 
> Don't know if there is some option to select a global crypto provider.
> @Michael is this possible?

So, I like having a choice, because it allows minimizing the number of
crypto libraries. But these is not global default, because it's hard to
implement:
If it's just a default for a choice option, then it must be enabled before
all other packages: The default is is ignored if something is already
enabled. So changing the default has no effect either.

We could also hide the other options when a default is select. But that
means that there is no way to overwrite the default. And sometimes not all
backends have the same features.

Neither version is really desirable, so I never bothered to implement
anything like this.

Michael

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



Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-14 Thread Michael Olbrich
On Wed, Sep 14, 2022 at 07:54:43AM +0200, Matthias Fend wrote:
> Am 13.09.2022 um 17:24 schrieb Michael Olbrich:
> > On Sun, Sep 11, 2022 at 12:41:05PM +0200, Matthias Fend wrote:
> > > libcamera is an open source camera stack and framework for Linux, Android,
> > > and ChromeOS.
> > > +menu "Pipelines"
> > 
> > So, I missed this in the first version: Why would someone enable (for
> > example) the ipu3 pipeline but not the ipu3 IPA? In other words, wouldn't
> > it be easier to have one "Hardware" option each and enable both IPA and
> > pipeline (or whichever is available)?
> 
> - There are some pipelines (simple, uvc) that are not directly mapped to an
> IPA.
> 
> - It is possible, and I think a likely use case, that for example the IPU3
> pipeline is selected, but a custom (then from another package) IPA is used.
> 
> - libcamera provides extra separate options for pipelines and IPAs and I
> assume someone has thought about that. Perhaps there will be more possible
> pipeline and IPA combinations in the future.
> 
> For these reasons, I have decided to map these options completely and not to
> include any further implications and relationships in the rule file.
> 
> Does that sound reasonable to you, or should I still change it as suggested?

The architecture (and therefore the meson options) is designed in a way to
allow closed source IPAs. I don't think that this will be a very common use
case in PTXdist. So I prefer one option right now. We can always change
this later, if that assumption turns out to be wrong.

Michael


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



Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-14 Thread Marco Felsch
On 22-09-13, Michael Olbrich wrote:
> On Tue, Sep 13, 2022 at 03:53:21PM +0200, Marco Felsch wrote:
> > Hi Matthias,

...

> > > + select QT5  if LIBCAMERA_QCAM
> > > + select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
> > > + select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
> > > + select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
> > > + help
> > > +   A complex camera support library for Linux, Android, and ChromeOS.
> > > +
> > > +if LIBCAMERA
> > 
> > I would provide the user the choice of selecting/enabling the ipa module
> > signing.
> 
> Hmmm, what would be the benefit of making this optional?

To leave the user the option to not enable it at all. Maybe your rootfs
size is very limited and you can't pull any of crpytolibs, then you can
turn it off.

> And if the modules are not signed then they should be stripped.

The IPAs running in a seperate process if they are not signed. So the
user has the choice between runtime overhead <-> rootfs size.

Regards,
  Marco



Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-14 Thread Marco Felsch
Hi Matthias,

On 22-09-14, Matthias Fend wrote:
> Hi Marco,
> 
> Am 13.09.2022 um 15:53 schrieb Marco Felsch:
> > Hi Matthias,
> > 
> > thanks for working on this, I also have a libcamera package here :) and
> > want to share a few findings.
> > 
> > On 22-09-11, Matthias Fend wrote:
> > > libcamera is an open source camera stack and framework for Linux, Android,
> > > and ChromeOS.
> > > 
> > > Signed-off-by: Matthias Fend 
> > > ---
> > >   ...t-information-for-version-generation.patch |  29 
> > >   .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
> > >   rules/libcamera.in|  90 
> > >   rules/libcamera.make  | 133 ++
> > >   4 files changed, 256 insertions(+)
> > >   create mode 100644 
> > > patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > >   create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
> > >   create mode 100644 rules/libcamera.in
> > >   create mode 100644 rules/libcamera.make
> > > 
> > > diff --git 
> > > a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > >  
> > > b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > > new file mode 100644
> > > index 0..3e5c5ce68
> > > --- /dev/null
> > > +++ 
> > > b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > > @@ -0,0 +1,29 @@
> > > +From: Matthias Fend 
> > > +Date: Wed, 31 Aug 2022 16:54:20 +0200
> > > +Subject: [PATCH] do not use git information for version generation
> > > +
> > > +Since libcamera is checked out without a git repo, git version reports 
> > > the
> > > +version of the BSP. Since this is obviously wrong, just use the project
> > > +version.
> > > +
> > > +Signed-off-by: Matthias Fend 
> > > +---
> > > + meson.build | 5 ++---
> > > + 1 file changed, 2 insertions(+), 3 deletions(-)
> > > +
> > > +diff --git a/meson.build b/meson.build
> > > +index 72919102ad55..e333df59388d 100644
> > > +--- a/meson.build
> > >  b/meson.build
> > > +@@ -20,9 +20,8 @@ libcamera_git_version = 
> > > run_command('utils/gen-version.sh',
> > > + meson.project_build_root(),
> > > + meson.project_source_root(),
> > > + check: false).stdout().strip()
> > > +-if libcamera_git_version == ''
> > > +-libcamera_git_version = meson.project_version()
> > > +-endif
> > > ++
> > > ++libcamera_git_version = meson.project_version()
> > > +
> > > + libcamera_version = libcamera_git_version.split('+')[0]
> > > +
> > > diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
> > > b/patches/libcamera-2022-08-30-g68683d3811a8/series
> > > new file mode 100644
> > > index 0..6ca42eafc
> > > --- /dev/null
> > > +++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
> > > @@ -0,0 +1,4 @@
> > > +# generated by git-ptx-patches
> > > +#tag:base --start-number 1
> > > +0001-do-not-use-git-information-for-version-generation.patch
> > > +# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
> > > diff --git a/rules/libcamera.in b/rules/libcamera.in
> > > new file mode 100644
> > > index 0..0a103fc51
> > > --- /dev/null
> > > +++ b/rules/libcamera.in
> > > @@ -0,0 +1,90 @@
> > > +## SECTION=multimedia_libs
> > > +
> > > +config LIBCAMERA
> > > + bool
> > > + prompt "libcamera"
> > > + select HOST_MESON
> > > + select HOST_SYSTEM_PYTHON3
> > > + select HOST_SYSTEM_PYTHON3_JINJA2
> > > + select HOST_SYSTEM_PYTHON3_PYYAML
> > > + select HOST_SYSTEM_PYTHON3_PLY
> > > + select GNUTLS
> > 
> > Please see below about selecting the crypto lib. Than this would be
> > changed to:
> > 
> > select GNUTLS   if 
> > LIBCAMERA_IPA_MODULE_SIGN_GNUTLS
> > select OPENSSL  if 
> > LIBCAMERA_IPA_MODULE_SIGN_OPENSSL
> > 
> > > + select UDEV_LIBUDEV
> > > + select LIBYAML
> > 
> > missing select BOOSTif 
> > LIBCAMERA_PIPELINE_RASPBERRYPI
> 
> 
> Since commit 'ipa: raspberrypi: Use YamlParser to replace dependency on
> boost' this shouldn't be necessary anymore, but maybe I missed something?

Ah.. you're right, forget my comment. Didn't noticed that commit.

> > > + select LIBUNWINDif LIBCAMERA_BACKTRACE
> > > + select GSTREAMER1   if LIBCAMERA_GSTREAMER
> > > + select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
> > > + select LIBEVENT if LIBCAMERA_CAM
> > 
> > missing select LIBDRM   if LIBCAMERA_CAM
> 
> It is possible to build and use 'cam' without libdrm (as in my case), but
> you get more features when additional libraries are available (libdrm,
> libjpeg, SDL2).
> Since at least one seems to need the KMS sink function, I can 

Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-14 Thread Matthias Fend

Hi Marco,

Am 13.09.2022 um 15:53 schrieb Marco Felsch:

Hi Matthias,

thanks for working on this, I also have a libcamera package here :) and
want to share a few findings.

On 22-09-11, Matthias Fend wrote:

libcamera is an open source camera stack and framework for Linux, Android,
and ChromeOS.

Signed-off-by: Matthias Fend 
---
  ...t-information-for-version-generation.patch |  29 
  .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
  rules/libcamera.in|  90 
  rules/libcamera.make  | 133 ++
  4 files changed, 256 insertions(+)
  create mode 100644 
patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
  create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
  create mode 100644 rules/libcamera.in
  create mode 100644 rules/libcamera.make

diff --git 
a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
 
b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
new file mode 100644
index 0..3e5c5ce68
--- /dev/null
+++ 
b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
@@ -0,0 +1,29 @@
+From: Matthias Fend 
+Date: Wed, 31 Aug 2022 16:54:20 +0200
+Subject: [PATCH] do not use git information for version generation
+
+Since libcamera is checked out without a git repo, git version reports the
+version of the BSP. Since this is obviously wrong, just use the project
+version.
+
+Signed-off-by: Matthias Fend 
+---
+ meson.build | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 72919102ad55..e333df59388d 100644
+--- a/meson.build
 b/meson.build
+@@ -20,9 +20,8 @@ libcamera_git_version = run_command('utils/gen-version.sh',
+ meson.project_build_root(),
+ meson.project_source_root(),
+ check: false).stdout().strip()
+-if libcamera_git_version == ''
+-libcamera_git_version = meson.project_version()
+-endif
++
++libcamera_git_version = meson.project_version()
+
+ libcamera_version = libcamera_git_version.split('+')[0]
+
diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
b/patches/libcamera-2022-08-30-g68683d3811a8/series
new file mode 100644
index 0..6ca42eafc
--- /dev/null
+++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-do-not-use-git-information-for-version-generation.patch
+# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
diff --git a/rules/libcamera.in b/rules/libcamera.in
new file mode 100644
index 0..0a103fc51
--- /dev/null
+++ b/rules/libcamera.in
@@ -0,0 +1,90 @@
+## SECTION=multimedia_libs
+
+config LIBCAMERA
+   bool
+   prompt "libcamera"
+   select HOST_MESON
+   select HOST_SYSTEM_PYTHON3
+   select HOST_SYSTEM_PYTHON3_JINJA2
+   select HOST_SYSTEM_PYTHON3_PYYAML
+   select HOST_SYSTEM_PYTHON3_PLY
+   select GNUTLS


Please see below about selecting the crypto lib. Than this would be
changed to:

select GNUTLS   if 
LIBCAMERA_IPA_MODULE_SIGN_GNUTLS
select OPENSSL  if 
LIBCAMERA_IPA_MODULE_SIGN_OPENSSL


+   select UDEV_LIBUDEV
+   select LIBYAML


missing select BOOSTif 
LIBCAMERA_PIPELINE_RASPBERRYPI



Since commit 'ipa: raspberrypi: Use YamlParser to replace dependency on 
boost' this shouldn't be necessary anymore, but maybe I missed something?





+   select LIBUNWINDif LIBCAMERA_BACKTRACE
+   select GSTREAMER1   if LIBCAMERA_GSTREAMER
+   select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
+   select LIBEVENT if LIBCAMERA_CAM


missing select LIBDRM   if LIBCAMERA_CAM


It is possible to build and use 'cam' without libdrm (as in my case), 
but you get more features when additional libraries are available 
(libdrm, libjpeg, SDL2).
Since at least one seems to need the KMS sink function, I can add an 
extra option for "cam" that selects libdrm.

Would that meet your requirements?




+   select QT5  if LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
+   help
+ A complex camera support library for Linux, Android, and ChromeOS.
+
+if LIBCAMERA


I would provide the user the choice of selecting/enabling the ipa module
signing.

config LIBCAMERA_IPA_MODULE_SIGN
 bool
 default y
 prompt "Enable IPA module signing"
   

Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-13 Thread Matthias Fend

Hi Michael,

Am 13.09.2022 um 17:24 schrieb Michael Olbrich:

On Sun, Sep 11, 2022 at 12:41:05PM +0200, Matthias Fend wrote:

libcamera is an open source camera stack and framework for Linux, Android,
and ChromeOS.

Signed-off-by: Matthias Fend 
---
  ...t-information-for-version-generation.patch |  29 
  .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
  rules/libcamera.in|  90 
  rules/libcamera.make  | 133 ++
  4 files changed, 256 insertions(+)
  create mode 100644 
patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
  create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
  create mode 100644 rules/libcamera.in
  create mode 100644 rules/libcamera.make

diff --git 
a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
 
b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
new file mode 100644
index 0..3e5c5ce68
--- /dev/null
+++ 
b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
@@ -0,0 +1,29 @@
+From: Matthias Fend 
+Date: Wed, 31 Aug 2022 16:54:20 +0200
+Subject: [PATCH] do not use git information for version generation
+
+Since libcamera is checked out without a git repo, git version reports the
+version of the BSP. Since this is obviously wrong, just use the project
+version.
+
+Signed-off-by: Matthias Fend 
+---
+ meson.build | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 72919102ad55..e333df59388d 100644
+--- a/meson.build
 b/meson.build
+@@ -20,9 +20,8 @@ libcamera_git_version = run_command('utils/gen-version.sh',
+ meson.project_build_root(),
+ meson.project_source_root(),
+ check: false).stdout().strip()
+-if libcamera_git_version == ''
+-libcamera_git_version = meson.project_version()
+-endif
++
++libcamera_git_version = meson.project_version()
+
+ libcamera_version = libcamera_git_version.split('+')[0]
+
diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
b/patches/libcamera-2022-08-30-g68683d3811a8/series
new file mode 100644
index 0..6ca42eafc
--- /dev/null
+++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-do-not-use-git-information-for-version-generation.patch
+# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
diff --git a/rules/libcamera.in b/rules/libcamera.in
new file mode 100644
index 0..0a103fc51
--- /dev/null
+++ b/rules/libcamera.in
@@ -0,0 +1,90 @@
+## SECTION=multimedia_libs
+
+config LIBCAMERA
+   bool
+   prompt "libcamera"
+   select HOST_MESON
+   select HOST_SYSTEM_PYTHON3
+   select HOST_SYSTEM_PYTHON3_JINJA2
+   select HOST_SYSTEM_PYTHON3_PYYAML
+   select HOST_SYSTEM_PYTHON3_PLY
+   select GNUTLS
+   select UDEV_LIBUDEV
+   select LIBYAML
+   select LIBUNWINDif LIBCAMERA_BACKTRACE
+   select GSTREAMER1   if LIBCAMERA_GSTREAMER
+   select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
+   select LIBEVENT if LIBCAMERA_CAM
+   select QT5  if LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
+   select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
+   help
+ A complex camera support library for Linux, Android, and ChromeOS.
+
+if LIBCAMERA
+
+config LIBCAMERA_GSTREAMER
+   bool
+   prompt "install GStreamer plugin"
+
+config LIBCAMERA_CAM
+   bool
+   prompt "install cam test application"
+
+config LIBCAMERA_QCAM
+   bool
+   prompt "install qcam test application"
+
+config LIBCAMERA_BACKTRACE
+   bool
+   prompt "enable tracing support"
+
+endif
+
+menu "IPAs"
+
+config LIBCAMERA_IPA_IPU3
+   bool
+   prompt "ipu3"
+
+config LIBCAMERA_IPA_RASPBERRYPI
+   bool
+   prompt "raspberrypi"
+
+config LIBCAMERA_IPA_RKISP1
+   bool
+   prompt "rkisp1"
+
+config LIBCAMERA_IPA_VIMC
+   bool
+   prompt "vimc"
+endmenu
+
+menu "Pipelines"


So, I missed this in the first version: Why would someone enable (for
example) the ipu3 pipeline but not the ipu3 IPA? In other words, wouldn't
it be easier to have one "Hardware" option each and enable both IPA and
pipeline (or whichever is available)?


- There are some pipelines (simple, uvc) that are not directly mapped to 
an IPA.


- It is possible, and I think a likely use case, that for example the 
IPU3 pipeline is selected, but a custom (then from another package) IPA 
is used.


- 

Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-13 Thread Michael Olbrich
On Tue, Sep 13, 2022 at 03:53:21PM +0200, Marco Felsch wrote:
> Hi Matthias,
> 
> thanks for working on this, I also have a libcamera package here :) and
> want to share a few findings.
> 
> On 22-09-11, Matthias Fend wrote:
> > libcamera is an open source camera stack and framework for Linux, Android,
> > and ChromeOS.
> > 
> > Signed-off-by: Matthias Fend 
> > ---
> >  ...t-information-for-version-generation.patch |  29 
> >  .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
> >  rules/libcamera.in|  90 
> >  rules/libcamera.make  | 133 ++
> >  4 files changed, 256 insertions(+)
> >  create mode 100644 
> > patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> >  create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
> >  create mode 100644 rules/libcamera.in
> >  create mode 100644 rules/libcamera.make
> > 
> > diff --git 
> > a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> >  
> > b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > new file mode 100644
> > index 0..3e5c5ce68
> > --- /dev/null
> > +++ 
> > b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> > @@ -0,0 +1,29 @@
> > +From: Matthias Fend 
> > +Date: Wed, 31 Aug 2022 16:54:20 +0200
> > +Subject: [PATCH] do not use git information for version generation
> > +
> > +Since libcamera is checked out without a git repo, git version reports the
> > +version of the BSP. Since this is obviously wrong, just use the project
> > +version.
> > +
> > +Signed-off-by: Matthias Fend 
> > +---
> > + meson.build | 5 ++---
> > + 1 file changed, 2 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/meson.build b/meson.build
> > +index 72919102ad55..e333df59388d 100644
> > +--- a/meson.build
> >  b/meson.build
> > +@@ -20,9 +20,8 @@ libcamera_git_version = 
> > run_command('utils/gen-version.sh',
> > + meson.project_build_root(),
> > + meson.project_source_root(),
> > + check: false).stdout().strip()
> > +-if libcamera_git_version == ''
> > +-libcamera_git_version = meson.project_version()
> > +-endif
> > ++
> > ++libcamera_git_version = meson.project_version()
> > + 
> > + libcamera_version = libcamera_git_version.split('+')[0]
> > + 
> > diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
> > b/patches/libcamera-2022-08-30-g68683d3811a8/series
> > new file mode 100644
> > index 0..6ca42eafc
> > --- /dev/null
> > +++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
> > @@ -0,0 +1,4 @@
> > +# generated by git-ptx-patches
> > +#tag:base --start-number 1
> > +0001-do-not-use-git-information-for-version-generation.patch
> > +# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
> > diff --git a/rules/libcamera.in b/rules/libcamera.in
> > new file mode 100644
> > index 0..0a103fc51
> > --- /dev/null
> > +++ b/rules/libcamera.in
> > @@ -0,0 +1,90 @@
> > +## SECTION=multimedia_libs
> > +
> > +config LIBCAMERA
> > +   bool
> > +   prompt "libcamera"
> > +   select HOST_MESON
> > +   select HOST_SYSTEM_PYTHON3
> > +   select HOST_SYSTEM_PYTHON3_JINJA2
> > +   select HOST_SYSTEM_PYTHON3_PYYAML
> > +   select HOST_SYSTEM_PYTHON3_PLY
> > +   select GNUTLS
> 
> Please see below about selecting the crypto lib. Than this would be
> changed to:
> 
>   select GNUTLS   if 
> LIBCAMERA_IPA_MODULE_SIGN_GNUTLS
>   select OPENSSL  if 
> LIBCAMERA_IPA_MODULE_SIGN_OPENSSL

And
select HOST_OPENSSL if LIBCAMERA_IPA_MODULE_SIGN

>From what I can tell, openssl is always used to sign the modules.

> > +   select UDEV_LIBUDEV
> > +   select LIBYAML
> 
> missing select BOOSTif 
> LIBCAMERA_PIPELINE_RASPBERRYPI
> 
> > +   select LIBUNWINDif LIBCAMERA_BACKTRACE
> > +   select GSTREAMER1   if LIBCAMERA_GSTREAMER
> > +   select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
> > +   select LIBEVENT if LIBCAMERA_CAM
> 
> missing select LIBDRM   if LIBCAMERA_CAM
> 
> > +   select QT5  if LIBCAMERA_QCAM
> > +   select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
> > +   select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
> > +   select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
> > +   help
> > + A complex camera support library for Linux, Android, and ChromeOS.
> > +
> > +if LIBCAMERA
> 
> I would provide the user the choice of selecting/enabling the ipa module
> signing.

Hmmm, what would be the benefit of making this optional?

And if the modules are not 

Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-13 Thread Michael Olbrich
On Sun, Sep 11, 2022 at 12:41:05PM +0200, Matthias Fend wrote:
> libcamera is an open source camera stack and framework for Linux, Android,
> and ChromeOS.
> 
> Signed-off-by: Matthias Fend 
> ---
>  ...t-information-for-version-generation.patch |  29 
>  .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
>  rules/libcamera.in|  90 
>  rules/libcamera.make  | 133 ++
>  4 files changed, 256 insertions(+)
>  create mode 100644 
> patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
>  create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
>  create mode 100644 rules/libcamera.in
>  create mode 100644 rules/libcamera.make
> 
> diff --git 
> a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
>  
> b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> new file mode 100644
> index 0..3e5c5ce68
> --- /dev/null
> +++ 
> b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> @@ -0,0 +1,29 @@
> +From: Matthias Fend 
> +Date: Wed, 31 Aug 2022 16:54:20 +0200
> +Subject: [PATCH] do not use git information for version generation
> +
> +Since libcamera is checked out without a git repo, git version reports the
> +version of the BSP. Since this is obviously wrong, just use the project
> +version.
> +
> +Signed-off-by: Matthias Fend 
> +---
> + meson.build | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 72919102ad55..e333df59388d 100644
> +--- a/meson.build
>  b/meson.build
> +@@ -20,9 +20,8 @@ libcamera_git_version = run_command('utils/gen-version.sh',
> + meson.project_build_root(),
> + meson.project_source_root(),
> + check: false).stdout().strip()
> +-if libcamera_git_version == ''
> +-libcamera_git_version = meson.project_version()
> +-endif
> ++
> ++libcamera_git_version = meson.project_version()
> + 
> + libcamera_version = libcamera_git_version.split('+')[0]
> + 
> diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
> b/patches/libcamera-2022-08-30-g68683d3811a8/series
> new file mode 100644
> index 0..6ca42eafc
> --- /dev/null
> +++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-do-not-use-git-information-for-version-generation.patch
> +# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
> diff --git a/rules/libcamera.in b/rules/libcamera.in
> new file mode 100644
> index 0..0a103fc51
> --- /dev/null
> +++ b/rules/libcamera.in
> @@ -0,0 +1,90 @@
> +## SECTION=multimedia_libs
> +
> +config LIBCAMERA
> + bool
> + prompt "libcamera"
> + select HOST_MESON
> + select HOST_SYSTEM_PYTHON3
> + select HOST_SYSTEM_PYTHON3_JINJA2
> + select HOST_SYSTEM_PYTHON3_PYYAML
> + select HOST_SYSTEM_PYTHON3_PLY
> + select GNUTLS
> + select UDEV_LIBUDEV
> + select LIBYAML
> + select LIBUNWINDif LIBCAMERA_BACKTRACE
> + select GSTREAMER1   if LIBCAMERA_GSTREAMER
> + select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
> + select LIBEVENT if LIBCAMERA_CAM
> + select QT5  if LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
> + help
> +   A complex camera support library for Linux, Android, and ChromeOS.
> +
> +if LIBCAMERA
> +
> +config LIBCAMERA_GSTREAMER
> + bool
> + prompt "install GStreamer plugin"
> +
> +config LIBCAMERA_CAM
> + bool
> + prompt "install cam test application"
> +
> +config LIBCAMERA_QCAM
> + bool
> + prompt "install qcam test application"
> +
> +config LIBCAMERA_BACKTRACE
> + bool
> + prompt "enable tracing support"
> +
> +endif
> +
> +menu "IPAs"
> +
> +config LIBCAMERA_IPA_IPU3
> + bool
> + prompt "ipu3"
> +
> +config LIBCAMERA_IPA_RASPBERRYPI
> + bool
> + prompt "raspberrypi"
> +
> +config LIBCAMERA_IPA_RKISP1
> + bool
> + prompt "rkisp1"
> +
> +config LIBCAMERA_IPA_VIMC
> + bool
> + prompt "vimc"
> +endmenu
> +
> +menu "Pipelines"

So, I missed this in the first version: Why would someone enable (for
example) the ipu3 pipeline but not the ipu3 IPA? In other words, wouldn't
it be easier to have one "Hardware" option each and enable both IPA and
pipeline (or whichever is available)?

Michael

> +
> +config LIBCAMERA_PIPELINE_IPU3
> + bool
> + prompt "ipu3"
> +
> +config 

Re: [ptxdist] [PATCH v2 1/1] libcamera: new package

2022-09-13 Thread Marco Felsch
Hi Matthias,

thanks for working on this, I also have a libcamera package here :) and
want to share a few findings.

On 22-09-11, Matthias Fend wrote:
> libcamera is an open source camera stack and framework for Linux, Android,
> and ChromeOS.
> 
> Signed-off-by: Matthias Fend 
> ---
>  ...t-information-for-version-generation.patch |  29 
>  .../libcamera-2022-08-30-g68683d3811a8/series |   4 +
>  rules/libcamera.in|  90 
>  rules/libcamera.make  | 133 ++
>  4 files changed, 256 insertions(+)
>  create mode 100644 
> patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
>  create mode 100644 patches/libcamera-2022-08-30-g68683d3811a8/series
>  create mode 100644 rules/libcamera.in
>  create mode 100644 rules/libcamera.make
> 
> diff --git 
> a/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
>  
> b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> new file mode 100644
> index 0..3e5c5ce68
> --- /dev/null
> +++ 
> b/patches/libcamera-2022-08-30-g68683d3811a8/0001-do-not-use-git-information-for-version-generation.patch
> @@ -0,0 +1,29 @@
> +From: Matthias Fend 
> +Date: Wed, 31 Aug 2022 16:54:20 +0200
> +Subject: [PATCH] do not use git information for version generation
> +
> +Since libcamera is checked out without a git repo, git version reports the
> +version of the BSP. Since this is obviously wrong, just use the project
> +version.
> +
> +Signed-off-by: Matthias Fend 
> +---
> + meson.build | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 72919102ad55..e333df59388d 100644
> +--- a/meson.build
>  b/meson.build
> +@@ -20,9 +20,8 @@ libcamera_git_version = run_command('utils/gen-version.sh',
> + meson.project_build_root(),
> + meson.project_source_root(),
> + check: false).stdout().strip()
> +-if libcamera_git_version == ''
> +-libcamera_git_version = meson.project_version()
> +-endif
> ++
> ++libcamera_git_version = meson.project_version()
> + 
> + libcamera_version = libcamera_git_version.split('+')[0]
> + 
> diff --git a/patches/libcamera-2022-08-30-g68683d3811a8/series 
> b/patches/libcamera-2022-08-30-g68683d3811a8/series
> new file mode 100644
> index 0..6ca42eafc
> --- /dev/null
> +++ b/patches/libcamera-2022-08-30-g68683d3811a8/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-do-not-use-git-information-for-version-generation.patch
> +# c3a57143ea9764ab95b84a7fb79896f4  - git-ptx-patches magic
> diff --git a/rules/libcamera.in b/rules/libcamera.in
> new file mode 100644
> index 0..0a103fc51
> --- /dev/null
> +++ b/rules/libcamera.in
> @@ -0,0 +1,90 @@
> +## SECTION=multimedia_libs
> +
> +config LIBCAMERA
> + bool
> + prompt "libcamera"
> + select HOST_MESON
> + select HOST_SYSTEM_PYTHON3
> + select HOST_SYSTEM_PYTHON3_JINJA2
> + select HOST_SYSTEM_PYTHON3_PYYAML
> + select HOST_SYSTEM_PYTHON3_PLY
> + select GNUTLS

Please see below about selecting the crypto lib. Than this would be
changed to:

select GNUTLS   if 
LIBCAMERA_IPA_MODULE_SIGN_GNUTLS
select OPENSSL  if 
LIBCAMERA_IPA_MODULE_SIGN_OPENSSL

> + select UDEV_LIBUDEV
> + select LIBYAML

missing select BOOSTif 
LIBCAMERA_PIPELINE_RASPBERRYPI

> + select LIBUNWINDif LIBCAMERA_BACKTRACE
> + select GSTREAMER1   if LIBCAMERA_GSTREAMER
> + select GST_PLUGINS_BASE1if LIBCAMERA_GSTREAMER
> + select LIBEVENT if LIBCAMERA_CAM

missing select LIBDRM   if LIBCAMERA_CAM

> + select QT5  if LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASEif LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASE_GUIif LIBCAMERA_QCAM
> + select QT5_MODULE_QTBASE_WIDGETSif LIBCAMERA_QCAM
> + help
> +   A complex camera support library for Linux, Android, and ChromeOS.
> +
> +if LIBCAMERA

I would provide the user the choice of selecting/enabling the ipa module
signing.

config LIBCAMERA_IPA_MODULE_SIGN
bool
default y
prompt "Enable IPA module signing"
help
  Without IPA module signing, all IPA modules will be isolated in a
  separate process. This adds an unnecessary extra overhead at runtime.

if LIBCAMERA_IPA_MODULE_SIGN

choice
prompt "Crypt provider"
default LIBCAMERA_IPA_MODULE_SIGN_GNUTLS

config LIBCAMERA_IPA_MODULE_SIGN_GNUTLS
bool "gnutls"

config LIBCAMERA_IPA_MODULE_SIGN_OPENSSL