From e57d7e2a91f42a8fc9ea544d6fb954e2318e2696 Mon Sep 17 00:00:00 2001 From: Chris Dimich Date: Mon, 15 Feb 2021 23:12:10 -0800 Subject: isp-imx: add recipe Signed-off-by: Chris Dimich (cherry picked from commit 3b91fa80566510e6f787a4212ef93fcc89c54955) --- ...1-BufferManager.h-add-missing-header-file.patch | 27 ++++++++ .../0001-start_isp.sh-fix-test-to-be-generic.patch | 46 +++++++++++++ recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb | 80 ++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch create mode 100644 recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch create mode 100644 recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb 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 @@ +From 325b4bf687ead6598de702df9829a4dad0b6458c Mon Sep 17 00:00:00 2001 +From: Chris Dimich +Date: Mon, 15 Feb 2021 22:51:01 -0800 +Subject: [PATCH 1/1] BufferManager.h: add missing header file + +Needed to compile with Yocto Gatesgarth. + +Signed-off-by: Chris Dimich +--- + mediacontrol/buffer/BufferManager.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mediacontrol/buffer/BufferManager.h b/mediacontrol/buffer/BufferManager.h +index f5691e111..4d5ce6965 100755 +--- a/mediacontrol/buffer/BufferManager.h ++++ b/mediacontrol/buffer/BufferManager.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + enum { + BUFFER_TYPE_INPUT_FREE = 0, +-- +2.29.0 + 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 @@ +From 708f25cfe522df162c3e2c7c56cbe2f7000cb5e4 Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Mon, 14 Dec 2020 14:26:01 +0100 +Subject: [PATCH] start_isp.sh: fix test to be generic + +So that it works on EVK and any other i.MX 8M Plus platform. + +Signed-off-by: Gary Bisson +--- + imx/start_isp.sh | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/imx/start_isp.sh b/imx/start_isp.sh +index 02ee7d3b5..fee0492ad 100755 +--- a/imx/start_isp.sh ++++ b/imx/start_isp.sh +@@ -7,21 +7,18 @@ + # + + RUNTIME_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +-DEVICE_TREE_BASLER=$(grep basler-camera-vvcam /sys/firmware/devicetree/base/soc@0/*/i2c@*/*/compatible -l 2> /dev/null) +- ++BASLER=`dmesg | grep Basler` + + # check if the basler device has been enabled in the device tree +-if [ -f "$DEVICE_TREE_BASLER" ]; then +- ++if [ ! -z "$BASLER" ]; then + echo "Starting isp_media_server for Basler daA3840-30mc" +- + cd $RUNTIME_DIR + # Default configuration for Basler daA3840-30mc: basler_4k + # Available configurations: basler_4k, basler_1080p60, basler_4khdr, basler_1080p60hdr +- exec ./run.sh -c basler_4k -lm +- ++ #exec ./run.sh -c basler_4k ++ exec ./run.sh -c basler_1080p60 + else + # no device tree found exit with code no device or address +- echo "No device tree found for Basler, check dtb file!" >&2 ++ echo "Basler camera not found!" >&2 + exit 6 + fi +-- +2.29.2 + 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 @@ +# Copyright 2020 NXP + +DESCRIPTION = "i.MX Verisilicon Software ISP" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a" + + +inherit fsl-eula-unpack cmake systemd + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true \ + file://0001-start_isp.sh-fix-test-to-be-generic.patch;patchdir=.. \ + file://0001-BufferManager.h-add-missing-header-file.patch;patchdir=.. \ +" + +SRC_URI[md5sum] = "2246009411af32b1e02fbb0b242a0fc0" +SRC_URI[sha256sum] = "7a245abb5fee23319f59b970db0bb014a2932fd6d5bd44f16f7dd31bbe25003a" + +S = "${WORKDIR}/${PN}-${PV}/appshell" + +DEPENDS = "python3 libdrm" + +OECMAKE_GENERATOR = "Unix Makefiles" + +SYSTEMD_SERVICE_${PN} = "imx8-isp.service" + +EXTRA_OECMAKE += " \ + -DCMAKE_BUILD_TYPE=release \ + -DISP_VERSION=ISP8000NANO_V1802 \ + -DPLATFORM=ARM64 \ + -DAPPMODE=V4L2 \ + -DQTLESS=1 \ + -DFULL_SRC_COMPILE=1 \ + -DWITH_DRM=1 \ + -DWITH_DWE=1 \ + -DSERVER_LESS=1 \ + -DSUBDEV_V4L2=1 \ + -DENABLE_IRQ=1 \ + -DPARTITION_BUILD=0 \ + -D3A_SRC_BUILD=0 \ + -Wno-dev \ +" + +do_configure_prepend() { + export SDKTARGETSYSROOT=${STAGING_DIR_HOST} +} + +do_install() { + install -d ${D}/${libdir} + install -d ${D}/${includedir} + install -d ${D}/opt/imx8-isp/bin + + cp -r ${WORKDIR}/build/generated/release/bin/*_test ${D}/opt/imx8-isp/bin + cp -r ${WORKDIR}/build/generated/release/bin/*2775* ${D}/opt/imx8-isp/bin + cp -r ${WORKDIR}/build/generated/release/bin/isp_media_server ${D}/opt/imx8-isp/bin + cp -r ${WORKDIR}/build/generated/release/bin/vvext ${D}/opt/imx8-isp/bin + cp -r ${WORKDIR}/${PN}-${PV}/mediacontrol/case/ ${D}/opt/imx8-isp/bin + cp -r ${WORKDIR}/build/generated/release/lib/*.so* ${D}/${libdir} + cp -r ${WORKDIR}/build/generated/release/include/* ${D}/${includedir} + + cp ${WORKDIR}/${PN}-${PV}/imx/run.sh ${D}/opt/imx8-isp/bin + cp ${WORKDIR}/${PN}-${PV}/imx/start_isp.sh ${D}/opt/imx8-isp/bin + + chmod +x ${D}/opt/imx8-isp/bin/run.sh + chmod +x ${D}/opt/imx8-isp/bin/start_isp.sh + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/${PN}-${PV}/imx/imx8-isp.service ${D}${systemd_system_unitdir} + fi +} + +RDEPENDS_${PN} = "libdrm libpython3 bash" + +PACKAGES = "${PN} ${PN}-dev ${PN}-dbg" + +FILES_${PN} = "${libdir} /opt ${systemd_system_unitdir}/imx8-isp.service" +FILES_${PN}-dbg += "${libdir}/.debug" + +INSANE_SKIP_${PN} += "rpaths dev-deps dev-so" +INSANE_SKIP_${PN}-dev += "rpaths dev-elf" -- cgit v1.2.3-54-g00ecf