Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PLATFORM = "hamoa"
PBT_BUILD_DATE = "260826"
PBT_BUILD_DATE = "260910"
Comment thread
gkhose-qipl marked this conversation as resolved.

require common.inc

SRC_URI[camxlib.sha256sum] = "70208241d530536878c202ac512f4e39019827b9feb2ba9177d904416dbab198"
SRC_URI[camx.sha256sum] = "7d2d59c06788a57487b43a0c6792b62822c8992718c15ab5811cdd03b169fc79"
SRC_URI[chicdk.sha256sum] = "5896081c3200da9c497079e217cae2c616cfd610ea2f2c80a6c5a636052de6bf"
SRC_URI[camxcommon.sha256sum] = "76b94b2af3ad33cf6ffcb768dfe42e85352adf231488e42b99de5575d191100e"
SRC_URI[camxtest.sha256sum] = "ccf1b6430bb494b34a0db616c7f1f7940fed925531c76f1a8ed2a7211381609c"
SRC_URI[camxlib.sha256sum] = "599f14eeb3cecd9d58d3009b45882ee04dbcbfee5319c3f46936828966ee883f"
SRC_URI[camx.sha256sum] = "60304da488b187331a74a268244d6346589d4ca39e7661845b9dbcc5078a1597"
SRC_URI[chicdk.sha256sum] = "8b38b92e6e03396508d306412933d962d5a200a7ee2f436e4ba48b70aff0f8b9"
SRC_URI[camxcommon.sha256sum] = "ac9bba4563019444f1f9460b6412f0041addaaf22e2925ea49a01f2b6e33327d"
SRC_URI[camxtest.sha256sum] = "d6ecd8d9a43d395fdb611ef904a879e194181d6208ee72df65712e70f2a5ae9f"

