Skip to content

Commit 5e6f695

Browse files
Balki01ConchuOD
authored andcommitted
libcamera-mchp: Add libcamera IPA support
Add config and related options to include microchip-isc Image Processing Algorithm(IPA) module as sub-package in the build. Fix meson option syntax by removing a trailing backslash. Signed-off-by: Balakrishnan Sambath <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent dd52915 commit 5e6f695

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

package/libcamera-mchp/Config.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ menuconfig BR2_PACKAGE_LIBCAMERA_MCHP
2222
Microchip's custom libcamera framework.
2323

2424
https://github.com/linux4microchip/libcamera-mchp.git
25+
if BR2_PACKAGE_LIBCAMERA_MCHP
26+
config BR2_PACKAGE_LIBCAMERA_MCHP_IPA
27+
bool "libcamera-mchp IPA module"
28+
default y
29+
help
30+
Enable support for Microchip Image Sensor Controller (ISC)
31+
Image Processing Algorithm module.
32+
endif
2533

2634
comment "libcamera-mchp needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 8"
2735
depends on BR2_PACKAGE_LIBCAMERA_MCHP_ARCH_SUPPORTS

package/libcamera-mchp/libcamera-mchp.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ LIBCAMERA_MCHP_CONF_OPTS = \
3737
-Dv4l2=true \
3838
-Dcam=enabled \
3939
-Dudev=enabled \
40+
-Dipas=microchip-isc \
4041
-Dlc-compliance=disabled \
4142
-Dtest=false \
4243
-Ddocumentation=disabled \
4344
-Dgstreamer=disabled \
44-
-Dpycamera=disabled \
45+
-Dpycamera=disabled
4546

4647
# Open-Source IPA shlibs need to be signed in order to be runnable within the
4748
# same process, otherwise they are deemed Closed-Source and run in another
@@ -66,8 +67,19 @@ define LIBCAMERA_MCHP_INSTALL_SIGN_IPA
6667
./ipa-sign-install.sh $(@D)/build/src/ipa-priv-key.pem ipa_*.so
6768
endef
6869

70+
# Install the IPA module
71+
define LIBCAMERA_MCHP_INSTALL_IPA_MODULE
72+
if [ -f $(@D)/build/src/ipa/microchip-isc/ipa_microchip_isc.so ]; then \
73+
$(INSTALL) -D -m 0755 $(@D)/build/src/ipa/microchip-isc/ipa_microchip_isc.so \
74+
$(TARGET_DIR)/usr/lib/libcamera/ipa_microchip_isc.so ; \
75+
fi
76+
endef
77+
6978
LIBCAMERA_MCHP_POST_BUILD_HOOKS += LIBCAMERA_MCHP_BUILD_STRIP_IPA_SO
7079
LIBCAMERA_MCHP_PRE_INSTALL_TARGET_HOOKS += LIBCAMERA_MCHP_CREATE_DIRS
80+
ifeq ($(BR2_PACKAGE_LIBCAMERA_MCHP_IPA),y)
81+
LIBCAMERA_MCHP_POST_INSTALL_TARGET_HOOKS += LIBCAMERA_MCHP_INSTALL_IPA_MODULE
82+
endif
7183
LIBCAMERA_MCHP_POST_INSTALL_TARGET_HOOKS += LIBCAMERA_MCHP_INSTALL_SIGN_IPA
7284

7385
$(eval $(meson-package))

0 commit comments

Comments
 (0)