summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-09-16 19:12:03 +0200
committerKhem Raj <raj.khem@gmail.com>2025-09-16 12:09:11 -0700
commitf4b9dfa0c903bc94c344c657917a3fbb229c322f (patch)
treef87fbe243ed6efbe87e29e2240805760bd25df41
parent11626467b4867653976ef5f3d8ee3efd9bdac718 (diff)
downloadmeta-openembedded-f4b9dfa0c903bc94c344c657917a3fbb229c322f.tar.gz
libcamera: upgrade 0.4.0 -> 0.5.2
Dropped 0001-media_device-Add-bool-return-type-to-unlock.patch, because the issue has been solved by upstream. Dropped 0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch, because it is included in this release. Added a new PACKAGECONFIG called "raspberrypi" - this is taken from the meta-raspberrypi layer, however using it still requires that layer, as using it requires a dependency that is provided by that layer. The recipe until now built support for all platforms that matched the selected architecture (e.g. mali, rpi imx8 when the archi is arm). However rpi-specific options now require a an extra dependency that's not in meta-oe, so only build rpi-support when raspberrypi PACKAGECONFIG is enabled. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-media_device-Add-bool-return-type-to-unlock.patch59
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch38
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb (renamed from meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb)16
3 files changed, 11 insertions, 102 deletions
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-media_device-Add-bool-return-type-to-unlock.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-media_device-Add-bool-return-type-to-unlock.patch
deleted file mode 100644
index 12f034effd..0000000000
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-media_device-Add-bool-return-type-to-unlock.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 6914c4fd3d53c0c6ea304123bf57429bb64ec16f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 31 Jan 2024 21:01:27 -0800
4Subject: [PATCH 1/2] media_device: Add bool return type to unlock()
5
6unlock uses lockf which is marked with __attribute__
7((warn_unused_result)) and compilers warn about it and some treat
8-Wunused-result as error with -Werror turned on, It would be good to
9check if lockf failed or succeeded, however, that piece is not changed
10with this, this fixes build with clang++ 18
11
12 ../git/src/libcamera/media_device.cpp:167:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
13 167 | lockf(fd_.get(), F_ULOCK, 0);
14 | ^~~~~ ~~~~~~~~~~~~~~~~~~~~~
15 1 error generated.
16
17Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2024-February/040380.html]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 include/libcamera/internal/media_device.h | 2 +-
21 src/libcamera/media_device.cpp | 6 +++---
22 2 files changed, 4 insertions(+), 4 deletions(-)
23
24diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
25index eb8cfde4..b09dfd16 100644
26--- a/include/libcamera/internal/media_device.h
27+++ b/include/libcamera/internal/media_device.h
28@@ -33,7 +33,7 @@ public:
29 bool busy() const { return acquired_; }
30
31 bool lock();
32- void unlock();
33+ bool unlock();
34
35 int populate();
36 bool isValid() const { return valid_; }
37diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
38index 2949816b..eaa2fdb0 100644
39--- a/src/libcamera/media_device.cpp
40+++ b/src/libcamera/media_device.cpp
41@@ -159,12 +159,12 @@ bool MediaDevice::lock()
42 *
43 * \sa lock()
44 */
45-void MediaDevice::unlock()
46+bool MediaDevice::unlock()
47 {
48 if (!fd_.isValid())
49- return;
50+ return false;
51
52- lockf(fd_.get(), F_ULOCK, 0);
53+ return lockf(fd_.get(), F_ULOCK, 0) == 0;
54 }
55
56 /**
57--
582.43.0
59
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch
deleted file mode 100644
index 18ba353de2..0000000000
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 91de550243121056984e5b9b693b486860655d31 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Sat, 28 Dec 2024 19:11:19 +0000
4Subject: [PATCH] libcamera: Add missing <stdint.h> include to
5 dma_buf_allocator.h
6
7Without the change the build fails on upcoming `gcc-15` as:
8
9 In file included from ../src/libcamera/dma_buf_allocator.cpp:9:
10 ../include/libcamera/internal/dma_buf_allocator.h:66:19: error: 'uint64_t' has not been declared
11 66 | void sync(uint64_t step);
12 | ^~~~~~~~
13
14Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
15Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
16Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
17Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
18
19Upstream-Status: Backport [https://git.libcamera.org/libcamera/libcamera.git/commit/?id=91de550243121056984e5b9b693b486860655d31]
20---
21 include/libcamera/internal/dma_buf_allocator.h | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h
25index d26f8a74..13600915 100644
26--- a/include/libcamera/internal/dma_buf_allocator.h
27+++ b/include/libcamera/internal/dma_buf_allocator.h
28@@ -8,6 +8,7 @@
29 #pragma once
30
31 #include <memory>
32+#include <stdint.h>
33 #include <string>
34 #include <vector>
35
36--
372.34.1
38
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb
index c7fe631a43..88fe9cf39c 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.5.2.bb
@@ -9,16 +9,13 @@ LIC_FILES_CHKSUM = "\
9" 9"
10 10
11SRC_URI = " \ 11SRC_URI = " \
12 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ 12 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \
13 file://0001-media_device-Add-bool-return-type-to-unlock.patch \
14 file://0002-libcamera-Add-missing-stdint.h-include-to-dma_buf_al.patch \
15" 13"
16 14
17SRCREV = "35ed4b91291d9f3d08e4b51acfb51163e65df8f8" 15SRCREV = "096c50ca881f72d858aca19757a5e73b4775a7cc"
18 16
19PE = "1" 17PE = "1"
20 18
21
22DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" 19DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
23DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" 20DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
24 21
@@ -28,8 +25,17 @@ PACKAGECONFIG ??= ""
28PACKAGECONFIG[dng] = ",,tiff" 25PACKAGECONFIG[dng] = ",,tiff"
29PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" 26PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
30PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" 27PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11"
28PACKAGECONFIG[raspberrypi] = ",,libpisp"
29
30# Raspberry Pi requires the meta-raspberrypi layer
31# These values are coming from the project's meson.build file,
32# which lists the supported values by arch.
33ARM_PIPELINES = "${@bb.utils.contains('PACKAGECONFIG', 'raspberrypi', 'rpi/pisp,rpi/vc4,', '', d)}"
34ARM_PIPELINES .= "imx8-isi,mali-c55,simple,uvcvideo"
31 35
32LIBCAMERA_PIPELINES ??= "auto" 36LIBCAMERA_PIPELINES ??= "auto"
37LIBCAMERA_PIPELINES:arm ??= "${ARM_PIPELINES}"
38LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}"
33 39
34EXTRA_OEMESON = " \ 40EXTRA_OEMESON = " \
35 -Dpipelines=${LIBCAMERA_PIPELINES} \ 41 -Dpipelines=${LIBCAMERA_PIPELINES} \