Skip to contentSkip to conversation

package/libcamera-apps: new package

PATCH Superseded Peter Seiderer 2 participants 8 messages Jan 29, 2021 – Feb 8, 2021

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

cover package/libcamera-apps: new package

Tested on RPi4 with the following defconfig:

BR2_aarch64=y
BR2_cortex_a72=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_GLIBC_UTILS=y
BR2_BINUTILS_VERSION_2_35_X=y
BR2_GCC_VERSION_10_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_HOST_GDB=y
BR2_GDB_VERSION_10=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_DHCP="eth0"
BR2_GENERATE_LOCALE="en_US"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,967d45b29ca2902f031b867809d72e3b3d623e7a)/linux-967d45b29ca2902f031b867809d72e3b3d623e7a.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI=y
BR2_PACKAGE_LIBCAMERA_APPS=y
BR2_PACKAGE_DROPBEAR=y
BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y

and the customized config.txt:

dtoverlay=miniuart-bt
dtoverlay=vc4-kms-v3d-pi4
dtoverlay=imx219

Still needs a patch to disable the signature check (see [1]), tried as alternative a late signing via _TARGET_FINALIZE_HOOKS:

define LIBCAMERA_IPA_SIGN

	$(BUILD_DIR)/libcamera-$(LIBCAMERA_VERSION)/src/ipa/ipa-sign-install.sh \
		$(BUILD_DIR)/libcamera-$(LIBCAMERA_VERSION)/build/src/ipa-priv-key.pem \
		$(TARGET_DIR)/usr/lib/libcamera/ipa_*.so

endef
LIBCAMERA_TARGET_FINALIZE_HOOKS += LIBCAMERA_IPA_SIGN

The signing runs while finalize target directory, but before the strip calls...

With patch applied the following commands run with expected output:

	$ libcamera-jpeg -o still-image.jpg
	$ libcamera-hello --verbose --fullscreen --timeout 300000

Libcamera-apps patches suggested upstream (see [2])

Regards,
Peter

[1] http://lists.buildroot.org/pipermail/buildroot/2020-June/284963.html
[2] https://github.com/raspberrypi/libcamera-apps/pull/1

Peter Seiderer (2):
package/libcamera: bump version to ab72e66
package/libcamera-apps: new package

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...afe-host-include-path-for-libdrm-use.patch | 29 ++++++++++
 ...unrecognized-gcc-command-line-option.patch | 32 ++++++++++
 ...ra_vid-fix-getline-call-needs-size_t.patch | 37 ++++++++++++
 ..._still-fix-getline-call-needs-size_t.patch | 35 +++++++++++
 ...-libcamera_app-fix-int64_t-constants.patch | 38 ++++++++++++
 ...006-cmake-fix-linking-with-exif-jpeg.patch | 47 +++++++++++++++
 .../0007-cmake-add-install-target.patch       | 24 ++++++++
 ...e-no-need-to-link-against-ipa_rpi.so.patch | 58 +++++++++++++++++++
 package/libcamera-apps/Config.in              | 33 +++++++++++
 package/libcamera-apps/libcamera-apps.hash    |  2 +
 package/libcamera-apps/libcamera-apps.mk      | 24 ++++++++
 package/libcamera/libcamera.hash              |  2 +-
 package/libcamera/libcamera.mk                |  2 +-
 15 files changed, 363 insertions(+), 2 deletions(-)
 create mode 100644 package/libcamera-apps/0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch
 create mode 100644 package/libcamera-apps/0002-cmake-remove-unrecognized-gcc-command-line-option.patch
 create mode 100644 package/libcamera-apps/0003-libcamera_vid-fix-getline-call-needs-size_t.patch
 create mode 100644 package/libcamera-apps/0004-libcamera_still-fix-getline-call-needs-size_t.patch
 create mode 100644 package/libcamera-apps/0005-libcamera_app-fix-int64_t-constants.patch
 create mode 100644 package/libcamera-apps/0006-cmake-fix-linking-with-exif-jpeg.patch
 create mode 100644 package/libcamera-apps/0007-cmake-add-install-target.patch
 create mode 100644 package/libcamera-apps/0008-cmake-no-need-to-link-against-ipa_rpi.so.patch
 create mode 100644 package/libcamera-apps/Config.in
 create mode 100644 package/libcamera-apps/libcamera-apps.hash
 create mode 100644 package/libcamera-apps/libcamera-apps.mk
Signature · 1 line
2.30.0
#1 lore raw

PATCH 1/2 package/libcamera: bump version to ab72e66

---
 package/libcamera/libcamera.hash | 2 +-
 package/libcamera/libcamera.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/libcamera/libcamera.hash +1 -1
index 4a2d63e8a2..e2131f01ea 100644
@@ -1,4 +1,4 @@
-sha256  9e1eb5ac366eac6bc35f3600f9f5176723cb4af14b75ab23e196450bb28eeb67  libcamera-de5d03673c41f5f117d03c23495de5620fd6f42e-br1.tar.gz
+sha256  e9c02a370a15188163f247210cdcba4427d5bcf7b681c7fea5cb1dde23f71a15  libcamera-ab72e6641c56e876f91edee57a8969982a3ab9b7-br1.tar.gz
 
 # license files
 sha256  fd38b2c053c0cce46d9c5ef3545a6e34d157a240ba99c9b8dca5d37a8147da6c  LICENSES/BSD-2-Clause.txt
package/libcamera/libcamera.mk +1 -1
index ae074c2893..391dea7564 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 LIBCAMERA_SITE = https://git.linuxtv.org/libcamera.git
-LIBCAMERA_VERSION = de5d03673c41f5f117d03c23495de5620fd6f42e
+LIBCAMERA_VERSION = ab72e6641c56e876f91edee57a8969982a3ab9b7
 LIBCAMERA_SITE_METHOD = git
 LIBCAMERA_DEPENDENCIES = \
 	host-openssl \
Signature · 1 line
2.30.0
#2 lore raw

PATCH 1/2 package/libcamera: bump version to ab72e66

Quoted 5 lines · On Sat, 30 Jan 2021 00:04:17 +0100 Peter Seiderer <[email protected]> wrote:
---
 package/libcamera/libcamera.hash | 2 +-
 package/libcamera/libcamera.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/2 package/libcamera-apps: new package

In reply to Peter Seiderer
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...afe-host-include-path-for-libdrm-use.patch | 29 ++++++++++
 ...unrecognized-gcc-command-line-option.patch | 32 ++++++++++
 ...ra_vid-fix-getline-call-needs-size_t.patch | 37 ++++++++++++
 ..._still-fix-getline-call-needs-size_t.patch | 35 +++++++++++
 ...-libcamera_app-fix-int64_t-constants.patch | 38 ++++++++++++
 ...006-cmake-fix-linking-with-exif-jpeg.patch | 47 +++++++++++++++
 .../0007-cmake-add-install-target.patch       | 24 ++++++++
 ...e-no-need-to-link-against-ipa_rpi.so.patch | 58 +++++++++++++++++++
 package/libcamera-apps/Config.in              | 33 +++++++++++
 package/libcamera-apps/libcamera-apps.hash    |  2 +
 package/libcamera-apps/libcamera-apps.mk      | 24 ++++++++
 13 files changed, 361 insertions(+)
 create mode 100644 package/libcamera-apps/0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch
 create mode 100644 package/libcamera-apps/0002-cmake-remove-unrecognized-gcc-command-line-option.patch
 create mode 100644 package/libcamera-apps/0003-libcamera_vid-fix-getline-call-needs-size_t.patch
 create mode 100644 package/libcamera-apps/0004-libcamera_still-fix-getline-call-needs-size_t.patch
 create mode 100644 package/libcamera-apps/0005-libcamera_app-fix-int64_t-constants.patch
 create mode 100644 package/libcamera-apps/0006-cmake-fix-linking-with-exif-jpeg.patch
 create mode 100644 package/libcamera-apps/0007-cmake-add-install-target.patch
 create mode 100644 package/libcamera-apps/0008-cmake-no-need-to-link-against-ipa_rpi.so.patch
 create mode 100644 package/libcamera-apps/Config.in
 create mode 100644 package/libcamera-apps/libcamera-apps.hash
 create mode 100644 package/libcamera-apps/libcamera-apps.mk
