Commit 5d968b09 authored by Jean-Paul Chaput's avatar Jean-Paul Chaput
Browse files

Add nMigen to docker & chroot images.

* New: In bootsrap/docker:
    * install python3/nMigen tool in all environment.
    * Add a new image on top of the coriolis one to have a shell
      (with X11 connexion to the host system).
    * Upgrade Yosys to 0.9.
    * Correct integration of allianceInstaller.sh in socInstaller.py.
    * Add a chroot mode to socInstaler.py (for Debian 9 chrooted).
    * Allow benchs to be run separately.
parent 1d05f127
FROM debian9.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
FROM debian9.system FROM debian9.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN mkdir -p coriolis-2.x/src \
CMD /root/socInstaller.py --docker --profile=Debian9 --do-alliance --do-coriolis --benchs && git clone https://github.com/m-labs/nmigen.git \
&& cd nmigen \
&& python3 setup.py develop \
&& /root/socInstaller.py --docker --profile=Debian9 --do-alliance --do-coriolis --benchs
...@@ -9,6 +9,7 @@ RUN apt-get update \ ...@@ -9,6 +9,7 @@ RUN apt-get update \
libboost-all-dev libboost-python-dev \ libboost-all-dev libboost-python-dev \
zlib1g-dev libxml2-dev rapidjson-dev libbz2-dev \ zlib1g-dev libxml2-dev rapidjson-dev libbz2-dev \
qt4-dev-tools libqwt-dev python-qt4 \ qt4-dev-tools libqwt-dev python-qt4 \
python3-setuptools \
\ \
autotools-dev automake \ autotools-dev automake \
libxt-dev libxpm-dev libmotif-dev \ libxt-dev libxpm-dev libmotif-dev \
......
systemImage="debian9.system" systemImage="debian9.system"
coriolisImage="debian9.coriolis" coriolisImage="debian9.coriolis"
bashImage="debian9.bash"
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1
...@@ -205,9 +205,8 @@ class CommandArg ( object ): ...@@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
...@@ -281,13 +280,13 @@ class Configuration ( object ): ...@@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
...@@ -308,6 +307,7 @@ class Configuration ( object ): ...@@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = False
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
...@@ -355,11 +355,14 @@ class Configuration ( object ): ...@@ -355,11 +355,14 @@ class Configuration ( object ):
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
...@@ -411,7 +414,11 @@ class Configuration ( object ): ...@@ -411,7 +414,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
...@@ -426,20 +433,17 @@ class Configuration ( object ): ...@@ -426,20 +433,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
if target == 'Ubuntu18': otherArgs.append( '--qt5' ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
...@@ -523,6 +527,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest= ...@@ -523,6 +527,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
...@@ -537,6 +542,7 @@ try: ...@@ -537,6 +542,7 @@ try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True
......
FROM sl7.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]
...@@ -2,6 +2,5 @@ ...@@ -2,6 +2,5 @@
FROM sl7.system FROM sl7.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN /root/socInstaller.py --docker --profile=SL7_64 --do-alliance --do-coriolis --benchs
CMD /root/socInstaller.py --docker --profile=SL7_64 --do-alliance --do-coriolis --benchs
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
FROM scientificlinux/sl:latest FROM scientificlinux/sl:latest
RUN yum -y update \ RUN yum -y update \
&& yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y install git cmake bison flex gcc-c++ libstdc++-devel \ && yum -y install git cmake bison flex gcc-c++ libstdc++-devel \
make binutils-devel \ make binutils-devel \
boost-devel boost-python boost-filesystem \ boost-devel boost-python boost-filesystem \
...@@ -13,9 +14,12 @@ RUN yum -y update \ ...@@ -13,9 +14,12 @@ RUN yum -y update \
libX11-devel libXt-devel libXpm-devel \ libX11-devel libXt-devel libXpm-devel \
motif motif-devel \ motif motif-devel \
\ \
python36-six \
vim-x11 \ vim-x11 \
&& yum -y install http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-6.1.2-4.fc23.x86_64.rpm \ && yum -y install http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-6.1.2-4.fc23.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-devel-6.1.2-4.fc23.x86_64.rpm \ http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-devel-6.1.2-4.fc23.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/yosys-0.7-1.el7.soc.x86_64.rpm \ http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/yosys-0.9-1.el7.soc.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/python3-pyvcd-0.1.7-git2302c99.1.el7.soc.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/python3-nmigen-0.1-git57d95b7.1.el7.soc.x86_64.rpm \
&& yum clean all && yum clean all
systemImage="sl7.system" systemImage="sl7.system"
coriolisImage="sl7.coriolis" coriolisImage="sl7.coriolis"
bashImage="sl7.bash"
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1
...@@ -205,9 +205,8 @@ class CommandArg ( object ): ...@@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
...@@ -281,13 +280,13 @@ class Configuration ( object ): ...@@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
...@@ -308,6 +307,7 @@ class Configuration ( object ): ...@@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = None
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
...@@ -352,14 +352,19 @@ class Configuration ( object ): ...@@ -352,14 +352,19 @@ class Configuration ( object ):
if self._nightlyMode: if self._nightlyMode:
self._rootDir = self._homeDir + '/nightly/coriolis-2.x' self._rootDir = self._homeDir + '/nightly/coriolis-2.x'
else: else:
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
self._masterHost = self._detectMasterHost()
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode is None: return 'unknown'
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
...@@ -411,7 +416,11 @@ class Configuration ( object ): ...@@ -411,7 +416,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
...@@ -426,19 +435,17 @@ class Configuration ( object ): ...@@ -426,19 +435,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
if self.doBenchs: commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
...@@ -522,6 +529,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest= ...@@ -522,6 +529,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
...@@ -530,12 +538,14 @@ parser.add_option ( "--root" , action="store" , type="string", dest= ...@@ -530,12 +538,14 @@ parser.add_option ( "--root" , action="store" , type="string", dest=
parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." ) parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." )
(options, args) = parser.parse_args () (options, args) = parser.parse_args ()
conf = Configuration() conf = Configuration()
try: try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True
...@@ -544,6 +554,7 @@ try: ...@@ -544,6 +554,7 @@ try:
if options.rmSource or options.rmAll: conf.rmSource = True if options.rmSource or options.rmAll: conf.rmSource = True
if options.rmBuild or options.rmAll: conf.rmBuild = True if options.rmBuild or options.rmAll: conf.rmBuild = True
if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doAlliance: conf.openLog( 'alliance' )
if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doCoriolis: conf.openLog( 'coriolis' )
if conf.doBenchs: conf.openLog( 'benchs' ) if conf.doBenchs: conf.openLog( 'benchs' )
......
FROM ununtu18.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
FROM ubuntu18.system FROM ubuntu18.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN mkdir -p coriolis-2.x/src \
CMD /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis --benchs && git clone https://github.com/m-labs/nmigen.git \
&& cd nmigen \
&& python3 setup.py develop \
&& /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis --benchs
...@@ -15,8 +15,12 @@ RUN apt-get update \ ...@@ -15,8 +15,12 @@ RUN apt-get update \
libxt-dev libxpm-dev libmotif-dev \ libxt-dev libxpm-dev libmotif-dev \
\ \
yosys \ yosys \
python3-setuptools python3-pip python3-six \
python3-wheel \
\ \
vim \ vim \
&& apt-get clean && apt-get clean \
&& pip3 install git+https://github.com/m-labs/nmigen.git
# For building with Qt 4 instead of Qt 5.
# qt4-dev-tools libqwt-dev python-qt4 \ # qt4-dev-tools libqwt-dev python-qt4 \
systemImage="ubuntu18.system" systemImage="ubuntu18.system"
coriolisImage="ubuntu18.coriolis" coriolisImage="ubuntu18.coriolis"
bashImage="ubuntu18.bash"
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1
...@@ -205,9 +205,8 @@ class CommandArg ( object ): ...@@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
...@@ -281,13 +280,13 @@ class Configuration ( object ): ...@@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
<