Improve sim container

This commit is contained in:
2022-01-03 22:14:11 +01:00
parent 5e50cc7142
commit e2e4450a91
4 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,6 @@ FROM dcc/net-to-serial
RUN apk update && apk add qemu-system-avr && mkdir /io
ADD start.sh /opt/dcc
ADD CommandStation-EX-uno-*.elf /io
ADD CommandStation-EX*.elf /io
ENTRYPOINT ["/opt/dcc/start.sh"]

View File

@@ -2,11 +2,12 @@
PTY=0
# if container is run with -ti pts/0 is already taken
if [ -c /dev/pts/0 ]; then
PTY=1
fi
sed -i "s/ttyACM0/pts\/${PTY}/" /opt/dcc/config.ini
qemu-system-avr -machine uno -bios /io/CommandStation-EX-uno-*.elf -serial pty -daemonize
qemu-system-avr -machine uno -bios /io/CommandStation-EX*.elf -serial pty -daemonize
/opt/dcc/net-to-serial.py