diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2018-06-08 11:14:55 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2018-07-12 14:07:37 +0200 |
commit | 72fce7856928dbae032eee15a1cd5a8b8c9ce384 (patch) | |
tree | 0601538174edd4529c47dff5c23d6d1c0b601167 /lava-slave | |
parent | 615e0d597510736dab68e41bd9dc002da6b2514f (diff) |
Support screen for uart
This patch add support for using screen instead of conmux-console.
screen can be used by adding "use_screen: True" to uart.
screen is necessary for some board with internal uart which have a micro
cut when switching power (like DRA7-EVM and M3ULCB)
Diffstat (limited to 'lava-slave')
-rw-r--r-- | lava-slave/Dockerfile | 5 | ||||
-rw-r--r-- | lava-slave/lava-screen.conf | 0 | ||||
-rwxr-xr-x | lava-slave/scripts/start.sh | 13 |
3 files changed, 18 insertions, 0 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile index 11ef6c8..a5b0148 100644 --- a/lava-slave/Dockerfile +++ b/lava-slave/Dockerfile @@ -81,6 +81,11 @@ COPY devices/ /root/devices/ COPY scripts/extra_actions /root/ RUN if [ -x /root/extra_actions ] ; then /root/extra_actions ; fi +RUN apt-get -y install screen openssh-server +RUN ssh-keygen -q -f /root/.ssh/id_rsa +RUN cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys +COPY lava-screen.conf /root/ + EXPOSE 69/udp 80 CMD /start.sh diff --git a/lava-slave/lava-screen.conf b/lava-slave/lava-screen.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lava-slave/lava-screen.conf diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh index ef6eb68..21b6903 100755 --- a/lava-slave/scripts/start.sh +++ b/lava-slave/scripts/start.sh @@ -23,6 +23,19 @@ do /usr/sbin/conmux $item & done +HAVE_SCREEN=0 +while read screenboard +do + echo "Start screen for $screenboard" + TERM=xterm screen -d -m -S $screenboard /dev/$screenboard 115200 -ixoff -ixon || exit 9 + HAVE_SCREEN=1 +done < /root/lava-screen.conf +if [ $HAVE_SCREEN -eq 1 ];then + sed -i 's,UsePAM.*yes,UsePAM no,' /etc/ssh/sshd_config || exit 10 + service ssh start || exit 11 +fi + + # start an http file server for boot/transfer_overlay support (cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80) & |