forked from DGNum/liminix
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:
parent
12b9feb8ee
commit
f75995e895
7 changed files with 37 additions and 11 deletions
|
@ -79,7 +79,10 @@
|
||||||
inherit (pkgs.pseudofile) dir symlink;
|
inherit (pkgs.pseudofile) dir symlink;
|
||||||
inherit (pkgs.liminix.networking) interface;
|
inherit (pkgs.liminix.networking) interface;
|
||||||
in {
|
in {
|
||||||
imports = [ ../../modules/network];
|
imports = [
|
||||||
|
../../modules/network
|
||||||
|
../../modules/arch/mipseb.nix
|
||||||
|
];
|
||||||
|
|
||||||
programs.busybox.options = {
|
programs.busybox.options = {
|
||||||
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
|
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
|
||||||
|
@ -139,7 +142,6 @@
|
||||||
${openwrt.applyPatches.ath79}
|
${openwrt.applyPatches.ath79}
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
|
||||||
OF = "y";
|
OF = "y";
|
||||||
USE_OF = "y";
|
USE_OF = "y";
|
||||||
ATH79 = "y";
|
ATH79 = "y";
|
||||||
|
@ -192,8 +194,6 @@
|
||||||
WATCHDOG = "y";
|
WATCHDOG = "y";
|
||||||
ATH79_WDT = "y"; # watchdog timer
|
ATH79_WDT = "y"; # watchdog timer
|
||||||
|
|
||||||
CPU_BIG_ENDIAN= "y";
|
|
||||||
|
|
||||||
# this is all copied from nixwrt ath79 config. Clearly not all
|
# this is all copied from nixwrt ath79 config. Clearly not all
|
||||||
# of it is device config, some of it is wifi config or
|
# of it is device config, some of it is wifi config or
|
||||||
# installation method config or ...
|
# installation method config or ...
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
klibBuild = config.system.outputs.kernel.modulesupport;
|
klibBuild = config.system.outputs.kernel.modulesupport;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
imports = [ ../../modules/arch/mipsel.nix ];
|
||||||
hardware = {
|
hardware = {
|
||||||
defaultOutput = "flashimage";
|
defaultOutput = "flashimage";
|
||||||
loadAddress = "0x80000000";
|
loadAddress = "0x80000000";
|
||||||
|
@ -107,7 +108,6 @@
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
|
||||||
OF = "y";
|
OF = "y";
|
||||||
USE_OF = "y";
|
USE_OF = "y";
|
||||||
|
|
||||||
|
@ -143,8 +143,6 @@
|
||||||
MTD_CMDLINE_PARTS = "y";
|
MTD_CMDLINE_PARTS = "y";
|
||||||
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
|
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
|
||||||
|
|
||||||
CPU_LITTLE_ENDIAN = "y";
|
|
||||||
|
|
||||||
CMDLINE_PARTITION = "y";
|
CMDLINE_PARTITION = "y";
|
||||||
EARLY_PRINTK = "y";
|
EARLY_PRINTK = "y";
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
hash = "sha256:1dkhfznmdz6s50kwc841x3wj0h6zg6icg5g2bim9pvg66as2vmh9";
|
hash = "sha256:1dkhfznmdz6s50kwc841x3wj0h6zg6icg5g2bim9pvg66as2vmh9";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
imports = [ ../../modules/arch/mipsel.nix ];
|
||||||
filesystem = dir {
|
filesystem = dir {
|
||||||
lib = dir {
|
lib = dir {
|
||||||
firmware = dir {
|
firmware = dir {
|
||||||
|
@ -103,14 +104,12 @@
|
||||||
${openwrt.applyPatches.ramips}
|
${openwrt.applyPatches.ramips}
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
MIPS_ELF_APPENDED_DTB = "y";
|
|
||||||
OF = "y";
|
OF = "y";
|
||||||
USE_OF = "y";
|
USE_OF = "y";
|
||||||
|
|
||||||
RALINK = "y";
|
RALINK = "y";
|
||||||
PCI = "y";
|
PCI = "y";
|
||||||
SOC_MT7620 = "y";
|
SOC_MT7620 = "y";
|
||||||
CPU_LITTLE_ENDIAN= "y";
|
|
||||||
|
|
||||||
SERIAL_8250_CONSOLE = "y";
|
SERIAL_8250_CONSOLE = "y";
|
||||||
SERIAL_8250 = "y";
|
SERIAL_8250 = "y";
|
||||||
|
|
11
modules/arch/mips.nix
Normal file
11
modules/arch/mips.nix
Normal 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
9
modules/arch/mipseb.nix
Normal 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
9
modules/arch/mipsel.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ lib, pkgs, config, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ./mips.nix ];
|
||||||
|
config = {
|
||||||
|
kernel.config = {
|
||||||
|
CPU_LITTLE_ENDIAN = "y";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -81,7 +81,7 @@ in {
|
||||||
[ s6 s6-init-bin execline s6-linux-init s6-rc ];
|
[ s6 s6-init-bin execline s6-linux-init s6-rc ];
|
||||||
|
|
||||||
boot.commandLine = [
|
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}"
|
"root=${config.hardware.rootDevice}"
|
||||||
"rootfstype=${config.rootfsType}"
|
"rootfstype=${config.rootfsType}"
|
||||||
"fw_devlink=off"
|
"fw_devlink=off"
|
||||||
|
|
Loading…
Reference in a new issue