mac80211 use correct arch
This commit is contained in:
parent
119d6ad379
commit
3205a38ac9
2 changed files with 12 additions and 2 deletions
|
@ -11,6 +11,11 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
writeConfig = import ../kernel/write-kconfig.nix { inherit lib writeText; };
|
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 {
|
in stdenv.mkDerivation {
|
||||||
name = "kernel-modules";
|
name = "kernel-modules";
|
||||||
|
|
||||||
|
@ -25,7 +30,7 @@ in stdenv.mkDerivation {
|
||||||
HOST_EXTRACFLAGS = with buildPackages.pkgs;
|
HOST_EXTRACFLAGS = with buildPackages.pkgs;
|
||||||
"-I${buildPackages.openssl.dev}/include -L${buildPackages.openssl.out}/lib";
|
"-I${buildPackages.openssl.dev}/include -L${buildPackages.openssl.out}/lib";
|
||||||
CROSS_COMPILE = stdenv.cc.bintools.targetPrefix;
|
CROSS_COMPILE = stdenv.cc.bintools.targetPrefix;
|
||||||
ARCH = "mips"; # kernel uses "mips" here for both mips and mipsel
|
ARCH = arch;
|
||||||
KBUILD_BUILD_HOST = "liminix.builder";
|
KBUILD_BUILD_HOST = "liminix.builder";
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
, lib
|
, lib
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
arch = if stdenv.isMips
|
||||||
|
then "mips"
|
||||||
|
else if stdenv.isAarch64
|
||||||
|
then "arm64"
|
||||||
|
else throw "unknown arch";
|
||||||
openwrtSrc = fetchFromGitHub {
|
openwrtSrc = fetchFromGitHub {
|
||||||
name = "openwrt-source";
|
name = "openwrt-source";
|
||||||
repo = "openwrt";
|
repo = "openwrt";
|
||||||
|
@ -98,7 +103,7 @@ let
|
||||||
which kmod cpio
|
which kmod cpio
|
||||||
]);
|
]);
|
||||||
inherit CC CROSS_COMPILE;
|
inherit CC CROSS_COMPILE;
|
||||||
ARCH = "mips"; # kernel uses "mips" here for both mips and mipsel
|
ARCH = arch;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
phases = [
|
phases = [
|
||||||
|
|
Loading…
Reference in a new issue