xilinx ise 14.7 inside docker

This commit is contained in:
Christof Harnischmacher 2018-06-28 21:41:00 +02:00
commit ccb440238f
11 changed files with 323 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
files/root/install/Xilinx_ISE_DS_14.7_1015*
files/root/.Xilinx/Xilinx.lic

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM ubuntu:14.04
# basic packages
RUN apt-get update && \
apt-get -y install git expect emacs24-nox locales \
libglib2.0-0 libsm6 libxi6 libxrender1 libxrandr2 \
libfreetype6 libfontconfig1
# Set LOCALE to UTF8
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
/usr/sbin/update-locale LANG=en_US.UTF-8
# adding scripts
ADD files /
RUN cd /root/install && \
tar xvf Xilinx_ISE_DS_14.7_1015_1-1.tar && \
TERM=xterm /root/setup && \
cd && \
rm -rf /root/setup /root/install

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Christof Harnischmacher
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.

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# quartus-lite
Xilinx ISE 14.7 docker.
I included a `xilinx` shell script, which allows execution of e.g. `impact` inside the docker container. The current working directory is mounted to `/build`.
Example:
```
xilinx impact -batch my.cmd
```
`xilinx` command is executed in the current working directory.
Just copy `xilinx` to a directory in your `PATH`.

23
build Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
DOCKER_TARGET=chriz2600
IMAGE_NAME=xilinx-ise
IMAGE_TAG=14.7
docker build --rm -t ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG} .
#if command -v docker-squash ; then
# echo "Running docker-squash as root"
# sudo docker-squash ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG}
#fi
docker tag ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG} ${DOCKER_TARGET}/${IMAGE_NAME}:latest
read -n1 -p "Do you want to push the image to the registry now [yN]? " answer
if [[ "${answer:-n}" == "y" ]]
then
docker push ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG}
docker push ${DOCKER_TARGET}/${IMAGE_NAME}:latest
fi

View File

110
files/root/.bashrc Normal file
View File

@ -0,0 +1,110 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
XILINX_SCRIPT="/opt/Xilinx/14.7/ISE_DS/settings64.sh"
mesg n
export LC_ALL="en_US.UTF-8"
alias l='ls -alF'
alias ll='ls -alF'
alias ..='cd ..'
if [ -f $XILINX_SCRIPT ] ; then
source $XILINX_SCRIPT
fi

98
files/root/install/config Normal file
View File

@ -0,0 +1,98 @@
################################################################################
# Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved.
################################################################################
destination_dir=/opt/Xilinx
downloadlocation_dir=/root/install
# &Import tool preferences from previous version
copy_preferences=N
# &Use multiple CPU cores for faster installation
# Enabling this option will speed up installation but may slow down other active applications.
use_multiple_cores=Y
application=Acquire or Manage a License Key::0
################################################################
# ISE WebPACK, uncomment this block and
# comment all other blocks to install ISE WebPACK
################################################################
# package=ISE WebPACK::0
# application=setupEnv.sh::0
# application=Install Linux System Generator Info XML::0
# application=Ensure Linux System Generator Symlinks::0
# application=Install Cable Drivers::0
################################################################
# ISE Design Suite Logic Edition, uncomment this block and
# comment all other blocks to install ISE Design Suite Logic Edition
################################################################
# package=ISE Design Suite Logic Edition::0
# application=setupEnv.sh::0
# application=Ensure Linux System Generator Symlinks::0
# application=Install Linux System Generator Info XML::0
# application=Configure WebTalk::0
# application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
# application=Install Cable Drivers::0
################################################################
# ISE Design Suite Embedded Edition, uncomment this block and
# comment all other blocks to install ISE Design Suite Embedded Edition
################################################################
# package=ISE Design Suite Embedded Edition::0
# application=setupEnv.sh::0
# application=Ensure Linux System Generator Symlinks::0
# application=Install Linux System Generator Info XML::0
# application=Configure WebTalk::0
# application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
# application=Install Cable Drivers::0
################################################################
# ISE Design Suite DSP Edition, uncomment this block and
# comment all other blocks to install ISE Design Suite DSP Edition
################################################################
# package=ISE Design Suite DSP Edition::0
# application=setupEnv.sh::0
# application=Ensure Linux System Generator Symlinks::0
# application=Install Linux System Generator Info XML::0
# application=Configure WebTalk::0
# application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
# application=Install Cable Drivers::0
# application=Version Equalizer::0
################################################################
# ISE Design Suite System Edition, uncomment this block and
# comment all other blocks to install ISE Design Suite System Edition
################################################################
package=ISE Design Suite System Edition::1
application=setupEnv.sh::0
application=Ensure Linux System Generator Symlinks::0
application=Install Linux System Generator Info XML::0
application=Configure WebTalk::0
application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
application=Install Cable Drivers::0
application=Version Equalizer::0
################################################################
# Lab Tools - Standalone Installation, uncomment this block and
# comment all other blocks to install Lab Tools - Standalone Installation
################################################################
# package=Lab Tools - Standalone Installation::0
# application=Configure WebTalk::0
# application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
# application=Install Cable Drivers::0

26
files/root/setup Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/expect
set timeout -1
spawn /root/install/bin/lin64/batchxsetup -batch config
set count 23; set done 0; set todo $count;
while {$count > 0 } {
set done [expr $done+1];
expect "Press Enter key to continue" { send "\r" }
puts "\n\ndone : $done/$todo\n\n";
set count [expr $count-1];
}
expect "I accept and agree to the terms and conditions above." { send "y\r" }
set count 2566; set done 0; set todo $count;
while {$count > 0 } {
set done [expr $done+1];
expect "Press Enter key to continue" { send "\r" }
puts "\n\ndone : $done/$todo\n\n";
set count [expr $count-1];
}
expect "I accept and agree to the terms and conditions above." { send "y\r" }
expect eof

7
files/usr/local/bin/wrapper Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash -il
CMD="$1"
shift
cd /build
$CMD "$@"

3
xilinx Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker run --rm -it -v $(pwd):/build chriz2600/xilinx-ise:latest /usr/local/bin/wrapper "$@"