summaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/Dockerfile5
-rwxr-xr-xlava-slave/scripts/cu-loop11
-rwxr-xr-xlava-slave/scripts/start.sh9
3 files changed, 25 insertions, 0 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index 6aece71..e87ac63 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -17,6 +17,8 @@ RUN \
git \
vim \
sudo \
+ cu \
+ conmux \
python-setproctitle \
tftpd-hpa \
u-boot-tools \
@@ -50,6 +52,9 @@ COPY configs/lava-slave /etc/lava-dispatcher/lava-slave
COPY configs/tftpd-hpa /etc/default/tftpd-hpa
+COPY scripts/cu-loop /usr/local/bin/
+COPY conmux/* /etc/conmux/
+
#TODO made this customizable, 1000 ports by default is too much
RUN sed -i 's,XNBD_PORT_RANGE_MIN.*,XNBD_PORT_RANGE_MIN=55950,' /usr/lib/python2.7/dist-packages/lava_dispatcher/pipeline/utils/constants.py
diff --git a/lava-slave/scripts/cu-loop b/lava-slave/scripts/cu-loop
new file mode 100755
index 0000000..fbe5777
--- /dev/null
+++ b/lava-slave/scripts/cu-loop
@@ -0,0 +1,11 @@
+#!/bin/sh
+DEV=$1
+BAUD=${2:-115200}
+
+while true; do
+ # NOTE: needs cu >= 1.07-24
+ # c.f. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336996
+ test -e $DEV && cu -l $DEV -s $BAUD --parity=none --nostop --nortscts dir
+ sleep 0.2
+done
+
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
index f442e8d..dcbbcd7 100755
--- a/lava-slave/scripts/start.sh
+++ b/lava-slave/scripts/start.sh
@@ -10,5 +10,14 @@ service tftpd-hpa start || exit 4
rm -f /var/run/lava-slave.pid
service lava-slave start || exit 5
+touch /var/run/conmux-registry
+/usr/sbin/conmux-registry 63000 /var/run/conmux-registry&
+sleep 2
+for item in $(ls /etc/conmux/*cf)
+do
+ echo "Add $item"
+ /usr/sbin/conmux $item &
+done
+
# start an http file server for boot/transfer_overlay support
(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80)