commit | 6c45434189e387b234109b68b1ed5a8f2cd5b439 | [log] [tgz] |
---|---|---|
author | Lorenz Brun <lorenz@monogon.tech> | Thu Jun 01 12:23:38 2023 +0200 |
committer | Lorenz Brun <lorenz@monogon.tech> | Tue Jun 13 13:44:46 2023 +0000 |
tree | 4cff8bb2fac00df28699559256ce7649b38877e1 | |
parent | 46bf7d6c6437dfbf9dcc1e1d7d80fcc1c601f9b5 [diff] |
m/node: build Linux with modules This introduces modules into our Linux build. I originally didn't want to do this, this is why this wasn't done until now. But various things in the kernel weren't set up for this, for example the AMD and Intel KVM modules cannot both be loaded, only the first one loaded works. Also, the Linux kernel cannot load firmware for built-in modules reliably as the filesystem it tries to load it from is not always mounted first, even if the kernel itself mounts it. The firmware issue was brought up multiple times on LKML, but Linus is of the opinion that the firmware should be next to the kernel module, thus either built-in (not viable for licensing and size reasons) or the modules need to be loadable and on the same filesystem as the firmware. Thus unless we want to carry signifcant patches against the Kernel in a deadlock-prone area, we are forced to adopt a design with loadable modules (or ship everything twice in an initramfs which is also not desirable). The kernel config currently only has the modules as non-builtin which require firmware, everything else has been left as-is. For boot-time performance it would eventually be a good idea to move to a setup with more modules once we're confident in the implementation and everything can deal with late-loaded modules/devices. As a drive-by fix this also moves the kernel builds to out-of-tree so that we no longer pollute the source folder. Bazel protected us from serious issues due to this, but it's still bad practice. Change-Id: Iced8e12234565e5b7447e732716651e05e67d55b Reviewed-on: https://review.monogon.dev/c/monogon/+/1791 Reviewed-by: Serge Bazanski <serge@monogon.tech> Tested-by: Jenkins CI
This is the main repository containing the source code for the Monogon Platform.
This is pre-release software - take a look, and check back later!
Our build environment is self-contained and requires only minimal host dependencies:
/dev/kvm
(if you want to run tests).Our docs assume that Bazelisk is available as bazel
on your PATH.
Refer to SETUP.md for detailed instructions.
Build CLI and node image:
bazel build //metropolis/cli/dbg //:launch -c dbg
Launch an ephemeral test node:
bazel test //:launch -c dbg --test_output=streamed
Run a kubectl command while the test is running:
bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node
Run full test suite:
bazel test -c dbg //...