From 3205a38ac91b21f56aef869f79438b0daf7b0ca9 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 24 Sep 2023 00:17:32 +0100 Subject: [PATCH] mac80211 use correct arch --- pkgs/kernel-modules/default.nix | 7 ++++++- pkgs/mac80211/default.nix | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/kernel-modules/default.nix b/pkgs/kernel-modules/default.nix index 8113fcc..67ea363 100644 --- a/pkgs/kernel-modules/default.nix +++ b/pkgs/kernel-modules/default.nix @@ -11,6 +11,11 @@ }: let writeConfig = import ../kernel/write-kconfig.nix { inherit lib writeText; }; + arch = if stdenv.isMips + then "mips" + else if stdenv.isAarch64 + then "arm64" + else throw "unknown arch"; in stdenv.mkDerivation { name = "kernel-modules"; @@ -25,7 +30,7 @@ in stdenv.mkDerivation { HOST_EXTRACFLAGS = with buildPackages.pkgs; "-I${buildPackages.openssl.dev}/include -L${buildPackages.openssl.out}/lib"; CROSS_COMPILE = stdenv.cc.bintools.targetPrefix; - ARCH = "mips"; # kernel uses "mips" here for both mips and mipsel + ARCH = arch; KBUILD_BUILD_HOST = "liminix.builder"; buildPhase = '' diff --git a/pkgs/mac80211/default.nix b/pkgs/mac80211/default.nix index ff36dde..a0b7a47 100644 --- a/pkgs/mac80211/default.nix +++ b/pkgs/mac80211/default.nix @@ -14,6 +14,11 @@ , lib }: let + arch = if stdenv.isMips + then "mips" + else if stdenv.isAarch64 + then "arm64" + else throw "unknown arch"; openwrtSrc = fetchFromGitHub { name = "openwrt-source"; repo = "openwrt"; @@ -98,7 +103,7 @@ let which kmod cpio ]); inherit CC CROSS_COMPILE; - ARCH = "mips"; # kernel uses "mips" here for both mips and mipsel + ARCH = arch; dontStrip = true; dontPatchELF = true; phases = [