Skip to contentSkip to conversation

package/libcamera: bump version to 96fab38

PATCH New Peter Seiderer 2 participants 5 messages Jun 16, 2020 – Jun 18, 2020

lore
Share & tools
lore
#0 lore raw

v4 cover package/libcamera: bump version to 96fab38

Tested on RPi3/RPi4 with linux-5.4.45-v7l kernel and updated rpi-firmware package, Qt-5.14.2:

First try:

	$ qcam -platform linuxfb -c ov5647
0:00:25.696380706] [241]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '//src/ipa' to the IPA search path
[0:00:25.712675651] [241]  INFO Camera camera_manager.cpp:280 libcamera v0.0.0
[0:00:25.785788355] [243]  INFO IPAProxy ipa_proxy.cpp:190 libcamera is not installed. Loading proxy workers from '//src/libcamera/proxy/worker'
[0:00:25.785931355] [243] ERROR IPAProxy ipa_proxy_linux.cpp:59 Failed to get proxy worker path
[0:00:25.786016077] [243] ERROR IPAManager ipa_manager.cpp:296 Failed to load proxy
[0:00:25.786108077] [243] ERROR RPI raspberrypi.cpp:925 Failed to load a suitable IPA library
Camera ov5647 not found

With the following patch libcamera is forced to believe it is running in a installed environment:

