Update OpenGL/OpenCL dependencies in camxlib#2560
Conversation
| COMPONENT_PATH="${D}${libdir}/camx/kodiak" | ||
|
|
||
| # Remove OpenCL-dependent files when opencl is not enabled. | ||
| if [ "${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'yes', 'no', d)}" = "no" ]; then |
There was a problem hiding this comment.
if ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'false', 'yrue', d)}; then
|
|
||
| # Remove all shared libraries that dynamically link against libOpenCL | ||
| for lib in $(find "${COMPONENT_PATH}" -type f -name "*.so*"); do | ||
| if readelf -d "$lib" 2>/dev/null | grep -q "libOpenCL\.so"; then |
There was a problem hiding this comment.
You know the libraries which use CL. Use the list instead of using readelf.
| fi | ||
|
|
||
| # Remove OpenGL/EGL-dependent libraries when opengl is not enabled. | ||
| if [ "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'yes', 'no', d)}" = "no" ]; then |
There was a problem hiding this comment.
Same comments
There was a problem hiding this comment.
done
| fi | ||
| done | ||
| # Remove dangling symlinks left after removing OpenGL-dependent libraries | ||
| find "${COMPONENT_PATH}" -name "*.so*" -xtype l -delete 2>/dev/null || true |
97a5164 to
134cc03
Compare
|
Updated PR with new changes. |
134cc03 to
656395a
Compare
| rm -f ${D}${libdir}/camx/kodiak/*.cl | ||
| rm -f ${D}${libdir}/camx/kodiak/lib_algo_svhdr* | ||
| rm -f ${D}${libdir}/camx/kodiak/camera/components/libshdr3* | ||
| rm -f ${D}${libdir}/camx/kodiak/camera/components/libbanding_correction* |
There was a problem hiding this comment.
No improvement. You are still removing unwanted paths instead of installing only the required binaries.
There was a problem hiding this comment.
can u pls suggest reference solution where we can exclude opencl and opengl dependent libs and install other libs.
There was a problem hiding this comment.
| SRC_URI[chicdk.sha256sum] = "9b08fe81bc9177826fe5d9aff185de16bdb216cab20304bfea60a8c8a5c2eb48" | ||
| SRC_URI[camxcommon.sha256sum] = "9e8a7b595242916962bb018f2dffc3136c399f1bf80b0aecd91f4ac97f6293f9" | ||
|
|
||
| DEPENDS += "virtual/egl virtual/libgles2 ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'qcom-adreno virtual/libopencl1', '', d)}" |
There was a problem hiding this comment.
Change-Id: Ib67d464be8f89cf16cfb25065ceb190bef9fe43f
Please remove Gerrit git hooks from your work environment. This repo doesn't use Gerrint and will never use it in future.
There was a problem hiding this comment.
done
656395a to
cfa40f7
Compare
Dmitry Baryshkov (lumag)
left a comment
There was a problem hiding this comment.
Started the build at https://github.com/qualcomm-linux/meta-qcom/actions/runs/27944462314, let's see the outcome.
Remove hard dependency on OpenGL (EGL/GLES2) and OpenCL libraries and make them optional based on DISTRO_FEATURES. This ensures camx builds successfully when opengl/opencl features are disabled and aligns with Yocto best practices for optional GPU/compute components. Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
Introduce DISTRO_FEATURES-based handling for OpenCL and OpenGL (EGL/GLES2) dependencies. Added guard logic to remove OpenCL/OpenGL dependent libs when opengl/opencl distro features are disabled. This ensures camx builds successfully when opengl/opencl features are disabled and aligns with Yocto best practices for optional GPU/compute components. Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
Introduce DISTRO_FEATURES-based handling for OpenCL and OpenGL (EGL/GLES2) dependencies. Added guard logic to remove OpenCL/OpenGL dependent libs when opengl/opencl distro features are disabled. This ensures camx builds successfully when opengl/opencl features are disabled and aligns with Yocto best practices for optional GPU/compute components. Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
cfa40f7 to
b4a0152
Compare
|
This has been tested in -next, merging now. |
b7a9544
into
qualcomm-linux:master

camxlib-kodiak: guard OpenGL/OpenCL dependencies
Replace unconditional dependency on OpenGL (EGL/GLES2) and
OpenCL libraries with DISTRO_FEATURES-based guards.
This ensures the dependencies are enabled only when
opengl/opencl features are present, allowing camx to build
successfully in configurations where these features are disabled.
camxlib-lemans: Updated OpenGL/OpenCL dependency handling
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.
Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.
This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.
camxlib-talos: Updated OpenGL/OpenCL dependency handling
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.
Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.
This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.
qli-2.0 GA Critical Fix