summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2020-11-18 13:27:56 +0000
committerCorentin LABBE <clabbe@baylibre.com>2020-11-23 10:01:35 +0000
commit90e298003a22ad0a91e35a7a987c57503a7dd31f (patch)
tree580936a78e4c436e08246f7b1278093ae046a806
parent7151f9ebc95495b0eb3beb6ee556737a5c6ed163 (diff)
Remove screen support
When I have added screen support, it was a hack for made M3ulcb serial console works. But for a long time ser2net works on m3ulcb. So lava-docker discouraged usage of screen and now it is time to remove it.
-rw-r--r--README.md2
-rw-r--r--lava-slave/Dockerfile5
-rw-r--r--lava-slave/lava-screen.conf0
-rwxr-xr-xlava-slave/scripts/start.sh13
-rwxr-xr-xlavalab-gen.py16
5 files changed, 2 insertions, 34 deletions
diff --git a/README.md b/README.md
index 220221b..bbc8c15 100644
--- a/README.md
+++ b/README.md
@@ -344,7 +344,6 @@ boards:
ser2net_options: (optional) A list of ser2net options to add
- option1
- option2
- use_screen: True/False (Use screen via ssh instead of ser2net)
connection_command: A command to be ran for getting a serial console
pdu_generic:
hard_reset_command: commandline to reset the board
@@ -353,7 +352,6 @@ boards:
```
Notes on UART:
* Only one of devpath/serial is necessary.
-* screen usage is discouraged and should not be used, it was added as a workaround for some boards, but ser2net now can handle them.
* For finding the right devpath, you could use
```
udevadm info -a -n /dev/ttyUSBx |grep devpath | head -n1
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index b37f7a6..bb59174 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -68,11 +68,6 @@ RUN chmod +x /root/entrypoint.d/*
RUN if [ -x /usr/local/bin/extra_actions ] ; then /usr/local/bin/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/
-
COPY zmq_auth/ /etc/lava-dispatcher/certificates.d/
EXPOSE 69/udp 80
diff --git a/lava-slave/lava-screen.conf b/lava-slave/lava-screen.conf
deleted file mode 100644
index e69de29..0000000
--- a/lava-slave/lava-screen.conf
+++ /dev/null
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
index 334f52e..8d7882f 100755
--- a/lava-slave/scripts/start.sh
+++ b/lava-slave/scripts/start.sh
@@ -25,19 +25,6 @@ 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; python3 -m http.server 80) &
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 66bc193..ff0e717 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -44,10 +44,6 @@ template_device_ser2net = string.Template("""
{% set connection_command = 'telnet 127.0.0.1 ${port}' %}
""")
-template_device_screen = string.Template("""
-{% set connection_command = 'ssh -o StrictHostKeyChecking=no -t root@127.0.0.1 "TERM=xterm screen -x ${board}"' %}
-""")
-
template_settings_conf = string.Template("""
{
"DEBUG": false,
@@ -728,17 +724,14 @@ def main():
dockcomp_add_device(dockcomp, worker_name, "/dev/%s:/dev/%s" % (board_name, board_name))
use_conmux = False
use_ser2net = False
- use_screen = False
- if "use_screen" in uart:
- use_screen = uart["use_screen"]
if "use_conmux" in uart:
use_conmux = uart["use_conmux"]
if "use_ser2net" in uart:
use_ser2net = uart["use_ser2net"]
- if (use_conmux and use_ser2net) or (use_conmux and use_screen) or (use_screen and use_ser2net):
+ if (use_conmux and use_ser2net):
print("ERROR: Only one uart handler must be configured")
sys.exit(1)
- if not use_conmux and not use_screen and not use_ser2net and not "connection_command" in board:
+ if not use_conmux and not use_ser2net and not "connection_command" in board:
use_ser2net = True
if use_conmux:
conmuxline = template_conmux.substitute(board=board_name, baud=baud)
@@ -761,11 +754,6 @@ def main():
fp = open("%s/ser2net.conf" % workerdir, "a")
fp.write(ser2net_line + " banner\n")
fp.close()
- if use_screen:
- device_line += template_device_screen.substitute(board=board_name)
- fp = open("%s/lava-screen.conf" % workerdir, "a")
- fp.write("%s\n" % board_name)
- fp.close()
if "connection_command" in board:
connection_command = board["connection_command"]
device_line += template_device_connection_command.substitute(connection_command=connection_command)