From patchwork Thu Jul 6 04:16:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 26947 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC796C001B0 for ; Thu, 6 Jul 2023 04:17:07 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web10.14234.1688617018195073384 for ; Wed, 05 Jul 2023 21:16:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=Rm/qy+jI; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: j-luthra@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3664Gv9h068718; Wed, 5 Jul 2023 23:16:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1688617017; bh=itPAm3zLkAl96fwhJM1kVft7l/u3BfL0UXiXlV13UEk=; h=From:To:CC:Subject:Date; b=Rm/qy+jIhLGwWtji7xjmeTgE8y8zz5nJJqxIFDNgSkj16VP1ozmJ1mw6IAL/Cp04D 0SG6jrb1WoUKtaXbvIWsHL5xitXWhbcZQVp3I3Y8PVq2BRPuuixvyvG6W9xSnUkaLS cJSo+XJ2M8UNujwhudr9aGl19faQxUIPbl1ug1t0= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3664GvPn017394 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Jul 2023 23:16:57 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 5 Jul 2023 23:16:56 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 5 Jul 2023 23:16:56 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3664Gtbt037499; Wed, 5 Jul 2023 23:16:56 -0500 From: Jai Luthra To: CC: Ryan Eatmon , Denys Dmytriyenko , Gyan Gupta , Sai Sree Kartheek Adivi , Chirag Shilwant , Devarsh Thakkar , Jai Luthra Subject: [master/kirkstone][PATCH v3 1/3] libcamera: Add recipe for v0.0.5 Date: Thu, 6 Jul 2023 09:46:50 +0530 Message-ID: <20230706041652.1843102-1-j-luthra@ti.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 06 Jul 2023 04:17:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14763 For kirkstone, an older recipe is present in meta-oe which is using libcamera from December 2021 with many missing features. TI's 6.1 based kernel can support the simple pipeline of libcamera, and benefit from the latest features in release v0.0.5, so we override the recipe here for arago. The new recipe here is taken as-is from meta-oe master. Signed-off-by: Jai Luthra --- v3: No changes Link to v2: https://lore.kernel.org/all/20230706035522.1817402-1-j-luthra@ti.com/ .../libcamera/libcamera_0.0.5.bb | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb diff --git a/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb b/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb new file mode 100644 index 00000000..6ad376f2 --- /dev/null +++ b/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb @@ -0,0 +1,72 @@ +SUMMARY = "Linux libcamera framework" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "\ + file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +" + +SRC_URI = " \ + git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ +" + +SRCREV = "fb44403f1c5571549ac128c21daee9761eb9249c" + +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 ??= "" +PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" + +LIBCAMERA_PIPELINES ??= "auto" + +EXTRA_OEMESON = " \ + -Dpipelines=${LIBCAMERA_PIPELINES} \ + -Dv4l2=true \ + -Dcam=enabled \ + -Dlc-compliance=disabled \ + -Dtest=false \ + -Ddocumentation=disabled \ +" + +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" + +inherit meson pkgconfig python3native + +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}${libdir}/v4l2-compat.so +} + +addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata +do_recalculate_ipa_signatures_package() { + 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} += " ${libdir}/v4l2-compat.so" +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 = "" + From patchwork Thu Jul 6 04:16:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 26946 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D53CFEB64D9 for ; Thu, 6 Jul 2023 04:17:07 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.14235.1688617020898222322 for ; Wed, 05 Jul 2023 21:17:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=nArTGZUy; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: j-luthra@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3664Gw7v068245; Wed, 5 Jul 2023 23:16:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1688617018; bh=b7nMZVa88Bxof23y4VPxo4kQOSlYLdN49mcE5pnzXlE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nArTGZUytKOODetQ0GGKhNcTcSxKUYCUDGy1buWw19Aqo8Cy7jpWfIRe1d1CmB+4G dCqrRBI8hGPX3uqhSGE/sneYYKLhMm7vo1ihDlFL9eSanQHcShVW5t8kdG0XZaGjhs Lq4SorcYdgTBhW2HtlZDJPtAHpzCN88PJNRkUBuU= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3664GwW0101867 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Jul 2023 23:16:58 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 5 Jul 2023 23:16:58 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 5 Jul 2023 23:16:57 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3664GvQT047333; Wed, 5 Jul 2023 23:16:57 -0500 From: Jai Luthra To: CC: Ryan Eatmon , Denys Dmytriyenko , Gyan Gupta , Sai Sree Kartheek Adivi , Chirag Shilwant , Devarsh Thakkar , Jai Luthra Subject: [master/kirkstone][PATCH v3 2/3] libcamera: Add support for TI CSI-RX Date: Thu, 6 Jul 2023 09:46:51 +0530 Message-ID: <20230706041652.1843102-2-j-luthra@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706041652.1843102-1-j-luthra@ti.com> References: <20230706041652.1843102-1-j-luthra@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 06 Jul 2023 04:17:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14764 TI's CSI-RX driver is not yet upstream, so the libcamera simple pipeline does not recognize it. Apply a patch to the simple pipeline so that it can recognize the media entity for TI's CSI-RX driver. Signed-off-by: Jai Luthra --- v3: Add Upstream-Status tag Link to v2: https://lore.kernel.org/all/20230706035522.1817402-2-j-luthra@ti.com/ .../0001-simple-Support-TI-CSI-RX.patch | 33 +++++++++++++++++++ .../libcamera/libcamera_0.0.5.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-arago-extras/recipes-multimedia/libcamera/libcamera/0001-simple-Support-TI-CSI-RX.patch diff --git a/meta-arago-extras/recipes-multimedia/libcamera/libcamera/0001-simple-Support-TI-CSI-RX.patch b/meta-arago-extras/recipes-multimedia/libcamera/libcamera/0001-simple-Support-TI-CSI-RX.patch new file mode 100644 index 00000000..82b02200 --- /dev/null +++ b/meta-arago-extras/recipes-multimedia/libcamera/libcamera/0001-simple-Support-TI-CSI-RX.patch @@ -0,0 +1,33 @@ +From d0e4f4f224671e9fc992d39e7beb9c486303ede1 Mon Sep 17 00:00:00 2001 +From: Jai Luthra +Date: Thu, 23 Mar 2023 11:38:46 +0530 +Subject: [PATCH] simple: Support TI CSI-RX + +Add support for TI's CSI-RX pixel grabber device for the simple +pipeline. + +The driver is not yet merged, but v7 is posted [1] upstream. + +Link: https://lore.kernel.org/all/20230314115516.667-1-vaishnav.a@ti.com/ [1] +Upstream-Status: Pending +Signed-off-by: Jai Luthra +--- + src/libcamera/pipeline/simple/simple.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp +index e1f8b989..520405a1 100644 +--- a/src/libcamera/pipeline/simple/simple.cpp ++++ b/src/libcamera/pipeline/simple/simple.cpp +@@ -194,6 +194,8 @@ static const SimplePipelineInfo supportedDevices[] = { + { "mxc-isi", {} }, + { "qcom-camss", {} }, + { "sun6i-csi", {} }, ++ { "j721e-csi2rx", {} }, ++ + }; + + } /* namespace */ +-- +2.41.0 + diff --git a/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb b/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb index 6ad376f2..b2eb5fac 100644 --- a/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb +++ b/meta-arago-extras/recipes-multimedia/libcamera/libcamera_0.0.5.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "\ SRC_URI = " \ git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ + file://0001-simple-Support-TI-CSI-RX.patch \ " SRCREV = "fb44403f1c5571549ac128c21daee9761eb9249c" From patchwork Thu Jul 6 04:16:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 26945 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8323EB64DC for ; Thu, 6 Jul 2023 04:17:07 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web11.14415.1688617021249996818 for ; Wed, 05 Jul 2023 21:17:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=vgLYmdJd; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: j-luthra@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3664GxA4068729; Wed, 5 Jul 2023 23:16:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1688617019; bh=tQPVE/23NW5fEgq/BwddeAABySVnYss1gNwohu66fTc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vgLYmdJd8zcWXvqFZGxqpteP6uUX5Ri8FxO5BOW5F2TrWB8SKg6tJgLaTXjiQEnrd i3f4S7cc79M7WSkG6Usjj0y0rGahROj7KeNWinbEYxhiFnHVbkdw+xkxKaEojl5Bv6 CN6D2h8LyTcQTx5wDqsf8AIWwZY0tnROYEZvEbjA= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3664Gx5A017410 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Jul 2023 23:16:59 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 5 Jul 2023 23:16:59 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 5 Jul 2023 23:16:59 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3664Gw4i037523; Wed, 5 Jul 2023 23:16:59 -0500 From: Jai Luthra To: CC: Ryan Eatmon , Denys Dmytriyenko , Gyan Gupta , Sai Sree Kartheek Adivi , Chirag Shilwant , Devarsh Thakkar , Jai Luthra Subject: [master/kirkstone][PATCH v3 3/3] meta-arago-distro: Package libcamera in tisdk Date: Thu, 6 Jul 2023 09:46:52 +0530 Message-ID: <20230706041652.1843102-3-j-luthra@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706041652.1843102-1-j-luthra@ti.com> References: <20230706041652.1843102-1-j-luthra@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 06 Jul 2023 04:17:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14765 Libcamera is useful for testing simple camera pipelines, without requiring manual configuration of media graph for all v4l2-subdevs. Enable it for TISDK images, along with the optional package for the libcamerasrc gstreamer element [1] Link: https://github.com/libcamera-org/libcamera/blob/master/src/gstreamer/gstlibcamerasrc.cpp [1] Signed-off-by: Jai Luthra --- v3: No changes Link to v2: https://lore.kernel.org/all/20230706035522.1817402-3-j-luthra@ti.com/ meta-arago-distro/conf/distro/arago.conf | 3 +++ .../packagegroups/packagegroup-arago-tisdk-multimedia.bb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf index e0087ab7..bb074478 100644 --- a/meta-arago-distro/conf/distro/arago.conf +++ b/meta-arago-distro/conf/distro/arago.conf @@ -128,6 +128,9 @@ PACKAGECONFIG:append:pn-gstreamer1.0 = " tracer-hooks" # Enable kmssink in gstreamer PACKAGECONFIG:append:pn-gstreamer1.0-plugins-bad = " kms" +# Enable gstreamer plugin for libcamera +PACKAGECONFIG:append:pn-libcamera = " gst" + # Disable pulseaudio routing in alsa by default PACKAGECONFIG:remove:pn-alsa-plugins = "pulseaudio" RDEPENDS:pulseaudio-server:remove = "alsa-plugins-pulseaudio-conf" diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia.bb index d06fbb6f..b4148882 100644 --- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia.bb +++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia.bb @@ -8,6 +8,8 @@ inherit packagegroup MULTIMEDIA = " \ amsdk-av-files \ + libcamera \ + libcamera-gst \ " MULTIMEDIA:omapl138 = ""