From 72cc5898270d1294a702c11666b59e9c4d4e457e Mon Sep 17 00:00:00 2001 From: Hiago De Franco Date: Mon, 14 Jul 2025 10:20:55 -0300 Subject: isp-imx: don't leave systemd service in failed state If no camera is configured in the device tree systemd imx8-isp.service goes to the failed state. Prevent that. Signed-off-by: Max Krummenacher Signed-off-by: Hiago De Franco (cherry picked from commit 7b47635c70471284630bac3914bb27e3950feacb) --- ...rt_isp-don-t-report-error-if-no-camera-is.patch | 31 ++++++++++++++++++++++ recipes-bsp/isp-imx/isp-imx_4.2.2.25.1.bb | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 recipes-bsp/isp-imx/isp-imx/0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch diff --git a/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch b/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch new file mode 100644 index 000000000..930119261 --- /dev/null +++ b/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch @@ -0,0 +1,31 @@ +From 3443f18dc9ab8950071d6299c7a5da86055f3318 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Thu, 19 Jan 2023 15:51:24 +0000 +Subject: [PATCH] isp-imx: start_isp: don't report error if no camera is + configured + +The script currently returns '6' when no known camera is configured +in the device tree. The end result is that the systemd imx8-isp.service +goes to the failed state. +Return '0' in that case as obviously the device tree doesn't have a +camera configured and the service is not needed. + +Upstream-Status: Pending +Signed-off-by: Max Krummenacher +--- + imx/start_isp.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/imx/start_isp.sh b/imx/start_isp.sh +index 95cbc19..d603f8f 100755 +--- a/imx/start_isp.sh ++++ b/imx/start_isp.sh +@@ -74,5 +74,5 @@ elif [ $NR_DEVICE_TREE_OS08A20 -eq 2 ]; then + else + # no device tree found exit with code no device or address + echo "No device tree found for Basler camera or os08a20, check dtb file!" >&2 +- exit 6 ++ exit 0 + fi +-- +2.35.3 diff --git a/recipes-bsp/isp-imx/isp-imx_4.2.2.25.1.bb b/recipes-bsp/isp-imx/isp-imx_4.2.2.25.1.bb index 25ffdd8a1..0a6b4e662 100644 --- a/recipes-bsp/isp-imx/isp-imx_4.2.2.25.1.bb +++ b/recipes-bsp/isp-imx/isp-imx_4.2.2.25.1.bb @@ -7,7 +7,10 @@ DEPENDS = "boost libdrm virtual/libg2d libtinyxml2 jsoncpp patchelf-native" SRC_URI = " \ ${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true \ + ${@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" + IMX_SRCREV_ABBREV = "327f21d" S = "${WORKDIR}/${BP}-${IMX_SRCREV_ABBREV}" -- cgit v1.2.3-54-g00ecf