moby: kernel: build the in-tree MFD_RK8XX, just plumb it so nixos doesnt complain about conflicting module suppliers
This commit is contained in:
@@ -120,6 +120,20 @@ in
|
||||
config.boot.kernelPackages.rk818-charger #< rk818 battery/charger isn't mainline as of 2024-10-01
|
||||
];
|
||||
|
||||
# default nixos behavior is to error if a kernel module is provided by more than one package.
|
||||
# in fact, i'm _intentionally_ overwriting the in-tree modules, so inline this buildEnv logic
|
||||
# from <repo:nixos/nixpkgs:nixos/modules/system/boot/kernel.nix> AKA pkgs.aggregateModules
|
||||
# but configured to **ignore collisions**
|
||||
system.modulesTree = lib.mkForce [(
|
||||
(pkgs.aggregateModules
|
||||
( config.boot.extraModulePackages ++ [ config.boot.kernelPackages.kernel ])
|
||||
).overrideAttrs {
|
||||
# earlier items override the contents of later items
|
||||
ignoreCollisions = true;
|
||||
# checkCollisionContents = false;
|
||||
}
|
||||
)];
|
||||
|
||||
boot.kernelModules = [
|
||||
# these don't get probed automatically, not sure why (shouldn't the device tree cause it to be auto-loaded?)
|
||||
# but are needed for battery capacity/charging info
|
||||
|
@@ -384,12 +384,12 @@ linux_latest.override {
|
||||
name = "make-module-for-out-of-tree";
|
||||
patch = null;
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
MFD_RK8XX = no;
|
||||
MFD_RK8XX_I2C = no;
|
||||
MFD_RK8XX_SPI = no; #< necessary for MFD_RK8XX=... to apply
|
||||
# MFD_RK8XX = module;
|
||||
# MFD_RK8XX_I2C = module;
|
||||
# MFD_RK8XX_SPI = module;
|
||||
# MFD_RK8XX = no;
|
||||
# MFD_RK8XX_I2C = no;
|
||||
# MFD_RK8XX_SPI = no; #< necessary for MFD_RK8XX=... to apply
|
||||
MFD_RK8XX = module;
|
||||
MFD_RK8XX_I2C = module;
|
||||
MFD_RK8XX_SPI = module;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user