diff options
| author | Zelan Zou <zelan.zou@nxp.com> | 2026-03-20 16:41:40 +0800 |
|---|---|---|
| committer | Zelan Zou <zelan.zou@nxp.com> | 2026-03-23 10:46:17 +0800 |
| commit | bcf4376f33e4408bea8848568fea24364ed15ef9 (patch) | |
| tree | 63cf05b07eac108c6581532c8da36dd060ac42a6 | |
| parent | dfd3cef507051c4d25b7f356583ba28a745dac79 (diff) | |
| download | meta-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.inc | 8 | ||||
| -rw-r--r-- | recipes-multimedia/libcamera/libcamera_0.6.0.imx.bb | 115 |
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" | |||
| 553 | PREFERRED_VERSION_gstreamer1.0-rtsp-server:imx-nxp-bsp ??= "1.26.6.imx" | 553 | PREFERRED_VERSION_gstreamer1.0-rtsp-server:imx-nxp-bsp ??= "1.26.6.imx" |
| 554 | PREFERRED_VERSION_gstreamer1.0-vaapi:imx-nxp-bsp ??= "1.26.6.imx" | 554 | PREFERRED_VERSION_gstreamer1.0-vaapi:imx-nxp-bsp ??= "1.26.6.imx" |
| 555 | 555 | ||
| 556 | # Use libcamera fork for certain SOCs | ||
| 557 | PREFERRED_VERSION_libcamera ??= "${PREFERRED_VERSION_LIBCAMERA_IMX}" | ||
| 558 | PREFERRED_VERSION_LIBCAMERA_IMX = "" | ||
| 559 | PREFERRED_VERSION_LIBCAMERA_IMX:mx95-nxp-bsp = "0.6.0.imx" | ||
| 560 | PREFERRED_VERSION_LIBCAMERA_IMX:mx8mm-nxp-bsp = "0.6.0.imx" | ||
| 561 | PREFERRED_VERSION_LIBCAMERA_IMX:mx8ulp-nxp-bsp = "0.6.0.imx" | ||
| 562 | PREFERRED_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 |
| 557 | SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0" | 565 | SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0" |
| 558 | SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT:imxgpu = "1" | 566 | SOC_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 | |||
| 8 | SUMMARY = "Linux libcamera framework" | ||
| 9 | SECTION = "libs" | ||
| 10 | |||
| 11 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" | ||
| 12 | |||
| 13 | LIC_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 | |||
| 18 | SRC_URI = " \ | ||
| 19 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV} \ | ||
| 20 | " | ||
| 21 | |||
| 22 | SRCREV = "3e6f5d83e397e11cccd3844e121463748f56de39" | ||
| 23 | |||
| 24 | PE = "1" | ||
| 25 | |||
| 26 | DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" | ||
| 27 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" | ||
| 28 | |||
| 29 | PACKAGES =+ "${PN}-gst ${PN}-pycamera" | ||
| 30 | |||
| 31 | PACKAGECONFIG ??= "" | ||
| 32 | PACKAGECONFIG[dng] = ",,tiff" | ||
| 33 | PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" | ||
| 34 | PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" | ||
| 35 | PACKAGECONFIG[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. | ||
| 40 | ARM_PIPELINES = "${@bb.utils.contains('PACKAGECONFIG', 'raspberrypi', 'rpi/pisp,rpi/vc4,', '', d)}" | ||
| 41 | ARM_PIPELINES .= "imx8-isi,mali-c55,simple,uvcvideo" | ||
| 42 | |||
| 43 | LIBCAMERA_PIPELINES ??= "auto" | ||
| 44 | LIBCAMERA_PIPELINES:arm ??= "${ARM_PIPELINES}" | ||
| 45 | LIBCAMERA_PIPELINES:aarch64 ??= "${ARM_PIPELINES}" | ||
| 46 | |||
| 47 | EXTRA_OEMESON = " \ | ||
| 48 | -Dpipelines=${LIBCAMERA_PIPELINES} \ | ||
| 49 | -Dv4l2=true \ | ||
| 50 | -Dcam=enabled \ | ||
| 51 | -Dlc-compliance=disabled \ | ||
| 52 | -Dtest=false \ | ||
| 53 | -Ddocumentation=disabled \ | ||
| 54 | " | ||
| 55 | |||
| 56 | RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" | ||
| 57 | |||
| 58 | inherit meson pkgconfig python3native | ||
| 59 | |||
| 60 | do_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 | |||
| 64 | do_install:append() { | ||
| 65 | chrpath -d ${D}${libdir}/libcamera.so | ||
| 66 | chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so | ||
| 67 | } | ||
| 68 | |||
| 69 | do_package:append() { | ||
| 70 | bb.build.exec_func("do_package_recalculate_ipa_signatures", d) | ||
| 71 | } | ||
| 72 | |||
| 73 | do_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 | |||
| 85 | FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" | ||
| 86 | FILES:${PN}-gst = "${libdir}/gstreamer-1.0" | ||
| 87 | FILES:${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. | ||
| 91 | GLIBC_64BIT_TIME_FLAGS = "" | ||
| 92 | ########### End of meta-openembedded copy ########### | ||
| 93 | |||
| 94 | ########### i.MX overrides ################ | ||
| 95 | |||
| 96 | SRC_URI:remove = "git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV}" | ||
| 97 | SRC_URI:prepend = "${LIBCAMERA_SRC};branch=${SRCBRANCH} " | ||
| 98 | LIBCAMERA_SRC ?= "git://github.com/nxp-imx/libcamera.git;protocol=https" | ||
| 99 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 100 | SRCREV = "3e6f5d83e397e11cccd3844e121463748f56de39" | ||
| 101 | |||
| 102 | PACKAGECONFIG = "gst pycamera dng" | ||
| 103 | |||
| 104 | ARM_PIPELINES .= ",nxp/neo" | ||
| 105 | |||
| 106 | EXTRA_OEMESON += " \ | ||
| 107 | --python.platlibdir=${PYTHON_SITEPACKAGES_DIR} \ | ||
| 108 | " | ||
| 109 | |||
| 110 | # Qt installs native tools to /usr/libexec, but this is not in PATH | ||
| 111 | PATH:prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'qt', '${STAGING_LIBEXECDIR_NATIVE}:', '', d)}" | ||
| 112 | |||
| 113 | COMPATIBLE_MACHINE = "(mx95-nxp-bsp|mx8mm-nxp-bsp|mx8ulp-nxp-bsp|mx8mq-nxp-bsp)" | ||
| 114 | |||
| 115 | ########### End of i.MX overrides ######### | ||