src/libcamera/utils.cpp +5 -2
index d55338f..4ff9dac 100644
@@ -346,15 +346,18 @@ details::StringSplitter split(const std::string &str, const std::string &delim)
  */
 bool isLibcameraInstalled()
 {
+#if 0
 	/*
 	 * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on
 	 * install.
 	 */
 	for (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {
-		if (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)
+		if (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH) {
+			printf("XXXXX - dyn->d_un.d_ptr: %s\n", (char*)dyn->d_un.d_ptr);
 			return false;
+		}
 	}
-
+#endif
 	return true;
 }
 

Maybe this is because of the buildroot local meson patch ([1]), leading to an empty (but not absent) RPATH?

With this patch applied, next try:

	$ qcam -platform linuxfb -c ov5647
[   60.656531] random: crng init done
[0:01:00.797904315] [248]  INFO Camera camera_manager.cpp:280 libcamera v0.0.0
[0:01:01.248904870] [248]  INFO Camera camera.cpp:770 configuring streams: (0) 800x600-0x34325241
[0:01:01.249270722] [249]  INFO RPI raspberrypi.cpp:115 Mode: 2592x1944 fmt BG10 Score: 2284 (best 2284)
[0:01:01.249425945] [249]  INFO RPI raspberrypi.cpp:115 Mode: 1920x1080 fmt BG10 Score: 2066.67 (best 2066.67)
[0:01:01.249534278] [249]  INFO RPI raspberrypi.cpp:115 Mode: 1296x972 fmt BG10 Score: 1717 (best 1717)
[0:01:01.249633315] [249]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt BG10 Score: 2060 (best 1717)
[0:01:01.249731593] [249]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt BA81 Score: 3060 (best 1717)
[0:01:01.249828611] [249]  INFO RPI raspberrypi.cpp:115 Mode: 2592x1944 fmt pBAA Score: 1784 (best 1717)
[0:01:01.249922500] [249]  INFO RPI raspberrypi.cpp:115 Mode: 1920x1080 fmt pBAA Score: 1566.67 (best 1566.67)
[0:01:01.250069815] [249]  INFO RPI raspberrypi.cpp:115 Mode: 1296x972 fmt pBAA Score: 1217 (best 1217)
[0:01:01.250169482] [249]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt pBAA Score: 1560 (best 1217)
[0:01:01.250298593] [249]  INFO RPI raspberrypi.cpp:619 Sensor: ov5647 - Selected mode: 1296x972-pBAA
Zero-copy enabled
[0:01:01.319715019] [249] FATAL default raspberrypi.cpp:791 assertion "data->staggeredCtrl_" failed
Backtrace:
/usr/lib/libcamera.so(_ZN9libcamera18PipelineHandlerRPi5startEPNS_6CameraE+0x164) [0xb6eb432c]
/usr/lib/libcamera.so(_ZN9libcamera15BoundMethodArgsIiJPNS_6CameraEEE10invokePackEPNS_19BoundMethodPackBaseE+0x18) [0xb6e7f670]
/usr/lib/libcamera.so(_ZN9libcamera6Object7messageEPNS_7MessageE+0x1c) [0xb6e9eafc]
/usr/lib/libcamera.so(_ZN9libcamera6Thread16dispatchMessagesEv+0xfc) [0xb6ea3f44]
/usr/lib/libcamera.so(_ZN9libcamera19EventDispatcherPoll13processEventsEv+0x14) [0xb6e92d08]
/usr/lib/libcamera.so(_ZN9libcamera6Thread4execEv+0x54) [0xb6ea3e0c]
/usr/lib/libcamera.so(_ZN9libcamera13CameraManager7Private3runEv+0xa8) [0xb6e80f44]
/usr/lib/libstdc++.so.6(+0x9bddc) [0xb6104ddc]
Aborted

Running with LIBCAMERA_LOG_LEVELS=DEBUG gives:

[...]
[0:02:18.061949510] [251] DEBUG IPAModule ipa_module.cpp:330 ipa_rpi.so: IPA module /usr/lib/libcamera/ipa_rpi.so is signed [...]
[0:02:18.125804232] [252] DEBUG IPAManager ipa_manager.cpp:316 IPA module /usr/lib/libcamera/ipa_rpi.so signature is not valid [0:02:18.126069417] [252] DEBUG IPAProxy ipa_proxy_linux.cpp:50 initializing dummy proxy: loading IPA from /usr/lib/libcamera/ipa_rpi.so [...]

This can be avoided with the following patch/hack (disable signature check):

src/libcamera/ipa_manager.cpp +4 -0
index 505cf61..3d64898 100644
@@ -301,6 +301,9 @@ std::unique_ptr<IPAProxy> IPAManager::createIPA(PipelineHandler *pipe,
 
 bool IPAManager::isSignatureValid(IPAModule *ipa) const
 {
+#if 1
+	return true;
+#else
 #if HAVE_IPA_PUBKEY
 	File file{ ipa->path() };
 	if (!file.open(File::ReadOnly))
@@ -320,6 +323,7 @@ bool IPAManager::isSignatureValid(IPAModule *ipa) const
 #else
 	return false;
 #endif
+#endif
 }
 
 } /* namespace libcamera */

Maybe related to the buildroot finalize and/or sanitizing RPATH in target tree step (and/or strip after install with BR2_ENABLE_DEBUG=y/BR2_STRIP_strip=y enabled)?

Final run (success):

	$ qcam -platform linuxfb -c ov5647
[0:06:20.379361328] [265]  INFO Camera camera_manager.cpp:280 libcamera v0.0.0
[0:06:20.490928995] [265]  INFO Camera camera.cpp:770 configuring streams: (0) 800x600-0x34325241
[0:06:20.491250069] [266]  INFO RPI raspberrypi.cpp:115 Mode: 2592x1944 fmt BG10 Score: 2284 (best 2284)
[0:06:20.491406162] [266]  INFO RPI raspberrypi.cpp:115 Mode: 1920x1080 fmt BG10 Score: 2066.67 (best 2066.67)
[0:06:20.491511180] [266]  INFO RPI raspberrypi.cpp:115 Mode: 1296x972 fmt BG10 Score: 1717 (best 1717)
[0:06:20.491607439] [266]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt BG10 Score: 2060 (best 1717)
[0:06:20.491704680] [266]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt BA81 Score: 3060 (best 1717)
[0:06:20.491800495] [266]  INFO RPI raspberrypi.cpp:115 Mode: 2592x1944 fmt pBAA Score: 1784 (best 1717)
[0:06:20.491893162] [266]  INFO RPI raspberrypi.cpp:115 Mode: 1920x1080 fmt pBAA Score: 1566.67 (best 1566.67)
[0:06:20.491988439] [266]  INFO RPI raspberrypi.cpp:115 Mode: 1296x972 fmt pBAA Score: 1217 (best 1217)
[0:06:20.492080773] [266]  INFO RPI raspberrypi.cpp:115 Mode: 640x480 fmt pBAA Score: 1560 (best 1217)
[0:06:20.492207291] [266]  INFO RPI raspberrypi.cpp:619 Sensor: ov5647 - Selected mode: 1296x972-pBAA
[0:06:20.494765217] [266]  INFO RPI_S_W staggered_ctrl.cpp:36 Init ctrl 0x00980911 with delay 2
[0:06:20.494887717] [266]  INFO RPI_S_W staggered_ctrl.cpp:36 Init ctrl 0x009e0903 with delay 2
[0:06:20.494973365] [266] ERROR V4L2 v4l2_device.cpp:287 /dev/video0[cap]: Control 0x00980915 not found
Zero-copy enabled
[  380.670935] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020700000
[  380.680776] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020800000
[  380.690605] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020900000
[  380.700408] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020a00000
[  380.712664] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001ed50000
[  380.722464] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001ed54000
[  380.732327] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001ed58000
[  380.742145] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001ed5c000
[  380.754943] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001f700000
[  380.767326] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001ff00000
[0:06:20.782425402] [266]  INFO RPI raspb[  380.790404] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020100000
errypi.cpp:1461 Dropping frame at the request of the IPA
[0:06:20.807450587] [266]  INFO R[  380.815266] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020300000
PI raspberrypi.cpp:1461 Dropping frame at the request of the IPA
[0:06:20.833070754] [266]  INFO RPI raspb[  380.841383] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x0000000020500000
errypi.cpp:1461 Dropping frame at the request of the IPA
[0:06:20.858214865] [266]  INFO RPI raspberrypi.cpp:1461 Dropping frame at the request of the IPA
[0:06:20.871768532] [266]  INFO RPI raspberrypi.cpp:1461 Dropping frame at the request of the IPA
[0:06:20.884721476] [266]  INFO RPI raspberrypi.cpp:1461 Dropping frame at the request of the IPA
seq: 000006 bytesused: 1920000 timestamp: 380874300000 fps: 0.00
[  380.939540] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001f900000
[  380.974173] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001fb00000
[  381.008864] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x000000001fd00000
seq: 000007 bytesused: 1920000 timestamp: 380908989000 fps: 28.83
seq: 000008 bytesused: 1920000 timestamp: 380943681000 fps: 28.83
seq: 000009 bytesused: 1920000 timestamp: 380978370000 fps: 28.83
seq: 000010 bytesused: 1920000 timestamp: 381013062000 fps: 28.83
seq: 000011 bytesused: 1920000 timestamp: 381047752000 fps: 28.83
seq: 000012 bytesused: 1920000 timestamp: 381082441000 fps: 28.83
seq: 000013 bytesused: 1920000 timestamp: 381117130000 fps: 28.83
seq: 000014 bytesused: 1920000 timestamp: 381151822000 fps: 28.83
seq: 000015 bytesused: 1920000 timestamp: 381186512000 fps: 28.83
seq: 000016 bytesused: 1920000 timestamp: 381221200000 fps: 28.83
seq: 000017 bytesused: 1920000 timestamp: 381255891000 fps: 28.83

Regards,
Peter

[1] https://git.buildroot.net/buildroot/tree/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch

Notes:
- customized config.txt (RPi4):

gpu_mem=128
dtoverlay=miniuart-bt
dtoverlay=ov5647
core_freq_min=250
dtoverlay=vc4-fkms-v3d

Peter Seiderer (2):
package/libcamera: bump version to 96fab38 package/libcamera: add v4l2 compatibility layer option

 package/libcamera/Config.in      | 63 +++++++++++++++++++++++++---
 package/libcamera/libcamera.hash | 15 +++++--
 package/libcamera/libcamera.mk   | 72 +++++++++++++++++++++++++++++---
 3 files changed, 135 insertions(+), 15 deletions(-)
Signature · 1 line
2.27.0
#1 lore raw

PATCH v4 1/2 package/libcamera: bump version to 96fab38

- add host dependencies: openssl, pkgconf, python3-pyyaml
- add dependencies: gnutls
- changed from mandatory to optional dependency: udev
- add dedicated pipeline configure options
- add optional dependencies: boost, gstreamer1/gst1-plugins-base, qt5base, tiff
- update license info (Apache-2.0 omitted - applies only for android code)

---
Changes v1 -> v2:
- re-add LIBCAMERA_LICENSE_FILES list (Kieran Bingham)
- fix typo in commit message (Kieran Bingham)
- add Reviewed-by from Kieran Bingham

Changes v2 -> v3:
- add dedicated pipeline configure options to reduce default dependencies (boost)
- fix another typo in commit message (Kieran Bingham)
- bump version to 96fab38

Changes v3 -> v4:
- use menuconfig
- force at least one default pipeline (uvcvideo)
- remove repetitive libcamera from options/help text
- remove spurios empty line
- add reviewd-by from Kieran

---
 package/libcamera/Config.in      | 58 ++++++++++++++++++++++++---
 package/libcamera/libcamera.hash | 15 +++++--
 package/libcamera/libcamera.mk   | 67 +++++++++++++++++++++++++++++---
 3 files changed, 125 insertions(+), 15 deletions(-)
package/libcamera/Config.in +52 -6
index 0b3540a657..56ca5aaf18 100644
@@ -1,10 +1,12 @@
-config BR2_PACKAGE_LIBCAMERA
+menuconfig BR2_PACKAGE_LIBCAMERA
 	bool "libcamera"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# C++11 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14
+	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_USE_WCHAR # gnutls
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO if !BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
 	help
 	  libcamera provides a software stack to support
 	  complex devices that need heavy hardware image
@@ -12,6 +14,50 @@ config BR2_PACKAGE_LIBCAMERA
 
 	  http://www.libcamera.org/
 
-comment "libcamera needs udev and a toolchain w/ C++, threads, gcc >= 5"
+if BR2_PACKAGE_LIBCAMERA
+
+config BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	bool
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_IPU3
+	bool "ipu3 pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Intel IPU3.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI
+	bool "raspberrypi pipeline"
+	depends on BR2_USE_WCHAR # boost (already enforced for gnutls)
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Raspberry Pi devices.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1
+	bool "rkisp1 pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Rockchip ISP1.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE
+	bool "simple pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for simple pipelines.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO
+	bool "uvcvideo pipeline"
+	help
+	  Pipeline for uvcvideo devices.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC
+	bool "vimc pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for the vimc device.
+
+endif # BR2_PACKAGE_LIBCAMERA
+
+comment "libcamera needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 5"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_PACKAGE_HAS_UDEV
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_5 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/libcamera/libcamera.hash +12 -3
index 6f721d87ee..907764de63 100644
@@ -1,3 +1,12 @@
-sha256 cbaa7e06059717f71b57f9c20135c86d5f121d9aab10bfc20513ba5d04478756  libcamera-448393f77ec9e37cb807e8e8d35c1a4877d253d4.tar.gz
-sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  licenses/gnu-gpl-2.0.txt
-sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c  licenses/gnu-lgpl-2.1.txt
+sha256  6995be9d707ba3bcbe7a79bad894484561ee686f68b6523943ada7c0f6607e86  libcamera-96fab38e02792a109c0d35ca2154e95a7b4c8fcb.tar.gz
+
+# license files
+sha256  fd38b2c053c0cce46d9c5ef3545a6e34d157a240ba99c9b8dca5d37a8147da6c  LICENSES/BSD-2-Clause.txt
+sha256  e11af671c491efac2f94c1d752bea92f4308ca2450c7d11e582e4b48c40e4de1  LICENSES/BSD-3-Clause.txt
+sha256  6a573fb2f9082662978cf21fb153096df0a1981deaea7dbc10a11046fe005d9f  LICENSES/CC0-1.0.txt
+sha256  ec3732087acf8c52429a020d6bba362ff578705bdb53365a21744485ec15b0e6  LICENSES/CC-BY-SA-4.0.txt
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSES/GPL-2.0-only.txt
+sha256  606aa26338f69ce178f1cbc648b7574aec4b5bbaeb20f4df36ff49010cb8fbbd  LICENSES/GPL-2.0-or-later.txt
+sha256  1ccf09bf2f598308df4bed9cd8e9657dc5cd0973d2800318f2e241486e2edf3f  LICENSES/LGPL-2.1-or-later.txt
+sha256  3f9e477523febab58de8b716ccfbcf02e6ef1c8e7728953905e8558637abe2a9  LICENSES/Linux-syscall-note.txt
+sha256  8f25018489d6fe0dec34a352314c38dc146247b7de65735790f4398a92afa84b  LICENSES/MIT.txt
package/libcamera/libcamera.mk +61 -6

75 lines not on this page · raw message

Signature · 1 line
2.27.0
#2 lore raw

PATCH v4 1/2 package/libcamera: bump version to 96fab38

Peter, All,

On 2020-06-16 20:59 +0200, Peter Seiderer spake thusly:

Quoted 10 lines

- add host dependencies: openssl, pkgconf, python3-pyyaml
- add dependencies: gnutls
- changed from mandatory to optional dependency: udev
- add dedicated pipeline configure options
- add optional dependencies: boost, gstreamer1/gst1-plugins-base, qt5base, tiff
- update license info (Apache-2.0 omitted - applies only for android code)

Applied to master, after simplifying the qt5 widgets and qt5 linguist conditions. Thanks!

Regards,
Yann E. MORIN.

Quoted 201 lines

---
Changes v1 -> v2:
- re-add LIBCAMERA_LICENSE_FILES list (Kieran Bingham)
- fix typo in commit message (Kieran Bingham)
- add Reviewed-by from Kieran Bingham

Changes v2 -> v3:
- add dedicated pipeline configure options to reduce default dependencies (boost)
- fix another typo in commit message (Kieran Bingham)
- bump version to 96fab38

Changes v3 -> v4:
- use menuconfig
- force at least one default pipeline (uvcvideo)
- remove repetitive libcamera from options/help text
- remove spurios empty line
- add reviewd-by from Kieran

---
 package/libcamera/Config.in      | 58 ++++++++++++++++++++++++---
 package/libcamera/libcamera.hash | 15 +++++--
 package/libcamera/libcamera.mk   | 67 +++++++++++++++++++++++++++++---
 3 files changed, 125 insertions(+), 15 deletions(-)
package/libcamera/Config.in +52 -6
index 0b3540a657..56ca5aaf18 100644
@@ -1,10 +1,12 @@
-config BR2_PACKAGE_LIBCAMERA
+menuconfig BR2_PACKAGE_LIBCAMERA
 	bool "libcamera"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# C++11 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14
+	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_USE_WCHAR # gnutls
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO if !BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
 	help
 	  libcamera provides a software stack to support
 	  complex devices that need heavy hardware image
@@ -12,6 +14,50 @@ config BR2_PACKAGE_LIBCAMERA
 
 	  http://www.libcamera.org/
 
-comment "libcamera needs udev and a toolchain w/ C++, threads, gcc >= 5"
+if BR2_PACKAGE_LIBCAMERA
+
+config BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	bool
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_IPU3
+	bool "ipu3 pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Intel IPU3.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI
+	bool "raspberrypi pipeline"
+	depends on BR2_USE_WCHAR # boost (already enforced for gnutls)
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Raspberry Pi devices.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1
+	bool "rkisp1 pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for Rockchip ISP1.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE
+	bool "simple pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for simple pipelines.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO
+	bool "uvcvideo pipeline"
+	help
+	  Pipeline for uvcvideo devices.
+
+config BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC
+	bool "vimc pipeline"
+	select BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
+	help
+	  Pipeline for the vimc device.
+
+endif # BR2_PACKAGE_LIBCAMERA
+
+comment "libcamera needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 5"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_PACKAGE_HAS_UDEV
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_5 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/libcamera/libcamera.hash +12 -3
index 6f721d87ee..907764de63 100644
@@ -1,3 +1,12 @@
-sha256 cbaa7e06059717f71b57f9c20135c86d5f121d9aab10bfc20513ba5d04478756  libcamera-448393f77ec9e37cb807e8e8d35c1a4877d253d4.tar.gz
-sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  licenses/gnu-gpl-2.0.txt
-sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c  licenses/gnu-lgpl-2.1.txt
+sha256  6995be9d707ba3bcbe7a79bad894484561ee686f68b6523943ada7c0f6607e86  libcamera-96fab38e02792a109c0d35ca2154e95a7b4c8fcb.tar.gz
+
+# license files
+sha256  fd38b2c053c0cce46d9c5ef3545a6e34d157a240ba99c9b8dca5d37a8147da6c  LICENSES/BSD-2-Clause.txt
+sha256  e11af671c491efac2f94c1d752bea92f4308ca2450c7d11e582e4b48c40e4de1  LICENSES/BSD-3-Clause.txt
+sha256  6a573fb2f9082662978cf21fb153096df0a1981deaea7dbc10a11046fe005d9f  LICENSES/CC0-1.0.txt
+sha256  ec3732087acf8c52429a020d6bba362ff578705bdb53365a21744485ec15b0e6  LICENSES/CC-BY-SA-4.0.txt
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSES/GPL-2.0-only.txt
+sha256  606aa26338f69ce178f1cbc648b7574aec4b5bbaeb20f4df36ff49010cb8fbbd  LICENSES/GPL-2.0-or-later.txt
+sha256  1ccf09bf2f598308df4bed9cd8e9657dc5cd0973d2800318f2e241486e2edf3f  LICENSES/LGPL-2.1-or-later.txt
+sha256  3f9e477523febab58de8b716ccfbcf02e6ef1c8e7728953905e8558637abe2a9  LICENSES/Linux-syscall-note.txt
+sha256  8f25018489d6fe0dec34a352314c38dc146247b7de65735790f4398a92afa84b  LICENSES/MIT.txt
package/libcamera/libcamera.mk +61 -6
index d209a38df3..c7513d2e68 100644
@@ -5,14 +5,69 @@
 ################################################################################
 
 LIBCAMERA_SITE = https://git.linuxtv.org/libcamera.git
-LIBCAMERA_VERSION = 448393f77ec9e37cb807e8e8d35c1a4877d253d4
+LIBCAMERA_VERSION = 96fab38e02792a109c0d35ca2154e95a7b4c8fcb
 LIBCAMERA_SITE_METHOD = git
-LIBCAMERA_DEPENDENCIES = udev
-LIBCAMERA_CONF_OPTS = -Dtest=false -Ddocumentation=false
+LIBCAMERA_DEPENDENCIES = \
+	host-openssl \
+	host-pkgconf \
+	host-python3-pyyaml \
+	gnutls
+LIBCAMERA_CONF_OPTS = \
+	-Dandroid=false \
+	-Ddocumentation=false \
+	-Dtest=false \
+	-Dv4l2=false
 LIBCAMERA_INSTALL_STAGING = yes
-LIBCAMERA_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (utils)
+LIBCAMERA_LICENSE = \
+	LGPL-2.1+ (library), \
+	GPL-2.0+ (utils), \
+	MIT (qcam/assets/feathericons), \
+	BSD-2-Clause (raspberrypi), \
+	GPL-2.0 with Linux-syscall-note or BSD-3-Clause (linux kernel headers), \
+	CC0-1.0 (meson build system), \
+	CC-BY-SA-4.0 (doc)
 LIBCAMERA_LICENSE_FILES = \
-	licenses/gnu-gpl-2.0.txt \
-	licenses/gnu-lgpl-2.1.txt
+	LICENSES/LGPL-2.1-or-later.txt \
+	LICENSES/GPL-2.0-or-later.txt \
+	LICENSES/MIT.txt \
+	LICENSES/BSD-2-Clause.txt \
+	LICENSES/GPL-2.0-only.txt \
+	LICENSES/Linux-syscall-note.txt \
+	LICENSES/BSD-3-Clause.txt \
+	LICENSES/CC0-1.0.txt \
+	LICENSES/CC-BY-SA-4.0.txt
+
+LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_IPU3) += ipu3
+ifeq ($(BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI),y)
+LIBCAMERA_PIPELINES-y += raspberrypi
+LIBCAMERA_DEPENDENCIES += boost
+endif
+LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1) += rkisp1
+LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE) += simple
+LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO) += uvcvideo
+LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC) += vimc
+
+LIBCAMERA_CONF_OPTS += -Dpipelines=$(subst $(space),$(comma),$(LIBCAMERA_PIPELINES-y))
+
+# gstreamer-video-1.0, gstreamer-allocators-1.0
+ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy)
+LIBCAMERA_CONF_OPTS += -Dgstreamer=enabled
+LIBCAMERA_DEPENDENCIES += gstreamer1 gst1-plugins-base
+endif
+
+ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
+LIBCAMERA_DEPENDENCIES += qt5base
+ifeq ($(BR2_PACKAGE_QT5TOOLS)$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),yy)
+LIBCAMERA_DEPENDENCIES += qt5tools
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_TIFF),y)
+LIBCAMERA_DEPENDENCIES += tiff
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+LIBCAMERA_DEPENDENCIES += udev
+endif
 
 $(eval $(meson-package))
