stm-st-stm32mp: libcamera-stm32mp: add v0.3.0 with ST IPA
Synchronize the libcamera recipe with the meta-OpenSTLinux layer from the openstlinux-6.6-yocto-scarthgap-mpu-v26.02.18 tag. https://onedigi.atlassian.net/browse/DEL-10021 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
d0f9c61efd
commit
17d1f19a48
File diff suppressed because it is too large
Load Diff
|
|
@ -1,33 +0,0 @@
|
|||
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||
Date: Wed, 19 Nov 2025 11:58:43 +0100
|
||||
Subject: [PATCH] dcmipp: Fix configureAwbAlgo() encapsulation under
|
||||
EVISION_ALGO_ENABLED
|
||||
|
||||
Awb::queueRequest() unconditionally calls configureAwbAlgo(), but it is
|
||||
compiled only when EVISION_ALGO_ENABLED is defined. With EVISION_ALGO_ENABLED
|
||||
disabled, this leads to an undefined symbol at runtime when loading the DCMIPP
|
||||
IPA. This commit guards the call under EVISION_ALGO_ENABLED so that non-EVISION
|
||||
builds no longer reference the helper.
|
||||
|
||||
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||
---
|
||||
src/ipa/dcmipp/algorithms/awb.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/ipa/dcmipp/algorithms/awb.cpp b/src/ipa/dcmipp/algorithms/awb.cpp
|
||||
index 006ad4b8..4444ac98 100644
|
||||
--- a/src/ipa/dcmipp/algorithms/awb.cpp
|
||||
+++ b/src/ipa/dcmipp/algorithms/awb.cpp
|
||||
@@ -652,10 +652,12 @@ void Awb::queueRequest([[maybe_unused]] IPAContext &context,
|
||||
LOG(DcmippAwb, Debug) << "Updating AwbColourConv to " << (*cconv)[0] << "...";
|
||||
}
|
||||
|
||||
+#ifdef EVISION_ALGO_ENABLED
|
||||
if (internal_.profileDirty && !configureAwbAlgo()) {
|
||||
LOG(DcmippAwb, Error) << "Cannot reconfigure awb algorithm";
|
||||
return;
|
||||
}
|
||||
+#endif /* EVISION_ALGO_ENABLED */
|
||||
|
||||
/* Static config: update params_ and if applicable force config_ update now */
|
||||
const auto &customColorTemp = controls.get(controls::draft::AwbCustomColorTemperature);
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/libcamera-stm32mp:"
|
||||
|
||||
PROVIDES += "libcamera"
|
||||
|
||||
PE = "1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
|
||||
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
|
||||
DEPENDS:append:aarch64 = " evision-libs "
|
||||
|
||||
PACKAGES =+ "${PN}-gst"
|
||||
|
||||
PACKAGECONFIG ??= "gst python"
|
||||
PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
|
||||
PACKAGECONFIG[python] = "-Dpycamera=enabled,-Dpycamera=disabled,python3-pybind11"
|
||||
|
||||
LIBCAMERA_PIPELINES ??= "dcmipp"
|
||||
LIBCAMERA_IPAS = "dcmipp"
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dpipelines=${LIBCAMERA_PIPELINES} \
|
||||
-Dv4l2=true \
|
||||
-Dcam=enabled \
|
||||
-Dlc-compliance=disabled \
|
||||
-Dtest=false \
|
||||
-Ddocumentation=disabled \
|
||||
"
|
||||
EXTRA_OEMESON += " \
|
||||
-Dipas=${LIBCAMERA_IPAS} \
|
||||
"
|
||||
EXTRA_OEMESON:append:aarch64 = " \
|
||||
-Devision_algo=true \
|
||||
-Devision_algo_inc_dir=${RECIPE_SYSROOT}/usr/include/evision \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
|
||||
RDEPENDS:${PN}:append:aarch64 = " evision-libs "
|
||||
|
||||
inherit meson pkgconfig python3native python3-dir
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
chrpath -d ${D}${libdir}/libcamera.so
|
||||
chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
|
||||
}
|
||||
|
||||
do_package:append() {
|
||||
bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
|
||||
}
|
||||
|
||||
do_package_recalculate_ipa_signatures() {
|
||||
local modules
|
||||
for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
|
||||
module="${module%.sign}"
|
||||
if [ -f "${module}" ] ; then
|
||||
modules="${modules} ${module}"
|
||||
fi
|
||||
done
|
||||
|
||||
${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
|
||||
}
|
||||
|
||||
FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
|
||||
FILES:${PN} += "${datadir} ${libdir} ${PYTHON_SITEPACKAGES_DIR}"
|
||||
FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
|
||||
|
||||
# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
|
||||
# both 32 and 64 bit file APIs.
|
||||
GLIBC_64BIT_TIME_FLAGS = ""
|
||||
|
|
@ -8,85 +8,18 @@ LIC_FILES_CHKSUM = "\
|
|||
file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
|
||||
"
|
||||
|
||||
include libcamera-stm32mp.inc
|
||||
|
||||
# 0.3.0
|
||||
SRC_URI = " \
|
||||
git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
|
||||
file://0001-media_device-Add-bool-return-type-to-unlock.patch \
|
||||
file://0002-options-Replace-use-of-VLAs-in-C.patch \
|
||||
file://0001-rpi-Use-alloca-instead-of-variable-length-arrays.patch \
|
||||
"
|
||||
SRC_URI = "git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master"
|
||||
SRCREV = "aee16c06913422a0ac84ee3217f87a9795e3c2d9"
|
||||
|
||||
SRC_URI += " \
|
||||
file://0001-0.3.0-stm32mp-add-dcmipp-ipa.patch \
|
||||
file://0002-dcmipp-Fix-configureAwbAlgo-encapsulation-under-EVIS.patch \
|
||||
"
|
||||
PV = "v0.3.0-stm32mp"
|
||||
file://0001-media_device-Add-bool-return-type-to-unlock.patch \
|
||||
file://0002-options-Replace-use-of-VLAs-in-C.patch \
|
||||
file://0001-rpi-Use-alloca-instead-of-variable-length-arrays.patch \
|
||||
\
|
||||
file://0001-v0.3.0-stm32mp.patch \
|
||||
"
|
||||
|
||||
PROVIDES += "libcamera"
|
||||
|
||||
PE = "1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
|
||||
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
|
||||
|
||||
PACKAGES =+ "${PN}-gst"
|
||||
|
||||
PACKAGECONFIG ??= "gst python"
|
||||
PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
|
||||
PACKAGECONFIG[python] = "-Dpycamera=enabled,-Dpycamera=disabled,python3-pybind11"
|
||||
|
||||
LIBCAMERA_PIPELINES ??= "dcmipp"
|
||||
LIBCAMERA_IPAS = "dcmipp"
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dpipelines=${LIBCAMERA_PIPELINES} \
|
||||
-Dv4l2=true \
|
||||
-Dcam=enabled \
|
||||
-Dlc-compliance=disabled \
|
||||
-Dtest=false \
|
||||
-Ddocumentation=disabled \
|
||||
"
|
||||
EXTRA_OEMESON += " \
|
||||
-Dipas=${LIBCAMERA_IPAS} \
|
||||
"
|
||||
|
||||
|
||||
RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
|
||||
|
||||
inherit meson pkgconfig python3native python3-dir
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
chrpath -d ${D}${libdir}/libcamera.so
|
||||
chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
|
||||
}
|
||||
|
||||
do_package:append() {
|
||||
bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
|
||||
}
|
||||
|
||||
do_package_recalculate_ipa_signatures() {
|
||||
local modules
|
||||
for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
|
||||
module="${module%.sign}"
|
||||
if [ -f "${module}" ] ; then
|
||||
modules="${modules} ${module}"
|
||||
fi
|
||||
done
|
||||
|
||||
${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
|
||||
}
|
||||
|
||||
FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
|
||||
FILES:${PN} += "${datadir} ${libdir} ${PYTHON_SITEPACKAGES_DIR}"
|
||||
FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
|
||||
|
||||
# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
|
||||
# both 32 and 64 bit file APIs.
|
||||
GLIBC_64BIT_TIME_FLAGS = ""
|
||||
PV = "0.3.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue