forked from DGNum/liminix
add kernel.version param to allow for version-specific patches
default to 5.15.137 to avoid breaking the devices that don't declare it
This commit is contained in:
parent
1206d02200
commit
812f497660
2 changed files with 6 additions and 3 deletions
|
@ -27,6 +27,7 @@ in {
|
||||||
options = {
|
options = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = mkOption { type = types.path; } ;
|
src = mkOption { type = types.path; } ;
|
||||||
|
version = mkOption { type = types.str; default = "5.15.137";} ;
|
||||||
modular = mkOption {
|
modular = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -79,6 +80,7 @@ in {
|
||||||
config.kernel.conditionalConfig;
|
config.kernel.conditionalConfig;
|
||||||
k = liminix.builders.kernel.override {
|
k = liminix.builders.kernel.override {
|
||||||
config = mergedConfig;
|
config = mergedConfig;
|
||||||
|
version = builtins.trace config.kernel.version config.kernel.version;
|
||||||
inherit (config.kernel) src extraPatchPhase;
|
inherit (config.kernel) src extraPatchPhase;
|
||||||
targets = config.kernel.makeTargets;
|
targets = config.kernel.makeTargets;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
, config
|
, config
|
||||||
, src
|
, src
|
||||||
|
, version ? "0"
|
||||||
, extraPatchPhase ? "echo"
|
, extraPatchPhase ? "echo"
|
||||||
, targets ? ["vmlinux"]
|
, targets ? ["vmlinux"]
|
||||||
} :
|
} :
|
||||||
|
@ -51,9 +52,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./cmdline-cookie.patch
|
./cmdline-cookie.patch
|
||||||
./phram-allow-cached-mappings.patch
|
|
||||||
./mips-malta-fdt-from-bootloader.patch
|
./mips-malta-fdt-from-bootloader.patch
|
||||||
];
|
] ++ lib.optional (lib.versionOlder version "5.18.0")
|
||||||
|
./phram-allow-cached-mappings.patch;
|
||||||
|
|
||||||
# this is here to work around what I think is a bug in nixpkgs
|
# this is here to work around what I think is a bug in nixpkgs
|
||||||
# packaging of ncurses: it installs pkg-config data files which
|
# packaging of ncurses: it installs pkg-config data files which
|
||||||
|
|
Loading…
Reference in a new issue