summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZelan Zou <zelan.zou@nxp.com>2026-03-20 16:41:40 +0800
committerZelan Zou <zelan.zou@nxp.com>2026-03-23 10:46:17 +0800
commitbcf4376f33e4408bea8848568fea24364ed15ef9 (patch)
tree63cf05b07eac108c6581532c8da36dd060ac42a6
parentdfd3cef507051c4d25b7f356583ba28a745dac79 (diff)
downloadmeta-freescale-bcf4376f33e4408bea8848568fea24364ed15ef9.tar.gz
libcamera: Use nxp fork repo
Signed-off-by: Zelan Zou <zelan.zou@nxp.com>
-rw-r--r--conf/machine/include/imx-base.inc8
-rw-r--r--recipes-multimedia/libcamera/libcamera_0.6.0.imx.bb115
2 files changed, 123 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 25c65537b..2bd19c6af 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -553,6 +553,14 @@ PREFERRED_VERSION_gstreamer1.0-python:imx-nxp-bsp ??= "1.26.6.imx"
553PREFERRED_VERSION_gstreamer1.0-rtsp-server:imx-nxp-bsp ??= "1.26.6.imx" 553PREFERRED_VERSION_gstreamer1.0-rtsp-server:imx-nxp-bsp ??= "1.26.6.imx"
554PREFERRED_VERSION_gstreamer1.0-vaapi:imx-nxp-bsp ??= "1.26.6.imx" 554PREFERRED_VERSION_gstreamer1.0-vaapi:imx-nxp-bsp ??= "1.26.6.imx"
555 555
556# Use libcamera fork for certain SOCs
557PREFERRED_VERSION_libcamera ??= "${PREFERRED_VERSION_LIBCAMERA_IMX}"
558PREFERRED_VERSION_LIBCAMERA_IMX = ""
559PREFERRED_VERSION_LIBCAMERA_IMX:mx95-nxp-bsp = "0.6.0.imx"
560PREFERRED_VERSION_LIBCAMERA_IMX:mx8mm-nxp-bsp = "0.6.0.imx"
561PREFERRED_VERSION_LIBCAMERA_IMX:mx8ulp-nxp-bsp = "0.6.0.imx"
562PREFERRED_VERSION_LIBCAMERA_IMX:mx8mq-nxp-bsp = "0.6.0.imx"
563
556# Determines if the SoC has support for Vivante kernel driver 564# Determines if the SoC has support for Vivante kernel driver
557SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0" 565SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0"
558SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT:imxgpu = "1" 566SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT:imxgpu = "1"
diff --git a/recipes-multimedia/libcamera/libcamera_0.6.0.imx.bb b/recipes-multimedia/libcamera/libcamera_0.6.0.imx.bb
new file mode 100644
index 000000000..6b811b5f1
--- /dev/null
+++ b/recipes-multimedia/libcamera/libcamera_0.6.0.imx.bb
@@ -0,0 +1,115 @@
1# This recipe is for the i.MX fork of libcamera. For ease of
2# maintenance, the top section is a verbatim copy of an OE-core
3# recipe. The second section customizes the recipe for i.MX.
4
5########### meta-openembedded copy ##################
6# Upstream hash: f4b9dfa0c903bc94c344c657917a3fbb229c322f
7
8SUMMARY = "Linux libcamera framework"
9SECTION = "libs"
10
11LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
12
13LIC_FILES_CHKSUM = "\
14 file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \
15 file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
16"
17
18SRC_URI = " \
19 git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \
20"
21
22SRCREV = "3e6f5d83e397e11cccd3844e121463748f56de39"
23
24PE = "1"
25
26DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
27DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
28
29PACKAGES =+ "${PN}-gst ${PN}-pycamera"
30
31PACKAGECONFIG ??= ""
32PACKAGECONFIG[dng] = ",,tiff"
33PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
34PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11"
35PACKAGECONFIG[raspberrypi] = ",,libpisp"
36
37# Raspberry Pi requires the meta-raspberrypi layer
38# These values are coming from the project's meson.build file,
39# which lists the supported values by arch.
40ARM_PIPELINES = "${@bb.utils.contains('PACKAGECONFIG', 'raspberrypi', 'rpi/pisp,rpi/vc4,', '', d)}"
41ARM_PIPELINES .= "imx8-isi,mali-c55,simple,uvcvideo"
42
43LIBCAMERA_PIPELINES ??= "auto"
44LIBCAMERA_PIPELINES:arm ??= "${ARM_PIPELINES}"
45LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}"
46
47EXTRA_OEMESON = " \
48 -Dpipelines=${LIBCAMERA_PIPELINES} \
49 -Dv4l2=true \
50 -Dcam=enabled \
51 -Dlc-compliance=disabled \
52 -Dtest=false \
53 -Ddocumentation=disabled \
54"
55
56RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
57
58inherit meson pkgconfig python3native
59
60do_configure:prepend() {
61 sed -i -e 's|py_compile=True,||' ${S}/utils/codegen/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py
62}
63
64do_install:append() {
65 chrpath -d ${D}${libdir}/libcamera.so
66 chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
67}
68
69do_package:append() {
70 bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
71}
72
73do_package_recalculate_ipa_signatures() {
74 local modules
75 for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
76 module="${module%.sign}"
77 if [ -f "${module}" ] ; then
78 modules="${modules} ${module}"
79 fi
80 done
81
82 ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
83}
84
85FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
86FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
87FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera"
88
89# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
90# both 32 and 64 bit file APIs.
91GLIBC_64BIT_TIME_FLAGS = ""
92########### End of meta-openembedded copy ###########
93
94########### i.MX overrides ################
95
96SRC_URI:remove = "git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV}"
97SRC_URI:prepend = "${LIBCAMERA_SRC};branch=${SRCBRANCH} "
98LIBCAMERA_SRC ?= "git://github.com/nxp-imx/libcamera.git;protocol=https"
99SRCBRANCH = "lf-6.18.2_1.0.0"
100SRCREV = "3e6f5d83e397e11cccd3844e121463748f56de39"
101
102PACKAGECONFIG = "gst pycamera dng"
103
104ARM_PIPELINES .= ",nxp/neo"
105
106EXTRA_OEMESON += " \
107 --python.platlibdir=${PYTHON_SITEPACKAGES_DIR} \
108"
109
110# Qt installs native tools to /usr/libexec, but this is not in PATH
111PATH:prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'qt', '${STAGING_LIBEXECDIR_NATIVE}:', '', d)}"
112
113COMPATIBLE_MACHINE = "(mx95-nxp-bsp|mx8mm-nxp-bsp|mx8ulp-nxp-bsp|mx8mq-nxp-bsp)"
114
115########### End of i.MX overrides #########