introduce modules/arch/{mipsel,mipseb}.nix

for settings that are common to all mipse[lb] but would not be shared
with e.g. aarch64 or x86
This commit is contained in:
Daniel Barlow
2023-09-20 17:27:04 +01:00
parent 12b9feb8ee
commit f75995e895
7 changed files with 37 additions and 11 deletions

11
modules/arch/mips.nix Normal file
View File

@@ -0,0 +1,11 @@
{ lib, pkgs, config, ...}:
{
config = {
kernel.config = {
MIPS_ELF_APPENDED_DTB = "y";
};
boot.commandLine = [
"console=ttyS0,115200" # true of all mips we've yet encountered
];
};
}

9
modules/arch/mipseb.nix Normal file
View File

@@ -0,0 +1,9 @@
{ lib, pkgs, config, ...}:
{
imports = [ ./mips.nix ];
config = {
kernel.config = {
CPU_BIG_ENDIAN = "y";
};
};
}

9
modules/arch/mipsel.nix Normal file
View File

@@ -0,0 +1,9 @@
{ lib, pkgs, config, ...}:
{
imports = [ ./mips.nix ];
config = {
kernel.config = {
CPU_LITTLE_ENDIAN = "y";
};
};
}

View File

@@ -81,7 +81,7 @@ in {
[ s6 s6-init-bin execline s6-linux-init s6-rc ];
boot.commandLine = [
"console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8"
"panic=10 oops=panic init=/bin/init loglevel=8"
"root=${config.hardware.rootDevice}"
"rootfstype=${config.rootfsType}"
"fw_devlink=off"