Hermetic builds inside a container

Adds 'build/docker/Dockerfile' which describes the base container image of
Hafnium compilation environment. This image is built and uploaded to GCP
where users download it from. The feature is always enabled for Kokoro
and can optionally be enabled for local builds too. Once rootless
containers are easier to set up, we might make it the default for local
builds too.

An arbitrary command can be executed inside the container with
'build/run_in_container.sh [-i] <command> ...'. This is done
automatically inside 'Makefile' and 'kokoro/ubuntu/build.sh' which
detect whether they are already running inside the container and respawn
themselves using 'run_in_container.sh' if not.

The feature is guarded with HAFNIUM_HERMETIC_BUILD environment variable,
switched on if the value is "true". All other values switch it off, e.g.
'run_in_container.sh' sets it to 'inside' to avoid recursion.

Bug: 132428451
Test: HAFNIUM_HERMETIC_BUILD=<value> make
Test: HAFNIUM_HERMETIC_BUILD=<value> kokoro/ubuntu/build.sh
Change-Id: I0737a868ab4f67c0fdbf78fa8a97cc91714d2e10
10 files changed
tree: 5e682b9e5cd8b6a22ea41960b7ee9a3973e1647c
  1. .vscode/
  2. build/
  3. docs/
  4. driver/
  5. inc/
  6. kokoro/
  7. project/
  8. src/
  9. test/
  10. third_party/
  11. .clang-format
  12. .clang-tidy
  13. .gitignore
  14. .gitmodules
  15. .gn
  16. AUTHORS
  17. BUILD.gn
  18. CONTRIBUTING.md
  19. LICENSE
  20. Makefile
  21. README.md
README.md

Hafnium

Hafnium is a hypervisor, initially supporting aarch64 (64-bit ARMv8 CPUs).

Get in touch and keep up-to-date at hafnium-discuss@googlegroups.com.

Getting started

To jump in and build Hafnium, follow the getting started instructions.

If you want to contribute to the project, see details of how we accept contributions.