Don't remembers what thoses do, but don't want to loose them either.
This commit is contained in:
parent
d10961b585
commit
37f311ac7d
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
FROM ununtu18.coriolis
|
FROM ubuntu18.coriolis
|
||||||
|
|
||||||
COPY root/dot.bashrc /root/.bashrc
|
COPY root/dot.bashrc /root/.bashrc
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,5 @@ RUN mkdir -p coriolis-2.x/src \
|
||||||
&& git clone https://github.com/m-labs/nmigen.git \
|
&& git clone https://github.com/m-labs/nmigen.git \
|
||||||
&& cd nmigen \
|
&& cd nmigen \
|
||||||
&& python3 setup.py develop \
|
&& python3 setup.py develop \
|
||||||
&& /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis --benchs
|
&& /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,13 @@ class CommandArg ( object ):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
class YosysCommand ( CommandArg ):
|
||||||
|
|
||||||
|
def __init__ ( self, yosysBin, fdLog=None ):
|
||||||
|
CommandArg.__init__ ( self, [ yosysBin ], fdLog=fdLog )
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
class AllianceCommand ( CommandArg ):
|
class AllianceCommand ( CommandArg ):
|
||||||
|
|
||||||
def __init__ ( self, alcBin, fdLog=None ):
|
def __init__ ( self, alcBin, fdLog=None ):
|
||||||
|
@ -286,7 +293,7 @@ class Configuration ( object ):
|
||||||
, 'success' , 'rcode'
|
, 'success' , 'rcode'
|
||||||
]
|
]
|
||||||
SecondaryNames = \
|
SecondaryNames = \
|
||||||
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
|
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'yosysBin', 'alcBin', 'ccbBin', 'benchsDir'
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__ ( self ):
|
def __init__ ( self ):
|
||||||
|
@ -301,8 +308,9 @@ class Configuration ( object ):
|
||||||
self._rmSource = False
|
self._rmSource = False
|
||||||
self._rmBuild = False
|
self._rmBuild = False
|
||||||
self._doGit = True
|
self._doGit = True
|
||||||
self._doCoriolis = False
|
self._doYosys = False
|
||||||
self._doAlliance = False
|
self._doAlliance = False
|
||||||
|
self._doCoriolis = False
|
||||||
self._doBenchs = False
|
self._doBenchs = False
|
||||||
self._doSendReport = False
|
self._doSendReport = False
|
||||||
self._nightlyMode = False
|
self._nightlyMode = False
|
||||||
|
@ -355,6 +363,7 @@ 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._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh'
|
||||||
self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
|
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'
|
||||||
|
@ -415,6 +424,13 @@ class Configuration ( object ):
|
||||||
def getCommands ( self, target ):
|
def getCommands ( self, target ):
|
||||||
commands = []
|
commands = []
|
||||||
|
|
||||||
|
if self.doYosys:
|
||||||
|
if not os.path.isfile( self.yosysBin ):
|
||||||
|
raise ErrorMessage( 1, [ 'Cannot find <yosysInstaller.sh>, should be here:'
|
||||||
|
, ' <%s>' % self.yosysBin
|
||||||
|
] )
|
||||||
|
commands.append( YosysCommand( self.yosysBin, fdLog=self.fds['yosys'] ) )
|
||||||
|
|
||||||
if self.doAlliance:
|
if self.doAlliance:
|
||||||
if not os.path.isfile( self.alcBin ):
|
if not os.path.isfile( self.alcBin ):
|
||||||
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
|
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
|
||||||
|
@ -440,7 +456,7 @@ class Configuration ( object ):
|
||||||
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'] ) )
|
||||||
elif target == 'Ubuntu18' or target == 'Debian9':
|
elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10':
|
||||||
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'] ) )
|
||||||
|
|
||||||
|
@ -524,6 +540,7 @@ class Report ( object ):
|
||||||
parser = optparse.OptionParser ()
|
parser = optparse.OptionParser ()
|
||||||
parser.add_option ( "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." )
|
parser.add_option ( "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." )
|
||||||
parser.add_option ( "--no-git" , action="store_true" , dest="noGit" , help="Do not pull/update Git repositories before building." )
|
parser.add_option ( "--no-git" , action="store_true" , dest="noGit" , help="Do not pull/update Git repositories before building." )
|
||||||
|
parser.add_option ( "--do-yosys" , action="store_true" , dest="doYosys" , help="Rebuild Yosys." )
|
||||||
parser.add_option ( "--do-alliance" , action="store_true" , dest="doAlliance" , help="Rebuild the Alliance tools." )
|
parser.add_option ( "--do-alliance" , action="store_true" , dest="doAlliance" , help="Rebuild the Alliance tools." )
|
||||||
parser.add_option ( "--do-coriolis" , action="store_true" , dest="doCoriolis" , help="Rebuild the Coriolis tools." )
|
parser.add_option ( "--do-coriolis" , action="store_true" , dest="doCoriolis" , help="Rebuild the Coriolis tools." )
|
||||||
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." )
|
||||||
|
@ -547,14 +564,16 @@ try:
|
||||||
if options.docker: conf.dockerMode = True
|
if options.docker: conf.dockerMode = True
|
||||||
if options.chroot: conf.chrootMode = 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.doYosys: conf.doYosys = True
|
||||||
if options.doAlliance: conf.doAlliance = True
|
if options.doAlliance: conf.doAlliance = True
|
||||||
|
if options.doCoriolis: conf.doCoriolis = True
|
||||||
if options.benchs: conf.doBenchs = True
|
if options.benchs: conf.doBenchs = True
|
||||||
if options.doReport: conf.doSendReport = True
|
if options.doReport: conf.doSendReport = True
|
||||||
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.doYosys: conf.openLog( 'yosys' )
|
||||||
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' )
|
||||||
|
@ -563,68 +582,68 @@ try:
|
||||||
|
|
||||||
gitSupports = []
|
gitSupports = []
|
||||||
for supportRepo in conf.supportRepos:
|
for supportRepo in conf.supportRepos:
|
||||||
gitSupports.append( GitRepository( supportRepo, conf.srcDir+'/support' ) )
|
gitSupports.append( GitRepository( supportRepo, conf.srcDir+'/support' ) )
|
||||||
gitCoriolis = GitRepository( conf.coriolisRepo, conf.srcDir, conf.fds['coriolis'] )
|
gitCoriolis = GitRepository( conf.coriolisRepo, conf.srcDir, conf.fds['coriolis'] )
|
||||||
gitBenchs = GitRepository( conf.benchsRepo , conf.srcDir, conf.fds['coriolis'] )
|
gitBenchs = GitRepository( conf.benchsRepo , conf.srcDir, conf.fds['coriolis'] )
|
||||||
|
|
||||||
if conf.doAlliance:
|
if conf.doAlliance:
|
||||||
gitAlliance = GitRepository( conf.allianceRepo, conf.srcDir, conf.fds['alliance'] )
|
gitAlliance = GitRepository( conf.allianceRepo, conf.srcDir, conf.fds['alliance'] )
|
||||||
|
|
||||||
if conf.doGit:
|
if conf.doGit:
|
||||||
for gitSupport in gitSupports:
|
for gitSupport in gitSupports:
|
||||||
if conf.rmSource: gitSupport.removeLocalRepo()
|
if conf.rmSource: gitSupport.removeLocalRepo()
|
||||||
gitSupport.clone()
|
gitSupport.clone()
|
||||||
#if gitSupport.url.endswith('rapidjson'):
|
#if gitSupport.url.endswith('rapidjson'):
|
||||||
# gitSupport.checkout( 'a1c4f32' )
|
# gitSupport.checkout( 'a1c4f32' )
|
||||||
|
|
||||||
if conf.doCoriolis:
|
if conf.doAlliance:
|
||||||
if conf.rmSource: gitCoriolis.removeLocalRepo()
|
if conf.rmSource: gitAlliance.removeLocalRepo()
|
||||||
gitCoriolis.clone ()
|
gitAlliance.clone ()
|
||||||
gitCoriolis.checkout( 'devel' )
|
#gitAlliance.checkout( 'devel' )
|
||||||
|
|
||||||
if conf.doAlliance:
|
if conf.doCoriolis:
|
||||||
if conf.rmSource: gitAlliance.removeLocalRepo()
|
if conf.rmSource: gitCoriolis.removeLocalRepo()
|
||||||
gitAlliance.clone ()
|
gitCoriolis.clone ()
|
||||||
#gitAlliance.checkout( 'devel' )
|
gitCoriolis.checkout( 'devel' )
|
||||||
|
|
||||||
if conf.rmSource: gitBenchs.removeLocalRepo()
|
if conf.rmSource: gitBenchs.removeLocalRepo()
|
||||||
gitBenchs.clone()
|
gitBenchs.clone()
|
||||||
|
|
||||||
if conf.rmBuild:
|
if conf.rmBuild:
|
||||||
for entry in os.listdir(conf.rootDir):
|
for entry in os.listdir(conf.rootDir):
|
||||||
if entry.startswith('Linux.'):
|
if entry.startswith('Linux.'):
|
||||||
buildDir = conf.rootDir+'/'+entry
|
buildDir = conf.rootDir+'/'+entry
|
||||||
print 'Removing OS build directory: <%s>' % buildDir
|
print 'Removing OS build directory: <%s>' % buildDir
|
||||||
shutil.rmtree( buildDir )
|
shutil.rmtree( buildDir )
|
||||||
|
|
||||||
commands = conf.getCommands( options.profile )
|
commands = conf.getCommands( options.profile )
|
||||||
for command in commands:
|
for command in commands:
|
||||||
if command.host:
|
if command.host:
|
||||||
print 'Executing command on remote host <%s>:' % host
|
print 'Executing command on remote host <%s>:' % host
|
||||||
else:
|
else:
|
||||||
print 'Executing command on *local* host:'
|
print 'Executing command on *local* host:'
|
||||||
print ' %s' % str(command)
|
print ' %s' % str(command)
|
||||||
command.execute()
|
command.execute()
|
||||||
|
|
||||||
conf.closeLogs()
|
conf.closeLogs()
|
||||||
|
|
||||||
conf.success = True
|
conf.success = True
|
||||||
|
|
||||||
except ErrorMessage, e:
|
except ErrorMessage, e:
|
||||||
print e
|
print e
|
||||||
conf.closeLogs()
|
conf.closeLogs()
|
||||||
conf.success = False
|
conf.success = False
|
||||||
|
|
||||||
if showTrace:
|
if showTrace:
|
||||||
print '\nPython stack trace:'
|
print '\nPython stack trace:'
|
||||||
traceback.print_tb( sys.exc_info()[2] )
|
traceback.print_tb( sys.exc_info()[2] )
|
||||||
conf.rcode = e.code
|
conf.rcode = e.code
|
||||||
|
|
||||||
if conf.doSendReport:
|
if conf.doSendReport:
|
||||||
report = Report( conf )
|
report = Report( conf )
|
||||||
report.attachLog( conf.logs['coriolis' ] )
|
report.attachLog( conf.logs['coriolis' ] )
|
||||||
report.attachLog( conf.logs['benchs' ] )
|
report.attachLog( conf.logs['benchs' ] )
|
||||||
report.send()
|
report.send()
|
||||||
|
|
||||||
conf.compressLogs()
|
conf.compressLogs()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue