diff options
author | Chris Dimich <Chris.Dimich@boundarydevices.com> | 2021-02-15 23:12:10 -0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2021-02-16 11:46:58 -0300 |
commit | 3b91fa80566510e6f787a4212ef93fcc89c54955 (patch) | |
tree | 67cb7a28a6c48e951047f9d5adc9965a8ae3a721 /recipes-bsp/isp-imx | |
parent | c7d908c5dfebb3a1ad19217268ec1a159998250b (diff) | |
download | meta-freescale-3b91fa80566510e6f787a4212ef93fcc89c54955.tar.gz |
isp-imx: add recipe
Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com>
Diffstat (limited to 'recipes-bsp/isp-imx')
3 files changed, 153 insertions, 0 deletions
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch b/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch new file mode 100644 index 00000000..725a9907 --- /dev/null +++ b/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 325b4bf687ead6598de702df9829a4dad0b6458c Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Dimich <Chris.Dimich@boundarydevices.com> | ||
3 | Date: Mon, 15 Feb 2021 22:51:01 -0800 | ||
4 | Subject: [PATCH 1/1] BufferManager.h: add missing header file | ||
5 | |||
6 | Needed to compile with Yocto Gatesgarth. | ||
7 | |||
8 | Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com> | ||
9 | --- | ||
10 | mediacontrol/buffer/BufferManager.h | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/mediacontrol/buffer/BufferManager.h b/mediacontrol/buffer/BufferManager.h | ||
14 | index f5691e111..4d5ce6965 100755 | ||
15 | --- a/mediacontrol/buffer/BufferManager.h | ||
16 | +++ b/mediacontrol/buffer/BufferManager.h | ||
17 | @@ -16,6 +16,7 @@ | ||
18 | #include <deque> | ||
19 | #include <map> | ||
20 | #include <EAutoLock.h> | ||
21 | +#include <stdint.h> | ||
22 | |||
23 | enum { | ||
24 | BUFFER_TYPE_INPUT_FREE = 0, | ||
25 | -- | ||
26 | 2.29.0 | ||
27 | |||
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch b/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch new file mode 100644 index 00000000..cb93223e --- /dev/null +++ b/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 708f25cfe522df162c3e2c7c56cbe2f7000cb5e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gary Bisson <gary.bisson@boundarydevices.com> | ||
3 | Date: Mon, 14 Dec 2020 14:26:01 +0100 | ||
4 | Subject: [PATCH] start_isp.sh: fix test to be generic | ||
5 | |||
6 | So that it works on EVK and any other i.MX 8M Plus platform. | ||
7 | |||
8 | Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> | ||
9 | --- | ||
10 | imx/start_isp.sh | 13 +++++-------- | ||
11 | 1 file changed, 5 insertions(+), 8 deletions(-) | ||
12 | |||
13 | diff --git a/imx/start_isp.sh b/imx/start_isp.sh | ||
14 | index 02ee7d3b5..fee0492ad 100755 | ||
15 | --- a/imx/start_isp.sh | ||
16 | +++ b/imx/start_isp.sh | ||
17 | @@ -7,21 +7,18 @@ | ||
18 | # | ||
19 | |||
20 | RUNTIME_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
21 | -DEVICE_TREE_BASLER=$(grep basler-camera-vvcam /sys/firmware/devicetree/base/soc@0/*/i2c@*/*/compatible -l 2> /dev/null) | ||
22 | - | ||
23 | +BASLER=`dmesg | grep Basler` | ||
24 | |||
25 | # check if the basler device has been enabled in the device tree | ||
26 | -if [ -f "$DEVICE_TREE_BASLER" ]; then | ||
27 | - | ||
28 | +if [ ! -z "$BASLER" ]; then | ||
29 | echo "Starting isp_media_server for Basler daA3840-30mc" | ||
30 | - | ||
31 | cd $RUNTIME_DIR | ||
32 | # Default configuration for Basler daA3840-30mc: basler_4k | ||
33 | # Available configurations: basler_4k, basler_1080p60, basler_4khdr, basler_1080p60hdr | ||
34 | - exec ./run.sh -c basler_4k -lm | ||
35 | - | ||
36 | + #exec ./run.sh -c basler_4k | ||
37 | + exec ./run.sh -c basler_1080p60 | ||
38 | else | ||
39 | # no device tree found exit with code no device or address | ||
40 | - echo "No device tree found for Basler, check dtb file!" >&2 | ||
41 | + echo "Basler camera not found!" >&2 | ||
42 | exit 6 | ||
43 | fi | ||
44 | -- | ||
45 | 2.29.2 | ||
46 | |||
diff --git a/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb b/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb new file mode 100644 index 00000000..fcf9a14a --- /dev/null +++ b/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb | |||
@@ -0,0 +1,80 @@ | |||
1 | # Copyright 2020 NXP | ||
2 | |||
3 | DESCRIPTION = "i.MX Verisilicon Software ISP" | ||
4 | LICENSE = "Proprietary" | ||
5 | LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a" | ||
6 | |||
7 | |||
8 | inherit fsl-eula-unpack cmake systemd | ||
9 | |||
10 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true \ | ||
11 | file://0001-start_isp.sh-fix-test-to-be-generic.patch;patchdir=.. \ | ||
12 | file://0001-BufferManager.h-add-missing-header-file.patch;patchdir=.. \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "2246009411af32b1e02fbb0b242a0fc0" | ||
16 | SRC_URI[sha256sum] = "7a245abb5fee23319f59b970db0bb014a2932fd6d5bd44f16f7dd31bbe25003a" | ||
17 | |||
18 | S = "${WORKDIR}/${PN}-${PV}/appshell" | ||
19 | |||
20 | DEPENDS = "python3 libdrm" | ||
21 | |||
22 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
23 | |||
24 | SYSTEMD_SERVICE_${PN} = "imx8-isp.service" | ||
25 | |||
26 | EXTRA_OECMAKE += " \ | ||
27 | -DCMAKE_BUILD_TYPE=release \ | ||
28 | -DISP_VERSION=ISP8000NANO_V1802 \ | ||
29 | -DPLATFORM=ARM64 \ | ||
30 | -DAPPMODE=V4L2 \ | ||
31 | -DQTLESS=1 \ | ||
32 | -DFULL_SRC_COMPILE=1 \ | ||
33 | -DWITH_DRM=1 \ | ||
34 | -DWITH_DWE=1 \ | ||
35 | -DSERVER_LESS=1 \ | ||
36 | -DSUBDEV_V4L2=1 \ | ||
37 | -DENABLE_IRQ=1 \ | ||
38 | -DPARTITION_BUILD=0 \ | ||
39 | -D3A_SRC_BUILD=0 \ | ||
40 | -Wno-dev \ | ||
41 | " | ||
42 | |||
43 | do_configure_prepend() { | ||
44 | export SDKTARGETSYSROOT=${STAGING_DIR_HOST} | ||
45 | } | ||
46 | |||
47 | do_install() { | ||
48 | install -d ${D}/${libdir} | ||
49 | install -d ${D}/${includedir} | ||
50 | install -d ${D}/opt/imx8-isp/bin | ||
51 | |||
52 | cp -r ${WORKDIR}/build/generated/release/bin/*_test ${D}/opt/imx8-isp/bin | ||
53 | cp -r ${WORKDIR}/build/generated/release/bin/*2775* ${D}/opt/imx8-isp/bin | ||
54 | cp -r ${WORKDIR}/build/generated/release/bin/isp_media_server ${D}/opt/imx8-isp/bin | ||
55 | cp -r ${WORKDIR}/build/generated/release/bin/vvext ${D}/opt/imx8-isp/bin | ||
56 | cp -r ${WORKDIR}/${PN}-${PV}/mediacontrol/case/ ${D}/opt/imx8-isp/bin | ||
57 | cp -r ${WORKDIR}/build/generated/release/lib/*.so* ${D}/${libdir} | ||
58 | cp -r ${WORKDIR}/build/generated/release/include/* ${D}/${includedir} | ||
59 | |||
60 | cp ${WORKDIR}/${PN}-${PV}/imx/run.sh ${D}/opt/imx8-isp/bin | ||
61 | cp ${WORKDIR}/${PN}-${PV}/imx/start_isp.sh ${D}/opt/imx8-isp/bin | ||
62 | |||
63 | chmod +x ${D}/opt/imx8-isp/bin/run.sh | ||
64 | chmod +x ${D}/opt/imx8-isp/bin/start_isp.sh | ||
65 | |||
66 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
67 | install -d ${D}${systemd_system_unitdir} | ||
68 | install -m 0644 ${WORKDIR}/${PN}-${PV}/imx/imx8-isp.service ${D}${systemd_system_unitdir} | ||
69 | fi | ||
70 | } | ||
71 | |||
72 | RDEPENDS_${PN} = "libdrm libpython3 bash" | ||
73 | |||
74 | PACKAGES = "${PN} ${PN}-dev ${PN}-dbg" | ||
75 | |||
76 | FILES_${PN} = "${libdir} /opt ${systemd_system_unitdir}/imx8-isp.service" | ||
77 | FILES_${PN}-dbg += "${libdir}/.debug" | ||
78 | |||
79 | INSANE_SKIP_${PN} += "rpaths dev-deps dev-so" | ||
80 | INSANE_SKIP_${PN}-dev += "rpaths dev-elf" | ||