liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fdf74fa06b2c61caa2674d71d89256f361479027
parent b8dea2ed3412f8d50253051f520177df35f49f85
Author: Daniel Barlow <dan@telent.net>
Date:   Thu,  5 Oct 2023 23:04:14 +0100

add mt7915, 7615 wifi modules

7915 won't work until we have working MTD, because it needs to
read calibration data from flash

Diffstat:
Mdevices/belkin-rt3200/default.nix | 27+++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/devices/belkin-rt3200/default.nix b/devices/belkin-rt3200/default.nix @@ -24,7 +24,16 @@ }; }; - module = {pkgs, config, lib, ... }: { + module = {pkgs, config, lib, ... }: + let firmware = pkgs.stdenv.mkDerivation { + name = "wlan-firmware"; + phases = ["installPhase"]; + installPhase = '' + mkdir $out + cp ${pkgs.linux-firmware}/lib/firmware/mediatek/{mt7915,mt7615,mt7622}* $out + ''; + }; + in { imports = [ ../../modules/arch/aarch64.nix ]; kernel = { src = pkgs.pkgsBuildBuild.fetchurl { @@ -111,12 +120,22 @@ boot.commandLine = [ "console=ttyS0,115200" ]; + filesystem = + let inherit (pkgs.pseudofile) dir symlink; + in + dir { + lib = dir { + firmware = dir { + mediatek = symlink firmware; + }; + }; + }; hardware = let openwrt = pkgs.openwrt; mac80211 = pkgs.mac80211.override { - drivers = ["mac80211_hwsim"]; + drivers = [ "mt7915e" "mt7615e"]; klibBuild = config.system.outputs.kernel.modulesupport; }; in { @@ -149,6 +168,10 @@ ifname = "wlan0"; dependencies = [ mac80211 ]; }; + wlan5 = link.build { + ifname = "wlan1"; + dependencies = [ mac80211 ]; + }; }; };