Signature · 1 line
2.27.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v4 2/2 package/libcamera: add v4l2 compatibility layer option

In reply to Peter Seiderer

---
Changes v3 -> v4:
- new patch

---
 package/libcamera/Config.in    | 5 +++++
 package/libcamera/libcamera.mk | 9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
package/libcamera/Config.in +5 -0
index 56ca5aaf18..960d78b82e 100644
@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_LIBCAMERA
 
 if BR2_PACKAGE_LIBCAMERA
 
+config BR2_PACKAGE_LIBCAMERA_V4L2
+	bool "libcamera v4l2 compatibility layer"
+	help
+	  libcamera v4l2 compatibility layer
+
 config BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
 	bool
 
package/libcamera/libcamera.mk +7 -2
index c7513d2e68..1633becf04 100644
@@ -15,8 +15,7 @@ LIBCAMERA_DEPENDENCIES = \
 LIBCAMERA_CONF_OPTS = \
 	-Dandroid=false \
 	-Ddocumentation=false \
-	-Dtest=false \
-	-Dv4l2=false
+	-Dtest=false
 LIBCAMERA_INSTALL_STAGING = yes
 LIBCAMERA_LICENSE = \
 	LGPL-2.1+ (library), \
@@ -37,6 +36,12 @@ LIBCAMERA_LICENSE_FILES = \
 	LICENSES/CC0-1.0.txt \
 	LICENSES/CC-BY-SA-4.0.txt
 
+ifeq ($(BR2_PACKAGE_LIBCAMERA_V4L2),y)
+LIBCAMERA_CONF_OPTS = -Dv4l2=true
+else
+LIBCAMERA_CONF_OPTS = -Dv4l2=false
+endif
+
 LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_IPU3) += ipu3
 ifeq ($(BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI),y)
 LIBCAMERA_PIPELINES-y += raspberrypi
Signature · 1 line
2.27.0
#4 lore raw

PATCH v4 2/2 package/libcamera: add v4l2 compatibility layer option

Peter, All,

On 2020-06-16 20:59 +0200, Peter Seiderer spake thusly:

Quoted 1 line

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 54 lines

---
Changes v3 -> v4:
- new patch

---
 package/libcamera/Config.in    | 5 +++++
 package/libcamera/libcamera.mk | 9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
package/libcamera/Config.in +5 -0
index 56ca5aaf18..960d78b82e 100644
@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_LIBCAMERA
 
 if BR2_PACKAGE_LIBCAMERA
 
+config BR2_PACKAGE_LIBCAMERA_V4L2
+	bool "libcamera v4l2 compatibility layer"
+	help
+	  libcamera v4l2 compatibility layer
+
 config BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
 	bool
 
package/libcamera/libcamera.mk +7 -2
index c7513d2e68..1633becf04 100644
@@ -15,8 +15,7 @@ LIBCAMERA_DEPENDENCIES = \
 LIBCAMERA_CONF_OPTS = \
 	-Dandroid=false \
 	-Ddocumentation=false \
-	-Dtest=false \
-	-Dv4l2=false
+	-Dtest=false
 LIBCAMERA_INSTALL_STAGING = yes
 LIBCAMERA_LICENSE = \
 	LGPL-2.1+ (library), \
@@ -37,6 +36,12 @@ LIBCAMERA_LICENSE_FILES = \
 	LICENSES/CC0-1.0.txt \
 	LICENSES/CC-BY-SA-4.0.txt
 
+ifeq ($(BR2_PACKAGE_LIBCAMERA_V4L2),y)
+LIBCAMERA_CONF_OPTS = -Dv4l2=true
+else
+LIBCAMERA_CONF_OPTS = -Dv4l2=false
+endif
+
 LIBCAMERA_PIPELINES-$(BR2_PACKAGE_LIBCAMERA_PIPELINE_IPU3) += ipu3
 ifeq ($(BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI),y)
 LIBCAMERA_PIPELINES-y += raspberrypi
Signature · 1 line
2.27.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'