DEVELOPERS +1 -0
index c750105623..776f4083dd 100644
@@ -2098,6 +2098,7 @@ F:	package/gstreamer1/gst1-devtools/
 F:	package/gstreamer1/gst1-interpipe/
 F:	package/gstreamer1/gstreamer1-editing-services/
 F:	package/iwd/
+F:	package/libcamera-apps/
 F:	package/libevdev/
 F:	package/libuev/
 F:	package/log4cplus/
package/Config.in +1 -0
index 06dfc32cc6..5637e39568 100644
@@ -1673,6 +1673,7 @@ menu "Multimedia"
 	source "package/libbdplus/Config.in"
 	source "package/libbluray/Config.in"
 	source "package/libcamera/Config.in"
+	source "package/libcamera-apps/Config.in"
 	source "package/libdcadec/Config.in"
 	source "package/libdvbcsa/Config.in"
 	source "package/libdvbpsi/Config.in"
package/libcamera-apps/0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch new file +29 -0
new file mode 100644
index 0000000000..a9f534d573
@@ -0,0 +1,29 @@
+From 3a4fb5754aee7b1e0d1555e671d5c1de867b9b3e Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Wed, 27 Jan 2021 20:13:17 +0100
+Subject: [PATCH] cmake: remove unsafe host include path for libdrm (use
+ pkgconfig instead)
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 85d2b5d..c02f200 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,8 +25,9 @@ project(libcamera-still)
+ 
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(CAMERA REQUIRED camera)
++pkg_check_modules(LIBDRM REQUIRED libdrm)
+ 
+-include_directories(. "${CAMERA_INCLUDE_DIRS}" /usr/include/libdrm)
++include_directories(. "${CAMERA_INCLUDE_DIRS}" "${LIBDRM_INCLUDE_DIRS}")
+ 
+ find_package( Boost REQUIRED COMPONENTS program_options )
+ 
+-- 
+2.30.0
+
package/libcamera-apps/0002-cmake-remove-unrecognized-gcc-command-line-option.patch new file +32 -0
new file mode 100644
index 0000000000..45c1c14f0b
@@ -0,0 +1,32 @@
+From d44000554d524bd3aff70362e8dcb568d79b34af Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Wed, 27 Jan 2021 22:35:03 +0100
+Subject: [PATCH] cmake: remove unrecognized gcc command-line option
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+  aarch64-buildroot-linux-gnu-g++.br_real: error: unrecognized command-line option ?-mfpu=neon-fp-armv8?
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c02f200..ac481e5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,7 +13,6 @@ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-ne
+ add_definitions(-Wfatal-errors)
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+-add_definitions(-mfpu=neon-fp-armv8 -ftree-vectorize)
+ 
+ project(common)
+ add_library(common output.cpp file_output.cpp net_output.cpp circular_output.cpp egl_preview.cpp drm_preview.cpp jpeg.cpp)
+-- 
+2.30.0
+
package/libcamera-apps/0003-libcamera_vid-fix-getline-call-needs-size_t.patch new file +37 -0
new file mode 100644
index 0000000000..5cbf5b8b30
@@ -0,0 +1,37 @@
+From 6f9970ac5bf0c258498764053a99540b11dffa27 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Wed, 27 Jan 2021 23:06:23 +0100
+Subject: [PATCH] libcamera_vid: fix getline call (needs size_t)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+.../libcamera-apps-custom/libcamera_vid.cpp:39:26: error: cannot convert ?unsigned int*? to ?size_t*? {aka ?long unsigned int*?}
+   39 |    getline(&user_string, &len, stdin);
+      |                          ^~~~
+      |                          |
+      |                          unsigned int*
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ libcamera_vid.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcamera_vid.cpp b/libcamera_vid.cpp
+index 40a5fcb..7b573c0 100644
+--- a/libcamera_vid.cpp
++++ b/libcamera_vid.cpp
+@@ -35,7 +35,7 @@ static int get_key_or_signal(VideoOptions const &options, pollfd p[1])
+ 		if (p[0].revents & POLLIN)
+ 		{
+ 			char *user_string = nullptr;
+-			unsigned int len;
++			size_t len;
+ 			getline(&user_string, &len, stdin);
+ 			key = user_string[0];
+ 		}
+-- 
+2.30.0
+
package/libcamera-apps/0004-libcamera_still-fix-getline-call-needs-size_t.patch new file +35 -0
new file mode 100644
index 0000000000..0ecc880655
@@ -0,0 +1,35 @@
+From 8c87cec99e1cf524f1207f4f855d65dc6b5ae498 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Wed, 27 Jan 2021 23:08:18 +0100
+Subject: [PATCH] libcamera_still: fix getline call (needs size_t)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+.../build/libcamera-apps-custom/libcamera_still.cpp:152:26: error: cannot convert ?unsigned int*? to ?size_t*? {aka ?long unsigned int*?}
+  152 |    getline(&user_string, &len, stdin);
+      |                          ^~~~
+      |                          |
+      |                          unsigned int*
+---
+ libcamera_still.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcamera_still.cpp b/libcamera_still.cpp
+index fb74996..c951669 100644
+--- a/libcamera_still.cpp
++++ b/libcamera_still.cpp
+@@ -148,7 +148,7 @@ static int get_key_or_signal(StillOptions const &options, pollfd p[1])
+ 		if (p[0].revents & POLLIN)
+ 		{
+ 			char *user_string = nullptr;
+-			unsigned int len;
++			size_t len;
+ 			getline(&user_string, &len, stdin);
+ 			key = user_string[0];
+ 		}
+-- 
+2.30.0
+
package/libcamera-apps/0005-libcamera_app-fix-int64_t-constants.patch new file +38 -0
new file mode 100644
index 0000000000..5409f2d92c
@@ -0,0 +1,38 @@
+From 8ce5fb5d7a28fad1e36f28b731b1c828e72e1a26 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Thu, 28 Jan 2021 22:40:22 +0100
+Subject: [PATCH] libcamera_app: fix int64_t constants
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+.../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h: In instantiation of ?void libcamera::ControlList::set(const libcamera::Control<T>&, const std::initializer_list<_Up>&) [with T = libcamera::Span<const long int>; V = long long int]?:
+.../libcamera_app.hpp:331:18:   required from ?void LibcameraApp<OPTIONS>::StartCamera() [with OPTIONS = StillOptions]?
+.../libcamera_jpeg.cpp:35:18:   required from here
+.../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h:399:14: error: no matching function for call to ?libcamera::ControlValue::set<libcamera::Span<const long int, 18446744073709551615> >(libcamera::Span<const long long int, 18446744073709551615>)?
+  399 |   val->set<T>(Span<const typename std::remove_cv_t<V>>{ value.begin(), value.size() });
+      |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ libcamera_app.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcamera_app.hpp b/libcamera_app.hpp
+index 7be0f7a..02b71cb 100644
+--- a/libcamera_app.hpp
++++ b/libcamera_app.hpp
+@@ -328,7 +328,7 @@ public:
+ 		if (!controls_.contains(controls::FrameDurations))
+ 		{
+ 			if (still_stream_)
+-				controls_.set(controls::FrameDurations, { 100LL, 1000000000LL });
++				controls_.set(controls::FrameDurations, { INT64_C(100), INT64_C(1000000000) });
+ 			else if (options.framerate > 0)
+ 			{
+ 				int64_t frame_time = 1000000 / options.framerate; // in us
+-- 
+2.30.0
+
package/libcamera-apps/0006-cmake-fix-linking-with-exif-jpeg.patch new file +47 -0

47 lines not on this page · raw message

package/libcamera-apps/0007-cmake-add-install-target.patch new file +24 -0
new file mode 100644
index 0000000000..3c67506710
@@ -0,0 +1,24 @@
+From 25fb6f16770b3eb9e4d34cff9d463ca1a6668ca9 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Wed, 27 Jan 2021 23:27:53 +0100
+Subject: [PATCH] cmake: add install target
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05c5de3..8d861bb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,3 +68,6 @@ project(libcamera-jpeg)
+ 
+ add_executable(libcamera-jpeg libcamera_jpeg.cpp)
+ target_link_libraries(libcamera-jpeg common "${LIBCAMERA_LIBRARY}" "${IPA_RPI_LIBRARY}" exif jpeg ${Boost_LIBRARIES} pthread "${X11_LIBRARIES}" "${EPOXY_LIBRARY}" "${DRM_LIBRARY}")
++
++install(TARGETS common encoders LIBRARY)
++install(TARGETS libcamera-still libcamera-vid libcamera-hello libcamera-raw libcamera-jpeg RUNTIME)
+-- 
+2.30.0
+
package/libcamera-apps/0008-cmake-no-need-to-link-against-ipa_rpi.so.patch new file +58 -0

58 lines not on this page · raw message

package/libcamera-apps/Config.in new file +33 -0
new file mode 100644
index 0000000000..482e1186a0
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_BOOST
+        select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBCAMERA
+	help
+	  This is a small suite of libcamera-based apps that aim to copy
+	  the functionality of the existing "raspicam" apps.
+
+	  https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+
+#comment "libcamera-apps needs an OpenGL and/or OpenGL EGL backend"
+#	depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +2 -0
new file mode 100644
index 0000000000..089931e5ce
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  bf8589f560796327088e7172cf36942c668a3380f0bd6220238ea2b932e40faa  libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2-br1.tar.gz
package/libcamera-apps/libcamera-apps.mk new file +24 -0
new file mode 100644
index 0000000000..5ab2bf1bd6
@@ -0,0 +1,24 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_SITE = https://github.com/raspberrypi/libcamera-apps.git
+LIBCAMERA_APPS_VERSION = b1ca8997530f1f0290b291a956de359f2d4ce3e2
+LIBCAMERA_APPS_SITE_METHOD = git
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+
+LIBCAMERA_APPS_DEPENDENCIES = \
+	host-pkgconf \
+	boost \
+	jpeg \
+	libcamera \
+	libdrm \
+	libexif \
+	libepoxy \
+	libpng \
+	tiff \
+	xlib_libX11
+
+$(eval $(cmake-package))
Signature · 1 line
2.30.0
#4 lore raw

PATCH 2/2 package/libcamera-apps: new package

Hello Peter,

Quoted 10 lines · On Sat, 30 Jan 2021 00:04:18 +0100 Peter Seiderer <[email protected]> wrote:
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...afe-host-include-path-for-libdrm-use.patch | 29 ++++++++++
 ...unrecognized-gcc-command-line-option.patch | 32 ++++++++++
 ...ra_vid-fix-getline-call-needs-size_t.patch | 37 ++++++++++++
 ..._still-fix-getline-call-needs-size_t.patch | 35 +++++++++++
 ...-libcamera_app-fix-int64_t-constants.patch | 38 ++++++++++++
 ...006-cmake-fix-linking-with-exif-jpeg.patch | 47 +++++++++++++++
 .../0007-cmake-add-install-target.patch       | 24 ++++++++
 ...e-no-need-to-link-against-ipa_rpi.so.patch | 58 +++++++++++++++++++

Loooots of patches. I suppose you submitted them upstream already ?

Quoted 6 lines
package/libcamera-apps/Config.in new file +0 -0
new file mode 100644
index 0000000000..482e1186a0

package/libcamera-apps/Config.in line 10

Quoted 10 lines
package/libcamera-apps/Config.in new file +10 -0
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy

To be honest, I am wondering if we shouldn't do a "depends on BR2_PACKAGE_LIBCAMERA" to simplify this a bit. Indeed, if you want libcamera-apps, most likely you know you should enable libcamera as well.

package/libcamera-apps/Config.in line 11

Quoted 1 line
package/libcamera-apps/Config.in new file +1 -0
+	select BR2_PACKAGE_XLIB_LIBX11

It really only works with X11 ? A new project in 2021 is X11 only ?

package/libcamera-apps/Config.in line 15

Quoted 4 lines
package/libcamera-apps/Config.in new file +4 -0
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_BOOST
+        select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS

Indentation issue.

package/libcamera-apps/Config.in line 20

Quoted 5 lines
package/libcamera-apps/Config.in new file +5 -0
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBCAMERA

Alphabetic ordering is not correct for this long list of selects.

Quoted 11 lines
package/libcamera-apps/libcamera-apps.hash new file +2 -0
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  bf8589f560796327088e7172cf36942c668a3380f0bd6220238ea2b932e40faa  libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2-br1.tar.gz
package/libcamera-apps/libcamera-apps.mk new file +0 -0
new file mode 100644
index 0000000000..5ab2bf1bd6

package/libcamera-apps/libcamera-apps.mk line 8

Quoted 8 lines
package/libcamera-apps/libcamera-apps.mk new file +8 -0
@@ -0,0 +1,24 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_SITE = https://github.com/raspberrypi/libcamera-apps.git
+LIBCAMERA_APPS_VERSION = b1ca8997530f1f0290b291a956de359f2d4ce3e2

Use the github macro ?

package/libcamera-apps/libcamera-apps.mk line 10

Quoted 2 lines
package/libcamera-apps/libcamera-apps.mk new file +2 -0
+LIBCAMERA_APPS_SITE_METHOD = git
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause

No license file ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 2/2 package/libcamera-apps: new package

Hello Thomas,

Quoted 16 lines · Thomas Petazzoni

Hello Peter,

Quoted 10 lines · On Sat, 30 Jan 2021 00:04:18 +0100 Peter Seiderer <[email protected]> wrote:
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...afe-host-include-path-for-libdrm-use.patch | 29 ++++++++++
 ...unrecognized-gcc-command-line-option.patch | 32 ++++++++++
 ...ra_vid-fix-getline-call-needs-size_t.patch | 37 ++++++++++++
 ..._still-fix-getline-call-needs-size_t.patch | 35 +++++++++++
 ...-libcamera_app-fix-int64_t-constants.patch | 38 ++++++++++++
 ...006-cmake-fix-linking-with-exif-jpeg.patch | 47 +++++++++++++++
 .../0007-cmake-add-install-target.patch       | 24 ++++++++
 ...e-no-need-to-link-against-ipa_rpi.so.patch | 58 +++++++++++++++++++
Quoted 1 line

Loooots of patches. I suppose you submitted them upstream already ?

Yes, see [1]...., and more patches to come to fix test-pkg failures...

Quoted 14 lines
Quoted 14 lines
package/libcamera-apps/Config.in new file +7 -0
new file mode 100644
index 0000000000..482e1186a0
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
Quoted 8 lines

package/libcamera-apps/Config.in line 10

Quoted 3 lines
package/libcamera-apps/Config.in new file +3 -0
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy

To be honest, I am wondering if we shouldn't do a "depends on BR2_PACKAGE_LIBCAMERA" to simplify this a bit. Indeed, if you want libcamera-apps, most likely you know you should enable libcamera as well.

The experienced buildroot user will do...., but the average RPi user?

Quoted 4 lines

package/libcamera-apps/Config.in line 11

Quoted 2 lines
package/libcamera-apps/Config.in new file +1 -0
+	select BR2_PACKAGE_XLIB_LIBX11

It really only works with X11 ? A new project in 2021 is X11 only ?

Yes, see [2]:

find_package(X11 REQUIRED)

But maybe time to ask/suggest upstream for an X11 enable/disable option...

Quoted 7 lines

package/libcamera-apps/Config.in line 15

Quoted 5 lines
package/libcamera-apps/Config.in new file +4 -0
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_BOOST
+        select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS

Indentation issue.

Ups, will fix...

Quoted 8 lines

package/libcamera-apps/Config.in line 20

Quoted 6 lines
package/libcamera-apps/Config.in new file +5 -0
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBCAMERA

Alphabetic ordering is not correct for this long list of selects.

Ups, still in the 'developer' ordering taken from the CMakeLists.txt file, will fix on next patch iteration...

Quoted 14 lines
Quoted 14 lines
package/libcamera-apps/libcamera-apps.hash new file +2 -0
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  bf8589f560796327088e7172cf36942c668a3380f0bd6220238ea2b932e40faa  libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2-br1.tar.gz
package/libcamera-apps/libcamera-apps.mk new file +2 -0
new file mode 100644
index 0000000000..5ab2bf1bd6
@@ -0,0 +1,24 @@
+################################################################################
+#
Quoted 8 lines

package/libcamera-apps/libcamera-apps.mk line 8

Quoted 6 lines
package/libcamera-apps/libcamera-apps.mk new file +6 -0
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_SITE = https://github.com/raspberrypi/libcamera-apps.git
+LIBCAMERA_APPS_VERSION = b1ca8997530f1f0290b291a956de359f2d4ce3e2

Use the github macro ?

Yes, will do...

Quoted 5 lines

package/libcamera-apps/libcamera-apps.mk line 10

Quoted 3 lines
package/libcamera-apps/libcamera-apps.mk new file +2 -0
+LIBCAMERA_APPS_SITE_METHOD = git
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause

No license file ?

No (only a hint/link in the README.md file and SPDX license identifiers in the source files), will ask upstream...

Quoted 4 lines

Thanks!

Thomas

Regards,
Peter

[1] https://github.com/raspberrypi/libcamera-apps/pull/1
[2] https://github.com/raspberrypi/libcamera-apps/blob/main/CMakeLists.txt#L39

#6 lore raw

PATCH 2/2 package/libcamera-apps: new package

Hello Peter,

Quoted 3 lines · On Sun, 31 Jan 2021 23:48:44 +0100 Peter Seiderer <[email protected]> wrote:
Quoted 1 line

Loooots of patches. I suppose you submitted them upstream already ?

Yes, see [1]...., and more patches to come to fix test-pkg failures...

Great!

Quoted 6 lines
Quoted 4 lines

To be honest, I am wondering if we shouldn't do a "depends on BR2_PACKAGE_LIBCAMERA" to simplify this a bit. Indeed, if you want libcamera-apps, most likely you know you should enable libcamera as well.

The experienced buildroot user will do...., but the average RPi user?

Ah, but I now realize this libcamera-apps stuff is from the raspberrypi project, not from the libcamera project.

Fair enough, my comment was not a very strong one, so I'm fine with a select of libcamera + propagation of dependencies, as you did.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 2/2 package/libcamera-apps: new package

In reply to Peter Seiderer

Hello Thomas,

Quoted 54 lines · Peter Seiderer

Hello Thomas,

Quoted 16 lines · Thomas Petazzoni

Hello Peter,

Quoted 10 lines · On Sat, 30 Jan 2021 00:04:18 +0100 Peter Seiderer <[email protected]> wrote:
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...afe-host-include-path-for-libdrm-use.patch | 29 ++++++++++
 ...unrecognized-gcc-command-line-option.patch | 32 ++++++++++
 ...ra_vid-fix-getline-call-needs-size_t.patch | 37 ++++++++++++
 ..._still-fix-getline-call-needs-size_t.patch | 35 +++++++++++
 ...-libcamera_app-fix-int64_t-constants.patch | 38 ++++++++++++
 ...006-cmake-fix-linking-with-exif-jpeg.patch | 47 +++++++++++++++
 .../0007-cmake-add-install-target.patch       | 24 ++++++++
 ...e-no-need-to-link-against-ipa_rpi.so.patch | 58 +++++++++++++++++++
Quoted 1 line

Loooots of patches. I suppose you submitted them upstream already ?

Yes, see [1]...., and more patches to come to fix test-pkg failures...

Quoted 14 lines
Quoted 14 lines
package/libcamera-apps/Config.in new file +7 -0
new file mode 100644
index 0000000000..482e1186a0
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
Quoted 8 lines

package/libcamera-apps/Config.in line 10

Quoted 3 lines
package/libcamera-apps/Config.in new file +3 -0
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy

To be honest, I am wondering if we shouldn't do a "depends on BR2_PACKAGE_LIBCAMERA" to simplify this a bit. Indeed, if you want libcamera-apps, most likely you know you should enable libcamera as well.

The experienced buildroot user will do...., but the average RPi user?

Quoted 4 lines

package/libcamera-apps/Config.in line 11

Quoted 2 lines
package/libcamera-apps/Config.in new file +1 -0
+	select BR2_PACKAGE_XLIB_LIBX11

It really only works with X11 ? A new project in 2021 is X11 only ?

Quoted 5 lines

Yes, see [2]:

find_package(X11 REQUIRED)

But maybe time to ask/suggest upstream for an X11 enable/disable option...

Suggested upstream, see https://github.com/raspberrypi/libcamera-apps/issues/5

Quoted 49 lines
Quoted 8 lines

package/libcamera-apps/Config.in line 15

Quoted 6 lines
package/libcamera-apps/Config.in new file +4 -0
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_BOOST
+        select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS

Indentation issue.

Ups, will fix...

Quoted 8 lines

package/libcamera-apps/Config.in line 20

Quoted 6 lines
package/libcamera-apps/Config.in new file +5 -0
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBCAMERA

Alphabetic ordering is not correct for this long list of selects.

Ups, still in the 'developer' ordering taken from the CMakeLists.txt file, will fix on next patch iteration...

Quoted 14 lines
Quoted 14 lines
package/libcamera-apps/libcamera-apps.hash new file +2 -0
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  bf8589f560796327088e7172cf36942c668a3380f0bd6220238ea2b932e40faa  libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2-br1.tar.gz
package/libcamera-apps/libcamera-apps.mk new file +2 -0
new file mode 100644
index 0000000000..5ab2bf1bd6
@@ -0,0 +1,24 @@
+################################################################################
+#
Quoted 8 lines

package/libcamera-apps/libcamera-apps.mk line 8

Quoted 6 lines
package/libcamera-apps/libcamera-apps.mk new file +6 -0
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_SITE = https://github.com/raspberrypi/libcamera-apps.git
+LIBCAMERA_APPS_VERSION = b1ca8997530f1f0290b291a956de359f2d4ce3e2

Use the github macro ?

Yes, will do...

Quoted 1 line
Quoted 7 lines
Quoted 4 lines

package/libcamera-apps/libcamera-apps.mk line 10

Quoted 2 lines
package/libcamera-apps/libcamera-apps.mk new file +2 -0
+LIBCAMERA_APPS_SITE_METHOD = git
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause

No license file ?

No (only a hint/link in the README.md file and SPDX license identifiers in the source files), will ask upstream...

Suggested upstream, see https://github.com/raspberrypi/libcamera-apps/issues/4

Regards,
Peter

Quoted 16 lines
Quoted 5 lines

Thanks!

Thomas

Regards,
Peter

[1] https://github.com/raspberrypi/libcamera-apps/pull/1
[2] https://github.com/raspberrypi/libcamera-apps/blob/main/CMakeLists.txt#L39

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot