Create a PoC for a modular packaged kernel. This means:
- the kernel package itself is minimal
- all device drivers are packaged as KMPs (kernel module packages)
- some other modules (e.g. subsystems like netfilter, SCSI, …) are packaged as KMPs, too
- module dependencies (depmod) translate into package dependencies and are handled by rpm
- hardware requirements are handled by zypper/YaST via modalias
- other system requirements (e.g. "this system needs a firewall") would be handled by patterns
- minimal installation size and download size for kernel and drivers — only actually required/used modules are installed
- reduced build time: drivers don't need to be rebuilt with every kernel update, only if the driver itself (or the APIs it uses) are updated. KABI tracking ensures that drivers remain compatible with updated kernels.
- vice-versa, a driver update doesn't necessitate a full kernel update.
- this might also simplify QA procedures: driver testing could be separated from core kernel testing.
- replacement of in-box drivers by out-of-box drivers simplified; it would become a routine procedure
- conservative customers can update components selectively, reducing regression risks
- package management techniques (e.g. download statistics) can be used to track usage of drivers and identify modules to be disabled
- we could get rid of package bundles like
Disadvantages / Challenges
- "Missing driver problem": e.g. network controller breaks, new controller needs new driver → unavoidable, patterns e.g. "kernel-network-driver-all" or "kernel-usb-driver-all" as precaution (but this would forfeit a lot of the size advantage)
- weak dependencies, or dependencies that aren't expressed in depmod terms. We handle this partially already for initrd (
SUSE INITRDmechanism). We must translate it into package dependencies
- user space dependencies: many tools might not be prepared for a large number of missing drivers in an (open)SUSE environment. Need to look into dracut etc.
- is our KABI tracking good enough? So far it works well for the small number of KMPs, but what if we get 1000s of KMPs with complex dependencies?
- Does the KABI dependency tracking scale to this level, or will dependency checks be extremely slow?
- It gets more difficult to assess system supportablity. Tooling is required to verify that installed driver packages are compatible.
- we can't run depmod after every KMP installation, it'd be far too slow (I have a patched depmod available that would make this possible with "incremental" mode).
- avoid excessive meta data duplication (kernel changelog in every KMP)
- the KMP concept needs to be revised. The
multiversion(kernel)property of KMPs allows to install the same KMP for different KABI versions, but doesn't work well for version updates of the KMP itself. That would be a big problem, because we update some drivers frequently.
- do we need a means for kernel module management tools (modprobe) to hook into package management (zypper) for pulling in missing modules automatically?
Goal for this Hackweek
- Make it possible to build "real" KMPs from the kernel package build. Note that the in-kernel
-kmppackages such as
dlm-kmparen't "real" KMPs; they use a hard kernel version dependency rather than KABI dependencies.
- Hack on the kernel build scripts to enable modular packaging. Perhaps one-KMP-per-module as a first step, to experiment with module interdependencies. 2nd step would be combining modules into reasonable sets. Alternatively, start with a set of modules to be packaged as KMPs (e.g. device drivers) and increase the set step-by-step.
- Experiment with practical use of the modular kernel. Figure out problems with the interaction of module and package management. Play through the "missing driver" scenario, and try to find a concept for aworkaround.
- Develop a modified KMP concept. Make version of the KABI the KMP was compiled against part of the package name rather than the version (instead of
foo-kmp-default-5.3.18_59.5-1.0, indicating module foo for the KABI of 5.3.18_59.5, version 1.0)
- Tackle a few of the challenges above
- Explore possibilities to improve packaging of kernel firmware, too. Currently FW is packaged in big chunks by vendor. Packaging individual drivers might facilitate fine-grained dependencies (driver pulls in required FW packages).
This project is part of:
Hack Week 21
[comment]: # (Please use the project descriptio...
Nanos is a "unikernel...
(was: Create a DRM driver for Matrox G200)
BPF verifier plays a ...
RPMs with reflinkable...
[comment]: # Harvester does not officially come...
SUSE IT needs help fr...
Currently software.opensuse.org search is using...
DNF 5 is a package ma...