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";
};
};
}