[Fuego] Problem of cant find a serial device in the Functional.serial_rx

Tim.Bird at sony.com Tim.Bird at sony.com
Fri Jul 13 20:53:40 UTC 2018



> -----Original Message-----
> From: Li, Xiaoming
> 
> I am working on the Functional.serial_rx test suite,and found  a  problem.
> 
> As u know,  Functional.serial_rx tests  the seria port,  receive and send
> capacity between  host and board.
>  
> But,   the  fuego install script  do not create a  virtual serial device in the
> docker.   So it just cant work.
> 
> Below  is my  method to solve this problem,    anyone knows a better one ? 
> 
> diff --git a/fuego-host-scripts/docker-create-container.sh b/fuego-host-
> scripts/docker-create-container.sh
> 
> index 59cce3d..c8f1231 100755
> 
> --- a/fuego-host-scripts/docker-create-container.sh
> 
> +++ b/fuego-host-scripts/docker-create-container.sh
> 
> @@ -23,5 +23,10 @@ sudo docker create -it --name ${DOCKERCONTAINER} \
> 
>      -v $DIR/../fuego-rw:/fuego-rw \
> 
>      -v $DIR/../fuego-ro:/fuego-ro:ro \
> 
>      -v $DIR/../../fuego-core:/fuego-core:ro \
> 
> +    --device /dev/ttyUSB0:/dev/ttyS0 \
> 
> +    --device /dev/ttyUSB1:/dev/ttyS1 \
> 
> +    --device /dev/ttyUSB2:/dev/ttyS2 \
> 
> +    --device /dev/ttyUSB3:/dev/ttyS3 \
> 
> +    --device /dev/ttyUSB4:/dev/ttyS4 \
> 
>      --net="host" ${DOCKERIMAGE} || \
> 
>      echo "Could not create fuego-container. See error messages."

Using --device in docker-create-container will only work if the
devices are static (that is, they don't appear and disapper), and
if the devices are present when the container is started.

See docker-create-usb-privileged-container.sh instead, which worked
for me when I was testing the serial port test in my lab.  That script creates
volume mounts for /dev/bus/usb and /dev/serial, along with volume
mounts for a number of specific devices (ttyACM[01], and ttyUSB0).
You can expand this to include the serial devices that will show up
in your lab.

In my lab, as boards are rebooted their USB and ACM connections
appear and disappear, which makes using --device problematic.

If needed, you can even do '-v /dev:/dev'.  This is a rather drastic
measure to take, but it should get the job done.

Please try this out and let me know if it works for your situation.
 -- Tim



More information about the Fuego mailing list