Coder Social home page Coder Social logo

docker-fpga's Issues

Container segfault when attempting to program

After starting up the container, opening an existing Diamond project, and then going to Tools > Programmer, the main container process (i.e. the Diamond IDE) exits due to a segfault. For the physical programmer, I am using a Lattice HW-USBN-2B programmer cable. Note that I also manually named the docker container and prevented it from being deleted after exiting.

Checking the container logs I see this:

user@host:~/docker-fpga/lattice-diamond$ docker logs diamond-3.11-sp1
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
/opt/docker-fpga/run.sh: line 5:     9 Segmentation fault      (core dumped) diamond

Indeed, the USB device file is only writable by root:

user@host:~$ ls -l /dev/bus/usb/002/006
crw-rw-r-- 1 root root 189, 133 Dec 20 12:12 /dev/bus/usb/002/006

Is this expected? The user I am running the container under is a member of the "docker" group so it is able to run docker commands however it is not running as the root user of the host so the permission problems are to be expected if it is trying to write to /dev/bus/usb/002/006. I also tried using sudo docker start diamond-3.11-sp1 to re-start the existing container as root but I still got the same permission problems followed by a segfault.

What is the proper solution here? Perhaps a udev rule is needed for the programmer?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.