stdenv: Bringup aarch64 architecture support
This commit is contained in:
parent
41fd1ed903
commit
7c8a060c09
@ -15,7 +15,7 @@ rec {
|
|||||||
freebsd = ["i686-freebsd" "x86_64-freebsd"];
|
freebsd = ["i686-freebsd" "x86_64-freebsd"];
|
||||||
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
|
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
|
||||||
illumos = ["x86_64-solaris"];
|
illumos = ["x86_64-solaris"];
|
||||||
linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "mips64el-linux"];
|
linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mips64el-linux"];
|
||||||
netbsd = ["i686-netbsd" "x86_64-netbsd"];
|
netbsd = ["i686-netbsd" "x86_64-netbsd"];
|
||||||
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
||||||
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
||||||
|
@ -272,6 +272,7 @@ stdenv.mkDerivation {
|
|||||||
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
|
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
|
||||||
# ARM with a wildcard, which can be "" or "-armhf".
|
# ARM with a wildcard, which can be "" or "-armhf".
|
||||||
if stdenv.isArm then "ld-linux*.so.3" else
|
if stdenv.isArm then "ld-linux*.so.3" else
|
||||||
|
if stdenv.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else
|
||||||
if stdenv.system == "powerpc-linux" then "ld.so.1" else
|
if stdenv.system == "powerpc-linux" then "ld.so.1" else
|
||||||
if stdenv.system == "mips64el-linux" then "ld.so.1" else
|
if stdenv.system == "mips64el-linux" then "ld.so.1" else
|
||||||
if stdenv.system == "x86_64-darwin" then "/usr/lib/dyld" else
|
if stdenv.system == "x86_64-darwin" then "/usr/lib/dyld" else
|
||||||
|
@ -44,6 +44,7 @@ in
|
|||||||
"armv5tel-linux" = stagesLinux;
|
"armv5tel-linux" = stagesLinux;
|
||||||
"armv6l-linux" = stagesLinux;
|
"armv6l-linux" = stagesLinux;
|
||||||
"armv7l-linux" = stagesLinux;
|
"armv7l-linux" = stagesLinux;
|
||||||
|
"aarch64-linux" = stagesLinux;
|
||||||
"mips64el-linux" = stagesLinux;
|
"mips64el-linux" = stagesLinux;
|
||||||
"powerpc-linux" = /* stagesLinux */ stagesNative;
|
"powerpc-linux" = /* stagesLinux */ stagesNative;
|
||||||
"x86_64-darwin" = stagesDarwin;
|
"x86_64-darwin" = stagesDarwin;
|
||||||
|
@ -311,6 +311,7 @@ let
|
|||||||
|| system == "armv5tel-linux"
|
|| system == "armv5tel-linux"
|
||||||
|| system == "armv6l-linux"
|
|| system == "armv6l-linux"
|
||||||
|| system == "armv7l-linux"
|
|| system == "armv7l-linux"
|
||||||
|
|| system == "aarch64-linux"
|
||||||
|| system == "mips64el-linux";
|
|| system == "mips64el-linux";
|
||||||
isGNU = system == "i686-gnu"; # GNU/Hurd
|
isGNU = system == "i686-gnu"; # GNU/Hurd
|
||||||
isGlibc = isGNU # useful for `stdenvNative'
|
isGlibc = isGNU # useful for `stdenvNative'
|
||||||
@ -348,6 +349,7 @@ let
|
|||||||
isArm = system == "armv5tel-linux"
|
isArm = system == "armv5tel-linux"
|
||||||
|| system == "armv6l-linux"
|
|| system == "armv6l-linux"
|
||||||
|| system == "armv7l-linux";
|
|| system == "armv7l-linux";
|
||||||
|
isAarch64 = system == "aarch64-linux";
|
||||||
isBigEndian = system == "powerpc-linux";
|
isBigEndian = system == "powerpc-linux";
|
||||||
|
|
||||||
# Whether we should run paxctl to pax-mark binaries.
|
# Whether we should run paxctl to pax-mark binaries.
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
|
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
|
||||||
"armv6l-linux" = import ./bootstrap-files/armv6l.nix;
|
"armv6l-linux" = import ./bootstrap-files/armv6l.nix;
|
||||||
"armv7l-linux" = import ./bootstrap-files/armv7l.nix;
|
"armv7l-linux" = import ./bootstrap-files/armv7l.nix;
|
||||||
|
"aarch64-linux" = import ./bootstrap-files/aarch64.nix;
|
||||||
"mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
|
"mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
|
||||||
}.${localSystem.system}
|
}.${localSystem.system}
|
||||||
or (abort "unsupported platform for the pure Linux stdenv")
|
or (abort "unsupported platform for the pure Linux stdenv")
|
||||||
|
@ -50,10 +50,23 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
aarch64-multiplatform-crossSystem = {
|
||||||
|
crossSystem = rec {
|
||||||
|
config = "aarch64-linux-gnu";
|
||||||
|
bigEndian = false;
|
||||||
|
arch = "aarch64";
|
||||||
|
withTLS = true;
|
||||||
|
libc = "glibc";
|
||||||
|
platform = pkgsNoParams.platforms.aarch64-multiplatform;
|
||||||
|
inherit (platform) gcc;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
selectedCrossSystem =
|
selectedCrossSystem =
|
||||||
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
||||||
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
||||||
if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else null;
|
if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else
|
||||||
|
if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null;
|
||||||
|
|
||||||
pkgsUnspliced = pkgsFun ({inherit system;} // selectedCrossSystem);
|
pkgsUnspliced = pkgsFun ({inherit system;} // selectedCrossSystem);
|
||||||
pkgs = pkgsUnspliced.splicedPackages;
|
pkgs = pkgsUnspliced.splicedPackages;
|
||||||
@ -265,4 +278,5 @@ rec {
|
|||||||
armv5tel = buildFor "armv5tel";
|
armv5tel = buildFor "armv5tel";
|
||||||
armv6l = buildFor "armv6l";
|
armv6l = buildFor "armv6l";
|
||||||
armv7l = buildFor "armv7l";
|
armv7l = buildFor "armv7l";
|
||||||
|
aarch64 = buildFor "aarch64";
|
||||||
}
|
}
|
||||||
|
@ -443,12 +443,29 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
aarch64-multiplatform = {
|
||||||
|
name = "aarch64-multiplatform";
|
||||||
|
kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
|
||||||
|
kernelHeadersBaseConfig = "defconfig";
|
||||||
|
kernelBaseConfig = "defconfig";
|
||||||
|
kernelArch = "arm64";
|
||||||
|
kernelDTB = true;
|
||||||
|
kernelAutoModules = false;
|
||||||
|
kernelExtraConfig = "";
|
||||||
|
uboot = null;
|
||||||
|
kernelTarget = "Image";
|
||||||
|
gcc = {
|
||||||
|
arch = "armv8-a";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
selectPlatformBySystem = system: {
|
selectPlatformBySystem = system: {
|
||||||
"i686-linux" = pc32;
|
"i686-linux" = pc32;
|
||||||
"x86_64-linux" = pc64;
|
"x86_64-linux" = pc64;
|
||||||
"armv5tel-linux" = sheevaplug;
|
"armv5tel-linux" = sheevaplug;
|
||||||
"armv6l-linux" = raspberrypi;
|
"armv6l-linux" = raspberrypi;
|
||||||
"armv7l-linux" = armv7l-hf-multiplatform;
|
"armv7l-linux" = armv7l-hf-multiplatform;
|
||||||
|
"aarch64-linux" = aarch64-multiplatform;
|
||||||
"mips64el-linux" = fuloong2f_n32;
|
"mips64el-linux" = fuloong2f_n32;
|
||||||
}.${system} or pcBase;
|
}.${system} or pcBase;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user