1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# Copyright 2020-2025 NXP
DESCRIPTION = "i.MX Verisilicon Software ISP"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=bc649096ad3928ec06a8713b8d787eac"
DEPENDS = "boost jsoncpp libdrm libtinyxml2 patchelf-native virtual/libg2d"
SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${ISP_SYSTEMD_PATCH}', '', d)}"
ISP_SYSTEMD_PATCH = "file://0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch"
SRC_URI[sha256sum] = "ab04d9eae4917591ca21f4ae13269c4e5a6f1b8e2f357cca1693682fa9a87249"
IMX_SRCREV_ABBREV = "3cbd4a2"
S = "${UNPACKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
inherit fsl-eula-unpack cmake pkgconfig systemd use-imx-headers
PACKAGECONFIG = ""
# Note: building with tuningext fails with boost 1.87.
# (update to 1.87 with walnascar)
PACKAGECONFIG[tuningext] = "-DTUNINGEXT=1,-DTUNINGEXT=0"
# Build the sub-folder appshell
OECMAKE_SOURCEPATH = "${S}/appshell"
# Use make instead of ninja
OECMAKE_GENERATOR = "Unix Makefiles"
# Workaround for linking issues seen with gold linker
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
SYSTEMD_SERVICE:${PN} = "imx8-isp.service"
EXTRA_OECMAKE += "\
-DSDKTARGETSYSROOT=${STAGING_DIR_HOST} \
-DCMAKE_BUILD_TYPE=release \
-DISP_VERSION=ISP8000NANO_V1802 \
-DPLATFORM=ARM64 \
-DQTLESS=1 \
-DFULL_SRC_COMPILE=1 \
-DWITH_DRM=1 \
-DWITH_DWE=1 \
-DSUBDEV_V4L2=1 \
-DPARTITION_BUILD=0 \
-D3A_SRC_BUILD=0 \
-DIMX_G2D=ON \
-Wno-dev \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
"
do_install() {
# The Makefile unconditionally installs tuningext even if it is not built
if ${@bb.utils.contains('PACKAGECONFIG','tuningext','false','true',d)}; then
touch ${B}/generated/release/bin/tuningext
fi
oe_runmake -f ${S}/Makefile install INSTALL_DIR=${D} SOURCE_DIR=${S}
if ${@bb.utils.contains('PACKAGECONFIG','tuningext','false','true',d)}; then
rm ${D}/opt/imx8-isp/bin/tuningext
fi
# The prebuilt ISP components were linked against jsoncpp 1.9.6
# (SONAME 26). jsoncpp 1.9.7 ships SONAME 27, so update the dynamic
# dependency.
patchelf --replace-needed libjsoncpp.so.26 libjsoncpp.so.27 \
${D}${libdir}/libmedia_server.so \
${D}/opt/imx8-isp/bin/isp_media_server
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}/imx/imx8-isp.service ${D}${systemd_system_unitdir}
fi
}
# The build contains a mix of versioned and unversioned libraries, so
# the default packaging configuration needs some modification so that
# unversioned .so libraries go to the main package and versioned .so
# symlinks go to -dev.
FILES_SOLIBSDEV = ""
FILES:${PN} += "/opt ${libdir}/lib*${SOLIBSDEV}"
FILES:${PN}-dev += "${FILES_SOLIBS_VERSIONED}"
FILES_SOLIBS_VERSIONED = "\
${libdir}/libcppnetlib-client-connections.so \
${libdir}/libcppnetlib-server-parsers.so \
${libdir}/libcppnetlib-uri.so \
${libdir}/libos08a20.so \
"
INSANE_SKIP:${PN} = "already-stripped"
RDEPENDS:${PN} = "libdrm"
COMPATIBLE_MACHINE = "(mx8mp-nxp-bsp)"
|