use Linux kernel sources associated with openwrt by default
This commit is contained in:
parent
0ee9c76c33
commit
f8a275d1a3
@ -79,11 +79,6 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.pkgsBuildBuild.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${pkgs.openwrt.applyPatches.mediatek}
|
${pkgs.openwrt.applyPatches.mediatek}
|
||||||
'';
|
'';
|
||||||
|
@ -5,11 +5,6 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.pkgsBuildBuild.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
MTD = "y";
|
MTD = "y";
|
||||||
MTD_BLOCK = "y";
|
MTD_BLOCK = "y";
|
||||||
|
@ -161,12 +161,6 @@
|
|||||||
appendDTB = true;
|
appendDTB = true;
|
||||||
};
|
};
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.pkgsBuildBuild.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Mainline linux 5.19 doesn't have device-tree support for
|
# Mainline linux 5.19 doesn't have device-tree support for
|
||||||
# this device or even for the SoC, so we use the extensive
|
# this device or even for the SoC, so we use the extensive
|
||||||
# OpenWrt kernel patches
|
# OpenWrt kernel patches
|
||||||
|
@ -114,11 +114,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
${openwrt.applyPatches.rt2x00}
|
${openwrt.applyPatches.rt2x00}
|
||||||
|
@ -125,11 +125,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
|
@ -50,11 +50,6 @@
|
|||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.pkgsBuildBuild.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${pkgs.openwrt.applyPatches.ramips}
|
${pkgs.openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
|
@ -250,14 +250,8 @@
|
|||||||
# IMAGE/ramboot-factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
|
# IMAGE/ramboot-factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
|
||||||
name = "linux.tar.gz";
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
||||||
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
||||||
};
|
|
||||||
extraPatchPhase = ''
|
extraPatchPhase = ''
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
|
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{ lib, pkgs, config, ...}:
|
{ lib, pkgs, config, ...}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types ;
|
inherit (lib) mkOption types ;
|
||||||
inherit (pkgs) liminix;
|
inherit (pkgs) liminix openwrt;
|
||||||
|
|
||||||
mergeConditionals = conf : conditions :
|
mergeConditionals = conf : conditions :
|
||||||
# for each key in conditions, if it is present in conf
|
# for each key in conditions, if it is present in conf
|
||||||
@ -21,8 +21,8 @@ let
|
|||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
kernel = {
|
kernel = {
|
||||||
src = mkOption { type = types.path; } ;
|
src = mkOption { type = types.path; default = openwrt.kernelSrc; } ;
|
||||||
version = mkOption { type = types.str; default = "5.15.137";} ;
|
version = mkOption { type = types.str; default = openwrt.kernelVersion;} ;
|
||||||
modular = mkOption {
|
modular = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -29,6 +29,17 @@ let
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
|
# The kernel sources typically used with this version of openwrt
|
||||||
|
# You can find this in `include/kernel-5.15` or similar in the
|
||||||
|
# openwrt sources
|
||||||
|
kernelSrc = pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
||||||
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
||||||
|
};
|
||||||
|
kernelVersion = "5.15.137";
|
||||||
|
|
||||||
applyPatches.ath79 = doPatch "ath79";
|
applyPatches.ath79 = doPatch "ath79";
|
||||||
applyPatches.ramips = doPatch "ramips";
|
applyPatches.ramips = doPatch "ramips";
|
||||||
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
||||||
|
Loading…
Reference in New Issue
Block a user