Build Linux and the Linux driver out of tree

Linux and the Hafnium module have been built inside their source tree so
far. The targets have a hardcoded toolchain but they get built multiple
times, once for each toolchain defined in GN. This can cause the build
to fail when two instances attempt to compile the same file at the same
time. Refactor the build scripts to compile the kernel and the module
in the out/ directory of each corresponding toolchain.

This cleans up the build files a bit but also introduces a new problem.
Out-of-tree kernel modules do not support building out of their folder.
This patch avoids that by copying the source files into
`target_out_dir`.

Test: kokoro/ubuntu/build.sh
Change-Id: I6fc10ebd9623f5f82dd086447b80d935c490765e
6 files changed
tree: 35b66bc55e8184ba596ca270a13d10c5f95d0091
  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.