-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2] - Add basic image, which includes Quartus from cdsteinkuehler/je…
…ssie-quartus-15.1.2 Not an ideal solution since the image lacks device family support for Cyclone II and Cyclone IV E
- Loading branch information
1 parent
67e3922
commit ff473cd
Showing
4 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# The MIT License | ||
# | ||
# Copyright (c) 2016, Oleg Nenashev | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
FROM cdsteinkuehler/jessie-quartus-15.1.2:latest | ||
MAINTAINER Oleg Nenashev <[email protected]> | ||
LABEL Description="The image offers FuseSoC, Icarus Verilog and Quartus 15.1.2" Vendor="Oleg Nenashev" Version="0.1" | ||
|
||
# Parameters | ||
ARG ZLIB_VERSION=1.2.8 | ||
ARG ICARUS_VERILOG_VERSION=10_1 | ||
ARG FUSESOC_VERSION=1.5 | ||
|
||
USER root | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y python2.7-dev libyaml-dev libyaml-dev | ||
RUN apt-get install -y python-pip | ||
RUN apt-get install -y python-yaml | ||
RUN apt-get install -y git | ||
|
||
# Install ZLIB for Icarus | ||
RUN apt-get install -y wget build-essential | ||
WORKDIR /zlib | ||
RUN wget http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz && tar zxf zlib-${ZLIB_VERSION}.tar.gz | ||
WORKDIR /zlib/zlib-${ZLIB_VERSION} | ||
RUN ./configure && make | ||
RUN make install | ||
|
||
# Install Icarus Verilog | ||
RUN apt-get install -y libelf-dev autoconf gperf bison flex | ||
RUN git clone https://github.com/steveicarus/iverilog.git | ||
WORKDIR iverilog | ||
RUN git checkout v${ICARUS_VERILOG_VERSION} | ||
RUN sh autoconf.sh | ||
RUN ./configure | ||
RUN make | ||
RUN make install | ||
|
||
#TODO: Fix Java | ||
# Install Java (required for using the image as Jenkins slave/agent) | ||
# run apt-get install -y software-properties-common | ||
# RUN add-apt-repository ppa:openjdk-r/ppa | ||
# RUN apt-get update | ||
# RUN apt-get install -y openjdk-8-jre | ||
# RUN update-alternatives --config java | ||
# RUN update-alternatives --config javac | ||
|
||
# Install FuseSoC | ||
ENV FUSESOC_VERSION=${FUSESOC_VERSION} | ||
|
||
WORKDIR /var/lib/fusesoc | ||
RUN git clone https://github.com/olofk/fusesoc.git | ||
RUN mv /var/lib/fusesoc/fusesoc /var/lib/fusesoc/repo | ||
WORKDIR /var/lib/fusesoc/repo | ||
RUN git checkout ${FUSESOC_VERSION} | ||
|
||
#For the local run: COPY fusesoc /var/lib/fusesoc | ||
|
||
RUN python setup.py install | ||
|
||
# Prepare run home | ||
RUN mkdir /fusesoc | ||
RUN chmod -R 777 /fusesoc | ||
ENV HOME /fusesoc | ||
#TODO: Allow specifying a configurable log destination | ||
#ENV FUSESOC_LOG /fusesoc/fusesoc.log | ||
RUN touch /var/lib/fusesoc/repo/fusesoc.log | ||
RUN chmod 777 /var/lib/fusesoc/repo/fusesoc.log | ||
COPY fusesoc.conf /etc/fusesoc/fusesoc.conf | ||
|
||
# Install Cyclone IV packages (they are kept wihout "iv" suffix for this release) | ||
#ADD http://download.altera.com/akdlm/software/acdsinst/15.1/185/ib_installers/cyclone-15.1.0.185.qdz /tmp/ | ||
#ADD http://download.altera.com/akdlm/software/acdsinst/15.1/185/ib_installers/QuartusLiteSetup-15.1.0.185-linux.run /tmp/ | ||
# Fix file permissions | ||
#RUN cd /tmp/ && \ | ||
# chmod +x *.run && \ | ||
# chmod +r * | ||
#USER builder | ||
#RUN cd /tmp/ && \ | ||
# ./QuartusLiteSetup-15.1.0.185-linux.run --mode unattended | ||
#USER root | ||
|
||
# Initialization will be done for the user on startup | ||
COPY fusesoc-entrypoint.sh /usr/local/bin/fusesoc-entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/fusesoc-entrypoint.sh"] | ||
CMD ["fusesoc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#! /bin/bash -eux | ||
echo "Running FuseSoC in $HOME" | ||
|
||
# Init data folders | ||
mkdir /fusesoc/build | ||
mkdir /fusesoc/cache | ||
|
||
#TODO: Make the behavior flexible - source repo should be modifyable | ||
cd /fusesoc | ||
git clone https://github.com/openrisc/orpsoc-cores.git | ||
if [ -d "orpsoc-cores/cores" ] ; then | ||
echo "INFO: Located orpsoc-cores/cores directory" | ||
else | ||
echo "ERROR: orpsoc-cores/cores directory has not been located" | ||
exit 1 | ||
fi | ||
|
||
# We Initialize FuseSoC within the user environment. Otherwise there are conflicts | ||
# TODO: Ideally it should be moved to the build stage | ||
fusesoc init -y | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[main] | ||
build_root=/fusesoc/build | ||
cache_root=/fusesoc/cache | ||
cores_root=/fusesoc/orpsoc-cores | ||
systems_root=/fusesoc/orpsoc-cores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters