gekkio / docker-fpga Goto Github PK
View Code? Open in Web Editor NEWDockerized FPGA toolchain experiments
License: The Unlicense
Dockerized FPGA toolchain experiments
License: The Unlicense
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?
Lattice Diamond 3.11 has been released.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.