summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/sllin/files
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-11-07 08:08:43 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-11-08 02:36:29 +0000
commit736893d0d9810a133e41ddcbd2fe7ef608d2841b (patch)
tree85d7cbb83c267fd3bae36ec56a201a0e0a90e747 /recipes-kernel/sllin/files
parentb3610d066f49a64e1c0c9f366ec1420e101a389d (diff)
Finalize and automate sllin setup for LIN on demo unit
Provide the systemd unit, the init script, the module options and the autoload command. Change-Id: I8dfe59338f377ca8ac1b94fe568dff9e2b36bf97 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-kernel/sllin/files')
-rw-r--r--recipes-kernel/sllin/files/sllin-demo.service13
-rwxr-xr-xrecipes-kernel/sllin/files/start_lin_demo.sh51
2 files changed, 64 insertions, 0 deletions
diff --git a/recipes-kernel/sllin/files/sllin-demo.service b/recipes-kernel/sllin/files/sllin-demo.service
new file mode 100644
index 000000000..c1bc94982
--- /dev/null
+++ b/recipes-kernel/sllin/files/sllin-demo.service
@@ -0,0 +1,13 @@
+[Unit]
+Description = LIN DEMO startup
+After=afm-system-daemon.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/lin_ldattach
+ExecStart=/usr/bin/start_lin_demo.sh
+RemainAfterExit=yes
+
+
+[Install]
+WantedBy=default.target
diff --git a/recipes-kernel/sllin/files/start_lin_demo.sh b/recipes-kernel/sllin/files/start_lin_demo.sh
new file mode 100755
index 000000000..741189fb7
--- /dev/null
+++ b/recipes-kernel/sllin/files/start_lin_demo.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+sleep 1
+ldattach 25 /dev/ttySC3
+pidof ldattach > /var/run/lin_ldattach
+sleep 1
+ip link set sllin0 up
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 02A#
+usleep 100000
+cansend sllin0 02B#
+usleep 100000
+cansend sllin0 032#F0F8FFFFFFFFFFFF
+usleep 100000
+cansend sllin0 032#F0F8FFFFFFFFFFFF
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 02D#
+usleep 100000
+cansend sllin0 02C#
+usleep 100000
+cansend sllin0 02D#
+usleep 100000
+cansend sllin0 02C#
+usleep 100000
+