do_install:append() {
# copy skel file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,23 @@ LICENSE = "LicenseRef-LICENSE.qcom-2"
LIC_FILES_CHKSUM = "file://usr/share/doc/${BPN}/LICENSE.QCOM-2.txt;md5=165287851294f2fb8ac8cbc5e24b02b0 \
file://usr/share/doc/${BPN}/NOTICE;md5=04facc2e07e3d41171a931477be0c690"

PBT_BUILD_DATE = "260825"
PBT_BUILD_DATE = "260910"
PBT_BRANCH = "master"
SRC_URI = " \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/${BPN}_${PV}_armv8-2a.tar.gz;name=camxlib \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camx-kodiak_${PV}_armv8-2a.tar.gz;name=camx \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/chicdk-kodiak_${PV}_armv8-2a.tar.gz;name=chicdk \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camxtest-kodiak_${PV}_armv8-2a.tar.gz;name=camxtest \
"
SRC_URI[camxlib.sha256sum] = "694c66493b5459bde8734ba416673ec93e5abdbabef5cbd9f86a60a52e09eb1b"
SRC_URI[camx.sha256sum] = "7ab9838704139cbb52bc9c9c0277edaa2eabadf6dfd6719cf8aa93a4e7d9f29b"
SRC_URI[chicdk.sha256sum] = "b0800ae386afa8f3ddac704d5e67a6f71d9a270acb3e2bc793a5b56a6d829417"
SRC_URI[camxtest.sha256sum] = "26653dcaa7974c6b44fa5f3dc8560cd8d7f8b33c8ceae337ed0e43fb49d3e2a1"
SRC_URI[camxlib.sha256sum] = "b47924c3dcdb7335ef113375c7bb54523478544986013f43af8af4291b93ab6f"
SRC_URI[camx.sha256sum] = "74d41e6bea69f5fa1bcadd56e4fd671173dc82e23ad7b32577262c795304af0b"
SRC_URI[chicdk.sha256sum] = "bba4027c1cd04a769b098ccffe0c3bec942cb3a8ec914c39d757eb047afb0ff4"
SRC_URI[camxtest.sha256sum] = "d72999d60fff15a240237cd4c0d0ea5cccc69977656d44b9e9844ec91725f122"

S = "${UNPACKDIR}"

DEPENDS += "glib-2.0 fastrpc protobuf libxml2 qmi-framework sensinghub qcom-sensors-binaries"

DEPENDS += " \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/egl virtual/libgles2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'virtual/libopencl1', '', d)} \
"

# This package is currently only used and tested on ARMv8 (aarch64) machines.
# Therefore, builds for other architectures are not necessary and are explicitly excluded.
COMPATIBLE_MACHINE = "^$"
Expand Down Expand Up @@ -74,6 +69,9 @@ do_install:append() {
rm -f ${D}${libdir}/camx/kodiak/hw/*${SOLIBSDEV}
rm -f ${D}${libdir}/camx/kodiak/camera/*${SOLIBSDEV}

# Remove legacy libcamera* libs from the staged image
Comment thread
gkhose-qipl marked this conversation as resolved.
rm -f ${D}${libdir}/libcamera*
Comment thread
gkhose-qipl marked this conversation as resolved.
Comment thread
gkhose-qipl marked this conversation as resolved.
Comment thread
gkhose-qipl marked this conversation as resolved.

install -m 0644 ${S}/usr/share/doc/${BPN}/NOTICE ${D}${datadir}/doc/${BPN}
install -m 0644 ${S}/usr/share/doc/${BPN}/LICENSE.QCOM-2.txt ${D}${datadir}/doc/${BPN}

Expand All @@ -93,7 +91,11 @@ do_install:append() {
PACKAGE_BEFORE_PN += "camx-kodiak chicdk-kodiak ${PN}-skel"
RDEPENDS:${PN} += "chicdk-kodiak ${PN}-skel"
RDEPENDS:${PN}-dev += "camxcommon-headers-dev"
RRECOMMENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'virtual-opencl-icd', '', d)} sensinghub qcom-sensors-binaries"
RRECOMMENDS:${PN} += "sensinghub qcom-sensors-binaries"
RRECOMMENDS:${PN} += " \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add sensinghub qcom-sensors-binaries here, no need to have 2 entries for RRECOMMENDS.

${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libegl1 libglesv2-2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opencl', '${PREFERRED_PROVIDER_virtual/libopencl1}', '', d)} \
"

FILES:camx-kodiak = "\
${libdir}/libcamx_hardware_kodiak*${SOLIBS} \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
PLATFORM = "lemans"
PBT_BUILD_DATE = "260825"
PBT_BUILD_DATE = "260910"

require common.inc

SRC_URI[camxlib.sha256sum] = "d786afdae167643ad5feaad745ed14b741001060cf41e6174fe4f37cee8077f5"
SRC_URI[camx.sha256sum] = "fd57a206aa1ae4dd6ac95f71ceb2812f995b5ebbf32322fe693186c7359b9770"
SRC_URI[chicdk.sha256sum] = "31b7582c5c8f2f8a3412e9b99f3b689afda6b53efd1504d8864097ab73fd9c31"
SRC_URI[camxcommon.sha256sum] = "e2a8645a8ae22182cd62e612ecbb1d098b7fcee4e75e42778b79a88b2587bcfb"
SRC_URI[camxtest.sha256sum] = "628a94a198b5269812169e3bfbedf285b68cd3190e7102d9f076654fef3b9915"

DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'virtual/libopencl1', '', d)}"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/egl virtual/libgles2', '', d)}"
SRC_URI[camxlib.sha256sum] = "0888f786d032ed6cf91e097d761d8e6f49e6a0a960bbf57111a981705e321985"
SRC_URI[camx.sha256sum] = "e8a6c72e65e2449558100d291e672956da83816dc865493876d1a7955f03b71f"
SRC_URI[chicdk.sha256sum] = "0ea775319b58b93e7ecf392b1663bed1dc81b056b09a66dc00a7da5fb5a077ad"
SRC_URI[camxcommon.sha256sum] = "6cde038f80e4005ad03e530f498fb025125682c39a095c4dd01927256776c51e"
SRC_URI[camxtest.sha256sum] = "d49ebcf823d9ba600659080661950a504ed7ec7319d718fd7db85e0440bd5ce0"

do_install:append() {
# Copy json only when /etc folder exists in ${S}
Expand All @@ -22,9 +19,6 @@ do_install:append() {
cp -r ${S}/usr/share/camx ${D}${datadir}
# copy skel file
cp -r ${S}/usr/share/qcom ${D}${datadir}
install -d ${D}${datadir}/qcom/qcs8300/Qualcomm/QCS8300-RIDE/dsp/cdsp
ln -sr ${D}${datadir}/qcom/sa8775p/Qualcomm/SA8775P-RIDE/dsp/cdsp/libbitml_nsp_73nb_skel.so \
${D}${datadir}/qcom/qcs8300/Qualcomm/QCS8300-RIDE/dsp/cdsp/libbitml_nsp_73nb_skel.so
Comment thread
gkhose-qipl marked this conversation as resolved.

# Remove OpenCL-dependent libraries when opencl is not enabled.
if ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'false', 'true', d)}; then
Expand All @@ -37,10 +31,13 @@ do_install:append() {
RPROVIDES:${PN} = "camxlib-monaco"
PACKAGE_BEFORE_PN += "camx-nhx ${PN}-skel"
RDEPENDS:${PN} += "${PN}-skel"
RRECOMMENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'virtual-opencl-icd', '', d)}"
RRECOMMENDS:${PN} += " \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libegl1 libglesv2-2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opencl', '${PREFERRED_PROVIDER_virtual/libopencl1}', '', d)} \
"

FILES:camx-nhx = "\
${bindir}/nhx.sh \
${bindir}/camera-nhx \
${sysconfdir}/camera/test/NHX/ \
"
FILES:${PN}-skel = "\
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PLATFORM = "shikra"
PBT_BUILD_DATE = "260911"

require common.inc

SRC_URI[camxlib.sha256sum] = "e090945d93a9de0fb64470480a87cb63c8773caab9bbf17212b31605f7d6417b"
SRC_URI[camx.sha256sum] = "ef372d5cb3a3f5303d13799e3f866c3f882127fc7bf4d9d80e1d2e131410f7b1"
SRC_URI[chicdk.sha256sum] = "f1ad3e91ce9902bd1135bb36f626741dcae20d5cf0fbafd8e6c6cec2678afa33"
SRC_URI[camxcommon.sha256sum] = "9ce4b129b55c2d81b478e7666dc95377339ab3ffa83a47b2ff2bad9d861d2f97"
SRC_URI[camxtest.sha256sum] = "5cbb58e6d3a2cd7565c68a6a660272ba80951570b881c57d1d276ada1d016f33"

DEPENDS += "sensinghub"
RRECOMMENDS:${PN} += " \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libegl1 libglesv2-2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opencl', '${PREFERRED_PROVIDER_virtual/libopencl1}', '', d)} \
"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PLATFORM = "talos"
PBT_BUILD_DATE = "260910"

require common.inc

SRC_URI[camxlib.sha256sum] = "3f6b90a805a2c16d155cd8e19779d93a1a579e38793ef17841a37623acf0bd2d"
SRC_URI[camx.sha256sum] = "9a9b87a3117ac0ad6d38062e4d3f2772c8675399bb882216dc0fe25860b58777"
SRC_URI[chicdk.sha256sum] = "8c8f13e72bcece296a751b07d8a119a804a9b3769432672d95084b33bec3c384"
SRC_URI[camxcommon.sha256sum] = "adfdcba5f52d42b70223a9bb9d32b9ed497d35210657c5c52701b75a47f23288"
SRC_URI[camxtest.sha256sum] = "e038ed09189db4ee7bb593a586c26965cd7edb30493bf1d2c364377bcd165105"

RRECOMMENDS:${PN} += " \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libegl1 libglesv2-2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opencl', '${PREFERRED_PROVIDER_virtual/libopencl1}', '', d)} \
"

do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'opengl opencl', 'false', 'true', d)}; then
rm -f ${D}${libdir}/camx/${PLATFORM}/camera/components/libiwarp*
rm -f ${D}${libdir}/camx/${PLATFORM}/camera/components/libhidrx*
fi
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SRC_URI = " \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camx-${PLATFORM}_${PV}_armv8-2a.tar.gz;name=camx \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/chicdk-${PLATFORM}_${PV}_armv8-2a.tar.gz;name=chicdk \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camxcommon-${PLATFORM}_${PV}_armv8-2a.tar.gz;name=camxcommon \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camxtest-${PLATFORM}_1.0.38_armv8-2a.tar.gz;name=camxtest \
https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/camxtest-${PLATFORM}_${PV}_armv8-2a.tar.gz;name=camxtest \
Comment thread
gkhose-qipl marked this conversation as resolved.
"

S = "${UNPACKDIR}"
Expand All @@ -41,10 +41,10 @@ do_install:append() {
install -d ${D}${datadir}/doc/chicdk-${PLATFORM}

cp -r ${S}/usr/lib/* ${D}${libdir}
# Install bin files only if /usr/bin exists in ${S}
if [ -d "${S}${bindir}" ]; then
# Install camera-nhx files only if /usr/bin exists in ${S}
if [ -f "${S}${bindir}/camera-nhx" ]; then
install -d ${D}${bindir}
cp -r ${S}/usr/bin/* ${D}${bindir}
cp -r ${S}/usr/bin/camera-nhx ${D}${bindir}
fi
# Install camera-nhx files only if /usr/libexec exists in ${S}
if [ -d "${S}${libexecdir}" ]; then
Expand All @@ -57,6 +57,9 @@ do_install:append() {
rm -f ${D}${libdir}/camx/${PLATFORM}/hw/*${SOLIBSDEV}
rm -f ${D}${libdir}/camx/${PLATFORM}/camera/*${SOLIBSDEV}

# Remove legacy libcamera* libs from the staged image
rm -f ${D}${libdir}/libcamera*
Comment thread
gkhose-qipl marked this conversation as resolved.

# Base docs
install -m 0644 ${S}/usr/share/doc/${BPN}/NOTICE \
${D}${datadir}/doc/${BPN}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
From 205fb1f91d9055c315ff3fcd57579b36f57b2897 Mon Sep 17 00:00:00 2001
From 415d74377b612361f4122a95eca2649050e4fb50 Mon Sep 17 00:00:00 2001
From: Rohit Biradar <rohibira@qti.qualcomm.com>
Date: Fri, 21 Aug 2026 01:17:34 +0530
Subject: [PATCH] Add SELinux policy for nhx.sh
Date: Fri, 11 Sep 2026 12:09:08 +0530
Subject: [PATCH] Add SELinux policy for camera-nhx

The proprietary camera testing script 'nhx.sh' currently executes in the
generic 'initrc_t' domain. This configuration lacks proper process
isolation and fails to define the specific permissions required
by the 'nativehaltest' application it launches.
The proprietary camera testing script 'camera-nhx' launches
'nativehaltest' for camera validation. Define a dedicated SELinux policy
module, qcom_nhx, to transition the launcher and nativehaltest into
confined domains.

Define a new policy module 'qcom_nhx' to transition these tools into
their own confined domains:
- qcom_nhx_launcher_t: For 'nhx.sh', allowing it to read
/sys/devices/soc0/soc_id for SoC detection.
- qcom_nhx_t: For 'nativehaltest', granting access to the CamX framework,
DMA, FastRPC, V4L video nodes, and camera cache directories.
- qcom_nhx_launcher_t: domain for 'camera-nhx', including SoC detection
through /sys/devices/soc0/soc_id.
- qcom_nhx_t: domain for 'nativehaltest', including access to the CamX
framework, DMA, FastRPC, V4L video nodes, camera cache directories,
and related camera runtime resources.

'nhx.sh' is installed to /usr/bin/. 'nativehaltest' is installed to
/usr/libexec/camx-<platform>/ rather than /usr/bin, since /usr/bin
should hold only flat, directly user-invocable executables, not
per-SoC subdirectories. Both depend on the closed-source CamX
framework, so this policy is inappropriate for upstream submission.
The 'camera-nhx' launcher is installed at /usr/bin/camera-nhx.
'nativehaltest' is installed at
/usr/libexec/camx-<platform>/nativehaltest.

Upstream-Status: Inappropriate [Qualcomm specific change]

Expand Down Expand Up @@ -49,14 +46,14 @@ index 0000000..f2dda81
+qcom_nhx = module
diff --git a/policy/modules/services/qcom_nhx.fc b/policy/modules/services/qcom_nhx.fc
new file mode 100644
index 0000000..439993f
index 0000000..73c0a5a
--- /dev/null
+++ b/policy/modules/services/qcom_nhx.fc
@@ -0,0 +1,10 @@
+# File contexts for Qualcomm NHX camera test launcher
+
+# Label the nhx.sh launcher script
+/usr/bin/nhx\.sh -- gen_context(system_u:object_r:qcom_nhx_launcher_exec_t,s0)
+# Label the camera-nhx launcher script
+/usr/bin/camera-nhx -- gen_context(system_u:object_r:qcom_nhx_launcher_exec_t,s0)
+
+# Label nativehaltest binaries for different SoC families
+/usr/libexec/camx-[^/]*/nativehaltest -- gen_context(system_u:object_r:qcom_nhx_exec_t,s0)
Expand All @@ -65,15 +62,15 @@ index 0000000..439993f
+/var/cache/camera(/.*)? gen_context(system_u:object_r:qcom_camera_cache_t,s0)
diff --git a/policy/modules/services/qcom_nhx.if b/policy/modules/services/qcom_nhx.if
new file mode 100644
index 0000000..2f73e8f
index 0000000..0e491a0
--- /dev/null
+++ b/policy/modules/services/qcom_nhx.if
@@ -0,0 +1,89 @@
+## <summary>Qualcomm NHX camera test launcher</summary>
+
+########################################
+## <summary>
+## Execute nhx launcher in the nhx_launcher domain.
+## Execute camera-nhx launcher in the nhx_launcher domain.
+## </summary>
+## <param name="domain">
+## <summary>
Expand All @@ -92,7 +89,7 @@ index 0000000..2f73e8f
+
+########################################
+## <summary>
+## Execute nhx launcher in the nhx_launcher domain, and
+## Execute camera-nhx launcher in the nhx_launcher domain, and
+## allow the specified role the nhx_launcher domain.
+## </summary>
+## <param name="domain">
Expand Down Expand Up @@ -160,7 +157,7 @@ index 0000000..2f73e8f
+')
diff --git a/policy/modules/services/qcom_nhx.te b/policy/modules/services/qcom_nhx.te
new file mode 100644
index 0000000..9ad9303
index 0000000..2815ce2
--- /dev/null
+++ b/policy/modules/services/qcom_nhx.te
@@ -0,0 +1,91 @@
Expand All @@ -184,7 +181,7 @@ index 0000000..9ad9303
+
+########################################
+#
+# qcom_nhx_launcher local policy (nhx.sh)
+# qcom_nhx_launcher local policy (camera-nhx)
+#
+
+gen_require(`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:append:qcom = " \
file://0001-Add-SELinux-policy-for-nhx.sh.patch \
file://0001-Add-SELinux-policy-for-camera-nhx.patch \
Comment thread
gkhose-qipl marked this conversation as resolved.
${@bb.utils.contains('MACHINE_FEATURES', 'optee', '', 'file://0002-Enable-the-tunable-flag-tee_supplicant_qtee.patch', d)} \
file://0003-seatd-allow-self-fifo_file-read-write-for-signal-han.patch \
file://0004-kernel-allow-module-loaders-to-use-net_admin.patch \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ DESCRIPTION = "This recipe provides headers for all Qualcomm CamX stacks"
LICENSE = "LicenseRef-LICENSE.qcom-2"
LIC_FILES_CHKSUM = "file://usr/share/doc/${BPN}/LICENSE.QCOM-2.txt;md5=165287851294f2fb8ac8cbc5e24b02b0"

PBT_BUILD_DATE = "260825"
PBT_BUILD_DATE = "260910"
PBT_BRANCH = "master"
SRC_URI = "https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/component/camx.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto_${PBT_BRANCH}/${BPN}_${PV}_armv8-2a.tar.gz"
SRC_URI[sha256sum] = "f3e66fbea6c554d4e0d515a8810759719fce5753fa75ac1c5caa21a338c5dc31"
SRC_URI[sha256sum] = "8aeab831b04b5f11d56f886f941c098e632ff3bc686549c4f7994fddf6ea9b85"

S = "${UNPACKDIR}"

Expand Down
Loading