Docker: start migrating to 20.04

Still failing with:

Traceback (most recent call last):
  File "util/cpt_upgrader.py", line 73, in <module>
    from six.moves import configparser
ImportError: No module named six.moves

Also fix some issues noticed:

- userland/c/atomic was not ignoring arch specific examples
- ./build would not stop on the first error, now it does
- add libhdf5-dev as a dependency of gem5
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-09-15 01:00:00 +00:00
parent 76a48621f4
commit 584a90eae2
8 changed files with 63 additions and 22 deletions

52
build
View File

@@ -54,7 +54,10 @@ class _Component:
(self.build_callback is not None) and
(self.supported_archs is None or arch in self.supported_archs)
):
self.build_callback()
return self.build_callback()
else:
# Component that does not build anything itself, only has dependencies.
return 0
submodule_extra_remotes = {
'binutils-gdb': {
@@ -168,13 +171,16 @@ so looping over all of them would waste time.
'make',
'patch',
'perl',
'python-matplotlib',
'python3',
'rsync',
'sed',
'tar',
'unzip',
},
python3_pkgs={
# Generate graphs of config.ini under m5out.
'matplotlib',
},
)
buildroot_overlay_qemu_component = copy.copy(buildroot_component)
# We need to build QEMU before the final Buildroot to get qemu-img.
@@ -182,24 +188,36 @@ so looping over all of them would waste time.
buildroot_overlay_gem5_component = copy.copy(buildroot_component)
buildroot_overlay_gem5_component.dependencies = ['overlay-gem5']
gem5_deps = {
# TODO test it out on Docker and answer that question properly:
# https://askubuntu.com/questions/350475/how-can-i-install-gem5
'apt_get_pkgs': {
'device-tree-compiler',
'diod',
'libgoogle-perftools-dev',
# https://askubuntu.com/questions/350475/how-can-i-install-gem5/1275773#1275773
'build-essential',
'doxygen',
'git',
'libboost-all-dev',
'libelf-dev',
'libgoogle-perftools-dev',
'libhdf5-serial-dev',
'libpng-dev',
'libprotobuf-dev',
'libprotoc-dev',
'm4',
'protobuf-compiler',
'python-dev',
'python-pip',
'python-is-python3',
'python3-dev',
'python3-pydot',
'python3-six',
'scons',
'zlib1g',
'zlib1g-dev',
# Some extra ones.
'device-tree-compiler',
'diod',
# For prebuilt qcow2 unpack.
'qemu-utils',
'scons',
'zlib1g-dev',
},
'python2_pkgs': {
# Generate graphs of config.ini under m5out.
'python3_pkgs': {
# https://cirosantilli.com/linux-kernel-module-cheat#gem5-config-dot
'pydot',
},
'submodules_shallow': {'gem5'},
@@ -446,7 +464,7 @@ Which components to build. Default: qemu-buildroot
args = self.get_common_args()
args.update(extra_args)
args['show_time'] = False
lkmc.import_path.import_path_main(component_file)(**args)
return lkmc.import_path.import_path_main(component_file)(**args)
return f
def timed_main(self):
@@ -511,6 +529,8 @@ Which components to build. Default: qemu-buildroot
ruby_pkgs.update(component.ruby_pkgs)
if ruby_pkgs:
apt_get_pkgs.add('ruby')
if python3_pkgs:
apt_get_pkgs.add('python3-pip')
if apt_get_pkgs or apt_build_deps:
if self.env['travis']:
interacive_pkgs = {
@@ -653,7 +673,9 @@ Which components to build. Default: qemu-buildroot
if self.env['print_components']:
print(self.component_to_name_map[component])
else:
component.build(self.env['arch'])
ret = component.build(self.env['arch'])
if (ret != 0):
return ret
if __name__ == '__main__':
Main().cli()