All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Tim.Bird@sony.com>
To: lixm.fnst@cn.fujitsu.com, fuego@lists.linuxfoundation.org
Cc: kyohhei.oki@denso-ten.com
Subject: Re: [Fuego] Problem of cant find a serial device in the	Functional.serial_rx
Date: Fri, 13 Jul 2018 20:53:40 +0000	[thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF7C1A0E01@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <62079D2F712F7747B0BDCC6821B8DF0D013D17C6@G08CNEXMBPEKD02.g08.fujitsu.local>



> -----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


  reply	other threads:[~2018-07-13 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  2:12 [Fuego] Problem of cant find a serial device in the Functional.serial_rx Li, Xiaoming
2018-07-13 20:53 ` Tim.Bird [this message]
2018-07-17  9:48   ` Li, Xiaoming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ECADFF3FD767C149AD96A924E7EA6EAF7C1A0E01@USCULXMSG01.am.sony.com \
    --to=tim.bird@sony.com \
    --cc=fuego@lists.linuxfoundation.org \
    --cc=kyohhei.oki@denso-ten.com \
    --cc=lixm.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.