forked from DGNum/liminix
move dts config from kernel to boot
The kernel does not need to know about the DTS. I am prepared to be very slightly injured on this hill.
This commit is contained in:
parent
17ce917af8
commit
817c3793d4
5 changed files with 32 additions and 30 deletions
|
@ -42,6 +42,12 @@
|
||||||
boot.tftp = {
|
boot.tftp = {
|
||||||
loadAddress = "0x00A00000";
|
loadAddress = "0x00A00000";
|
||||||
};
|
};
|
||||||
|
boot.dts = {
|
||||||
|
src = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
|
||||||
|
includes = [
|
||||||
|
"${openwrt}/target/linux/ath79/dts"
|
||||||
|
];
|
||||||
|
};
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.pkgsBuildBuild.fetchurl {
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
name = "linux.tar.gz";
|
name = "linux.tar.gz";
|
||||||
|
@ -61,12 +67,6 @@
|
||||||
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
||||||
patches ${openwrt}/target/linux/ath79/patches-5.15/*.patch
|
patches ${openwrt}/target/linux/ath79/patches-5.15/*.patch
|
||||||
'';
|
'';
|
||||||
dts = {
|
|
||||||
src = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
|
|
||||||
includes = [
|
|
||||||
"${openwrt}/target/linux/ath79/dts"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
MIPS_ELF_APPENDED_DTB = "y";
|
||||||
OF = "y";
|
OF = "y";
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
boot.tftp = {
|
boot.tftp = {
|
||||||
loadAddress = "0x00A00000";
|
loadAddress = "0x00A00000";
|
||||||
};
|
};
|
||||||
|
boot.dts = {
|
||||||
|
src = "${openwrt}/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts";
|
||||||
|
includes = [
|
||||||
|
"${openwrt}/target/linux/ramips/dts"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
@ -49,12 +55,6 @@
|
||||||
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
||||||
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
|
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
|
||||||
'';
|
'';
|
||||||
dts = {
|
|
||||||
src = "${openwrt}/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts";
|
|
||||||
includes = [
|
|
||||||
"${openwrt}/target/linux/ramips/dts"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
MIPS_ELF_APPENDED_DTB = "y";
|
||||||
OF = "y";
|
OF = "y";
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
boot.tftp = {
|
boot.tftp = {
|
||||||
loadAddress = "0x00A00000";
|
loadAddress = "0x00A00000";
|
||||||
};
|
};
|
||||||
|
boot.dts = {
|
||||||
|
src = "${openwrt}/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts";
|
||||||
|
includes = [
|
||||||
|
"${openwrt}/target/linux/ramips/dts"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
@ -49,12 +55,6 @@
|
||||||
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
|
||||||
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
|
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
|
||||||
'';
|
'';
|
||||||
dts = {
|
|
||||||
src = "${openwrt}/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts";
|
|
||||||
includes = [
|
|
||||||
"${openwrt}/target/linux/ramips/dts"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
MIPS_ELF_APPENDED_DTB = "y";
|
||||||
OF = "y";
|
OF = "y";
|
||||||
|
|
|
@ -29,13 +29,6 @@ in {
|
||||||
default = "true";
|
default = "true";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
} ;
|
} ;
|
||||||
dts = {
|
|
||||||
src = mkOption { type = types.path; };
|
|
||||||
includes = mkOption {
|
|
||||||
default = [];
|
|
||||||
type = types.listOf types.path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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
|
||||||
|
@ -48,10 +41,19 @@ in {
|
||||||
users = mkOption {
|
users = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
};
|
};
|
||||||
boot.commandLine = mkOption {
|
boot = {
|
||||||
|
dts = {
|
||||||
|
src = mkOption { type = types.path; };
|
||||||
|
includes = mkOption {
|
||||||
|
default = [];
|
||||||
|
type = types.listOf types.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
commandLine = mkOption {
|
||||||
type = types.listOf types.nonEmptyStr;
|
type = types.listOf types.nonEmptyStr;
|
||||||
default = [];
|
default = [];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
device.defaultOutput = mkOption {
|
device.defaultOutput = mkOption {
|
||||||
type = types.nonEmptyStr;
|
type = types.nonEmptyStr;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,8 +23,8 @@ in
|
||||||
inherit (config.kernel) config src extraPatchPhase;
|
inherit (config.kernel) config src extraPatchPhase;
|
||||||
};
|
};
|
||||||
dtb = (callPackage ../kernel/dtb.nix {}) {
|
dtb = (callPackage ../kernel/dtb.nix {}) {
|
||||||
dts = config.kernel.dts.src;
|
dts = config.boot.dts.src;
|
||||||
includes = config.kernel.dts.includes ++ [
|
includes = config.boot.dts.includes ++ [
|
||||||
"${kernel.headers}/include"
|
"${kernel.headers}/include"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue