liminix

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

commit 8879b2d1ba9b1b21fd0ed2b427128ae9a286fd4b
parent 83e346d5a0ce58622daebee8ecb9b92cdebd0d06
Author: Daniel Barlow <dan@telent.net>
Date:   Sun, 24 Mar 2024 23:21:52 +0000

fix rt2x00 wifi

Diffstat:
Mdevices/gl-mt300a/default.nix | 1+
Mpkgs/openwrt/default.nix | 22++++++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/devices/gl-mt300a/default.nix b/devices/gl-mt300a/default.nix @@ -136,6 +136,7 @@ }; extraPatchPhase = '' ${openwrt.applyPatches.ramips} + ${openwrt.applyPatches.rt2x00} ''; config = { diff --git a/pkgs/openwrt/default.nix b/pkgs/openwrt/default.nix @@ -1,6 +1,7 @@ { fetchFromGitHub , writeShellScript +, pkgsBuildBuild }: let src = fetchFromGitHub { @@ -36,4 +37,25 @@ in { applyPatches.ramips = doPatch "ramips"; applyPatches.mediatek = doPatch "mediatek"; # aarch64 applyPatches.mvebu = doPatch "mvebu"; # arm + + applyPatches.rt2x00 = '' + PATH=${pkgsBuildBuild.patchutils}/bin:$PATH + for i in ${src}/package/kernel/mac80211/patches/rt2x00/6*.patch ; do + fixed=$(basename $i).fixed + sed '/depends on m/d' < $i | sed 's/CPTCFG_/CONFIG_/g' | recountdiff | filterdiff -x '*/local-symbols' > $fixed + case $fixed in + 606-*) + ;; + 611-*) + filterdiff -x '*/rt2x00.h' < $fixed | patch --forward -p1 + ;; + 601-*|607-*) + filterdiff -x '*/rt2x00_platform.h' < $fixed | patch --forward -p1 + ;; + *) + cat $fixed | patch --forward -p1 + ;; + esac + done + ''; }