Nixpkgs: Meta issue about kernel configuration

Created on 18 Sep 2019  路  3Comments  路  Source: NixOS/nixpkgs

This issue lists steps I intend to follow to improve kernel integration into nixos.
Mainly I would like nixpkgs to be able to mark kernel configuration entries as dependencies.
For instance enabling bcc, should enable CONFIG_BPF or at least check that it is available.
Ideally I would like to make it easier to compose/override kernel configurations as the current process
is quite tricky (you gotta choose carefully between override/overrideAttrs).

  • [ ] check the generated kernel config against the specified/requested config (https://github.com/NixOS/nixpkgs/pull/69013)
  • [ ] replace the perl code to check the config https://github.com/NixOS/nixpkgs/blob/e598c4001fda0088506cdc12bf8053705c46676d/pkgs/os-specific/linux/kernel/generate-config.pl#L124 with lib.kernel.loadConfig.
  • [ ] enforce structuredConfig (get rid of configuration as strings ? rename extraStructruredConfig to extraConfig)
  • [ ] let derivations specify their kernel dependencies (via meta hints as in https://github.com/NixOS/nixpkgs/pull/55755 ? a specific type of derivation in propagatedBuildInputs ?)
  • [ ] build a config that respects package dependencies. Might be very tricky but at least check the final config

Related issues:
https://github.com/NixOS/nixpkgs/issues/41103
https://github.com/NixOS/nixpkgs/issues/2296
https://github.com/NixOS/nixpkgs/issues/20187

enhancement stale kernel

All 3 comments

The problem with this is that there is no way to validate the kernel feature requirements specified by modules. For example, if a module requires BPF but doesn't declare it, it will still work correctly if BPF is enabled by some other module.

One of my propositions is to tie the kernel requirement to the package (via meta.requiredKernelConfiguration for instance). Several packages can't be run without the proper kernel features (openvswitch/bpf/perf/mininet/powertop...).

Regarding your comment, if you just install this specific module and it doesn't declare its (required) dependency on BPF then you are screwed (in the absence of the other module) so you better declare it :p

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.
Was this page helpful?
0 / 5 - 0 ratings