add per-device overlay
presently this is used to reference the appropriate kernel and (if needed) openwrt source trees, but I would not be surprised if we find other uses
This commit is contained in:
parent
fa31d00d6a
commit
77922c875b
9 changed files with 56 additions and 27 deletions
|
@ -6,15 +6,9 @@
|
|||
|
||||
, config
|
||||
, checkedConfig
|
||||
, sources
|
||||
}:
|
||||
let
|
||||
source = fetchFromGitHub {
|
||||
owner = "torvalds";
|
||||
repo = "linux";
|
||||
rev = "3d7cb6b04c3f3115719235cc6866b10326de34cd"; # v5.19
|
||||
hash = "sha256-OVsIRScAnrPleW1vbczRAj5L/SGGht2+GnvZJClMUu4=";
|
||||
};
|
||||
|
||||
# The kernel is huge and takes a long time just to
|
||||
# download and unpack. This derivation creates
|
||||
# a source tree in a suitable shape to build from -
|
||||
|
@ -24,7 +18,7 @@ let
|
|||
|
||||
tree = stdenvNoCC.mkDerivation {
|
||||
name = "spindled-kernel-tree";
|
||||
src = source;
|
||||
src = sources.kernel;
|
||||
phases = [ "unpackPhase" "patchPhase" "patchScripts" "installPhase" ];
|
||||
patches = [ ./random.patch ];
|
||||
patchScripts = ''
|
||||
|
@ -36,15 +30,6 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
openwrtSource = fetchFromGitHub {
|
||||
name = "openwrt-source-tree";
|
||||
repo = "openwrt";
|
||||
owner = "openwrt";
|
||||
rev = "a5265497a4f6da158e95d6a450cb2cb6dc085cab";
|
||||
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
|
||||
};
|
||||
|
||||
|
||||
in rec {
|
||||
vmlinux = callPackage ./vmlinux.nix {
|
||||
inherit tree config checkedConfig;
|
||||
|
@ -53,7 +38,7 @@ in rec {
|
|||
uimage = callPackage ./uimage.nix { };
|
||||
|
||||
dtb = callPackage ./dtb.nix {
|
||||
openwrt = openwrtSource;
|
||||
openwrt = sources.openwrt;
|
||||
kernel = tree;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue