Permalink
Browse files

platforms.nix: Separate 32-bit and 64-bit PCs

With this, stdenv.platform.kernelArch can be used by the kernel builder
for PC platforms too.

Signed-off-by: Shea Levy <shea@shealevy.com>
  • Loading branch information...
1 parent 98860f4 commit 1a75b6b817ea1db73ee50ff4aa31c175caae0c32 @shlevy committed Mar 24, 2013
Showing with 14 additions and 7 deletions.
  1. +3 −1 pkgs/top-level/all-packages.nix
  2. +10 −5 pkgs/top-level/platforms.nix
  3. +1 −1 pkgs/top-level/release-cross.nix
@@ -84,7 +84,9 @@ let
if system == "armv6l-linux" then platforms.raspberrypi
else if system == "armv5tel-linux" then platforms.sheevaplug
else if system == "mips64el-linux" then platforms.fuloong2f_n32
- else platforms.pc;
+ else if system == "x86_64-linux" then platforms.pc64
+ else if system == "i686-linux" then platforms.pc32
+ else platforms.pcBase;
platform = if platform_ != null then platform_
else config.platform or platformAuto;
@@ -1,15 +1,12 @@
rec {
- pc = {
+ pcBase = {
name = "pc";
uboot = null;
kernelHeadersBaseConfig = "defconfig";
kernelBaseConfig = "defconfig";
# Build whatever possible as a module, if not stated in the extra config.
kernelAutoModules = true;
kernelTarget = "bzImage";
- # Currently ignored - it should be set according to 'system' once it is
- # not ignored. This is for stdenv-updates.
- kernelArch = "i386";
kernelExtraConfig =
''
# Virtualisation (KVM, Xen...).
@@ -24,7 +21,15 @@ rec {
'';
};
- pc_simplekernel = pc // {
+ pc64 = pcBase // { kernelArch = "x86_64"; };
+
+ pc32 = pcBase // { kernelArch = "i386"; };
+
+ pc32_simplekernel = pc32 // {
+ kernelAutoModules = false;
+ };
+
+ pc64_simplekernel = pc64 // {
kernelAutoModules = false;
};
@@ -192,7 +192,7 @@ let
arch = "i586";
float = "hard";
withTLS = true;
- platform = pkgs.platforms.pc;
+ platform = pkgs.platforms.pc32;
libc = "glibc";
openssl.system = "hurd-x86"; # Nix depends on OpenSSL.
};

0 comments on commit 1a75b6b

Please sign in to comment.