diff options
author | Karel Kočí <cynerd@email.cz> | 2022-08-19 23:59:13 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-08-19 23:59:13 +0200 |
commit | c12a03b8511f4742123959f0cb3c96a441ac2581 (patch) | |
tree | eabfc5c8c962fe482d8dbf545389de92bdebb757 /nixos | |
parent | 1669d6f75914738306d8dff587d0bcb69b8f6b76 (diff) | |
download | nixturris-c12a03b8511f4742123959f0cb3c96a441ac2581.tar.gz nixturris-c12a03b8511f4742123959f0cb3c96a441ac2581.tar.bz2 nixturris-c12a03b8511f4742123959f0cb3c96a441ac2581.zip |
Improve kernel support and hostapd
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/default.nix | 2 | ||||
-rw-r--r-- | nixos/modules/hostapd.nix | 2 | ||||
-rw-r--r-- | nixos/modules/turris-defaults.nix | 17 | ||||
-rw-r--r-- | nixos/modules/turris-mox-support.nix | 29 | ||||
-rw-r--r-- | nixos/modules/turris-omnia-support.nix | 28 |
5 files changed, 60 insertions, 18 deletions
diff --git a/nixos/default.nix b/nixos/default.nix index d8930eb..50a4ff6 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -5,7 +5,9 @@ self: let turris-board = import ./modules/turris-board.nix; turris-crossbuild = import ./modules/turris-crossbuild.nix; turris-defaults = import ./modules/turris-defaults.nix; + turris-mox-support = import ./modules/turris-mox-support.nix; turris-moxled = import ./modules/turris-moxled.nix; + turris-omnia-support = import ./modules/turris-omnia-support.nix; turris-tarball = import ./modules/turris-tarball.nix; armv7l-overlay = import ./modules/armv7l-overlay.nix; diff --git a/nixos/modules/hostapd.nix b/nixos/modules/hostapd.nix index de3035b..0dd5d23 100644 --- a/nixos/modules/hostapd.nix +++ b/nixos/modules/hostapd.nix @@ -448,6 +448,7 @@ let interface=${iface} driver=${icfg.driver} + use_driver_iface_addr=1 hw_mode=${icfg.hwMode} channel=${toString icfg.channel} country_code=${icfg.countryCode} @@ -477,7 +478,6 @@ let ${concatMapStringsSep "\n" (bss: '' bss=${bss} - use_driver_iface_addr=1 ${configBss icfg.bss."${bss}"}'') (attrNames icfg.bss)} ${icfg.extraConfig} diff --git a/nixos/modules/turris-defaults.nix b/nixos/modules/turris-defaults.nix index f79b8c4..bba3d18 100644 --- a/nixos/modules/turris-defaults.nix +++ b/nixos/modules/turris-defaults.nix @@ -33,23 +33,10 @@ in { # Use early print to the serial console boot.kernelParams = [ "boot.shell_on_fail" - ] ++ optionals (config.turris.board == "mox") [ - "earlycon=ar3700_uart,0xd0012000" "console=ttyMV0,115200" - "pcie_aspm=off" # Fix for crashes due to SError Interrupt on ath10k load - ] ++ optionals (config.turris.board == "omnia") [ - "earlyprintk" "console=ttyS0,115200" ]; # Use the latest kernel boot.kernelPackages = mkDefault pkgs.linuxPackages_latest; - boot.kernelPatches = mkIf (config.turris.board == "omnia") [{ - name = "omnia"; - patch = null; - extraConfig = '' - LEDS_CLASS_MULTICOLOR y - LEDS_TURRIS_OMNIA y - ''; - }]; # The supported deployment is on BTRFS boot.supportedFilesystems = [ "btrfs" ]; @@ -78,10 +65,6 @@ in { # The additional administration packages environment.systemPackages = with pkgs; [ htop - ] ++ optionals (config.turris.board == "mox") [ - #mox-otp - ] ++ optionals (config.turris.board == "omnia") [ - libatsha204 ]; # No need for installer tools in standard system diff --git a/nixos/modules/turris-mox-support.nix b/nixos/modules/turris-mox-support.nix new file mode 100644 index 0000000..9596b15 --- /dev/null +++ b/nixos/modules/turris-mox-support.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + + config = mkIf (config.turris.board == "mox") { + # Use early print to the serial console + boot.kernelParams = [ + "earlycon=ar3700_uart,0xd0012000" "console=ttyMV0,115200" + "pcie_aspm=off" # Fix for crashes due to SError Interrupt on ath10k load + ]; + # Custom kernel config + boot.kernelPatches = [{ + name = "rwtm"; + patch = null; + extraConfig = '' + TURRIS_MOX_RWTM y + ARMADA_37XX_RWTM_MBOX y + ''; + }]; + + # The additional administration packages + environment.systemPackages = with pkgs; [ + #mox-otp + ]; + + }; +} diff --git a/nixos/modules/turris-omnia-support.nix b/nixos/modules/turris-omnia-support.nix new file mode 100644 index 0000000..b68affc --- /dev/null +++ b/nixos/modules/turris-omnia-support.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + + config = mkIf (config.turris.board == "omnia") { + # Use early print to the serial console + boot.kernelParams = [ + "earlyprintk" "console=ttyS0,115200" + ]; + # Custom kernel config + boot.kernelPatches = [{ + name = "omnia"; + patch = null; + extraConfig = '' + LEDS_CLASS_MULTICOLOR y + LEDS_TURRIS_OMNIA y + ''; + }]; + + # The additional administration packages + environment.systemPackages = with pkgs; [ + libatsha204 + ]; + + }; +} |