per-device dts

This commit is contained in:
Daniel Barlow 2023-02-06 23:19:35 +00:00
parent cb39209492
commit eaf90df56c
3 changed files with 4 additions and 2 deletions

View file

@ -37,7 +37,7 @@ let
inherit (config.kernel) config; inherit (config.kernel) config;
}; };
dtb = (callPackage ./kernel/dtb.nix {}) { dtb = (callPackage ./kernel/dtb.nix {}) {
dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts"; dts = config.kernel.dts { inherit openwrt; };
includes = [ includes = [
"${openwrt}/target/linux/ath79/dts" "${openwrt}/target/linux/ath79/dts"
"${kernel.headers}/include" "${kernel.headers}/include"
@ -95,5 +95,5 @@ in {
# this is just here as a convenience, so that we can get a # this is just here as a convenience, so that we can get a
# cross-compiling nix-shell for any package we're customizing # cross-compiling nix-shell for any package we're customizing
inherit pkgs; inherit pkgs;
} }

View file

@ -62,6 +62,7 @@
}; };
}; };
kernel = rec { kernel = rec {
dts = { openwrt,... }:"${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
config = { config = {
MIPS_ELF_APPENDED_DTB = "y"; MIPS_ELF_APPENDED_DTB = "y";
OF = "y"; OF = "y";

View file

@ -24,6 +24,7 @@ in {
}; };
filesystem = mkOption { type = types.anything; }; filesystem = mkOption { type = types.anything; };
kernel = { kernel = {
dts = mkOption { type = types.functionTo types.string; };
config = mkOption { config = mkOption {
# mostly the values are y n or m, but sometimes # mostly the values are y n or m, but sometimes
# other strings are also used # other strings are also used