summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2023-01-19 17:22:58 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2023-01-26 14:23:06 +0100
commit99ee02c1aa0bae9f66ae78248a337366a128b620 (patch)
treec776fd4288271eeb3711e8724c42d523c3088d46
parentf03d2d482913dc75b550ef92cb789679e5cdd226 (diff)
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. Related-to: ELB-5002 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 9baec9cc6777638b44249877d453d03fcb298632)
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch32
-rw-r--r--recipes-bsp/isp-imx/isp-imx_%.bbappend4
2 files changed, 36 insertions, 0 deletions
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 0000000..2adcf8e
--- /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,32 @@
+From 3443f18dc9ab8950071d6299c7a5da86055f3318 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+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.
+
+Related-to: ELB-5002
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ 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_%.bbappend b/recipes-bsp/isp-imx/isp-imx_%.bbappend
new file mode 100644
index 0000000..ff5a0bf
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx_%.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/isp-imx/:"
+SRC_URI:append:tdx = " \
+ file://0001-isp-imx-start_isp-don-t-report-error-if-no-camera-is.patch \
+"