commit eaf90df56ca9899a2b989e19c5d008d15447dd4f
parent cb392094928fea40baa4e39e4725fe4d02dc3a88
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 6 Feb 2023 23:19:35 +0000
per-device dts
Diffstat:
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/default.nix b/default.nix
@@ -37,7 +37,7 @@ let
inherit (config.kernel) config;
};
dtb = (callPackage ./kernel/dtb.nix {}) {
- dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
+ dts = config.kernel.dts { inherit openwrt; };
includes = [
"${openwrt}/target/linux/ath79/dts"
"${kernel.headers}/include"
@@ -95,5 +95,5 @@ in {
# this is just here as a convenience, so that we can get a
# cross-compiling nix-shell for any package we're customizing
- inherit pkgs;
+ inherit pkgs;
}
diff --git a/devices/gl-ar750/default.nix b/devices/gl-ar750/default.nix
@@ -62,6 +62,7 @@
};
};
kernel = rec {
+ dts = { openwrt,... }:"${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
diff --git a/modules/base.nix b/modules/base.nix
@@ -24,6 +24,7 @@ in {
};
filesystem = mkOption { type = types.anything; };
kernel = {
+ dts = mkOption { type = types.functionTo types.string; };
config = mkOption {
# mostly the values are y n or m, but sometimes
# other strings are also used