RTSYork / VLAB

The RTS Virtual Lab
https://wiki.york.ac.uk/display/RTS/The+RTS+Virtual+Lab
GNU General Public License v3.0
9 stars 2 forks source link

Make Digilent boards work more reliably #26

Closed RussellJoyce closed 4 years ago

RussellJoyce commented 4 years ago

It is possible for the Digilent scripts that fire from udev for removing the JTAG tty device node to not fire the first time a board is connected after a reboot (or if the board is connected on power up), therefore causing the scripts to fire when someone first connects to a board and issues a JTAG command (e.g. when programming the FPGA).

This currently causes the detach script to fire at this point, as one of the tty devices will disappear, which kills the Docker container, disconnects the user, and leaves the board unavailable until it's picked up by the next board scan cronjob.

This only seems to happen once per physical board, but that's still not great given that means it'll happen 30 times for the 30 Zybo boards after every reboot...

Possible fixes could be making sure the Digilent scripts definitely run for every board somehow, or modifying the detach script to check if it's a genuine board detach or not (and whether Docker is ok with this).

RussellJoyce commented 4 years ago

Running any Digilent Adapt utility on a board seems to trigger the required tty disconnect.

E.g. running dadutil enum will remove all rogue tty nodes in the system.