Tools for running FPGA vendor toolchains with Docker
This repository contains a series of tools to create sandboxed Docker containers for running various FPGA development tools on Linux.
The motivation for this project was to avoid having to install a bunch of system-wide dependencies since most of these tools require 32-bit libraries to run.
Edit the top-level Makefile
to control which containers will be built. A
common base image will be built that each tool uses to reduce overall container
size and build time.
Run make
and all the desired containers will be built. Many of the tools will
download their installers automatically but some require you to log in to the
vendor's site and download manually (Xilinx ISE).
In the case of Lattice iCEcube2, the GUI installer must be used and will launch
automatically. Heed the directions printed to the console before it launches.
Additionally, a license file will need to be acquired separately from Lattice
before building the container. Further instructions can be found in the
README.md
within that subdirectory.
Once the containers are built, you can run them with the run-fpga
tool in the
top directory. A unique home
directory for each tool is created and mounted
into the container along with a shared directory mounted to ~/shared so changes
will persist between runs and settings can be kept separate for each tool. If
you want to control the location of the home directories or change other
options, see the run-fpga
script. After exiting the tool, the container is
deleted (but not the image or home directory).
No user data is stored inside the container as long as you only manipulate data within the home directory. Any data not in your home directory will be lost after closing the tool.
docker
group)qemu-nbd
and the nbd kernel driver installed and root access via sudo. An alternate
method that uses much more disk space can be implemented, but would still
require root access to loop mount a filesystem image.iptables
rules to a container, either edit the fpga
script in the
fpga-base/<operating system>
(most use the centos6 flavor) directory or create
a script in home/<tool>/.fpga-docker/startup.sh
. If you are using a local X11
server via UNIX socket you can disable network entirely by adding --network none
to the docker run
command at the end of the run-fpga
script.