Unverified Commit 95c8d1ec authored by Alyssa Ross's avatar Alyssa Ross Committed by GitHub
Browse files

lib/systems/platforms: Add ppc64; linux: Add 64-bit POWER settings, strip vmlinux kernels (#447752)

parents 7dd5f05b 34b0a86b
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@ rec {
    linux-kernel.autoModules = false;
  };

  ##
  ## POWER
  ##

  powernv = {
    linux-kernel = {
      name = "PowerNV";
@@ -29,16 +33,16 @@ rec {
      baseConfig = "powernv_defconfig";
      target = "vmlinux";
      autoModules = true;
      # avoid driver/FS trouble arising from unusual page size
      extraConfig = ''
        PPC_64K_PAGES n
        PPC_4K_PAGES y
        IPV6 y
    };
  };

        ATA_BMDMA y
        ATA_SFF y
        VIRTIO_MENU y
      '';
  ppc64 = {
    linux-kernel = {
      name = "powerpc64";

      baseConfig = "ppc64_defconfig";
      target = "vmlinux";
      autoModules = true;
    };
  };

@@ -625,8 +629,8 @@ rec {
    else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then
      (import ./examples.nix { inherit lib; }).mipsel-linux-gnu

    else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then
      powernv
    else if platform.isPower64 then
      if platform.isLittleEndian then powernv else ppc64

    else if platform.isLoongArch64 then
      loongarch64-multiplatform
+6 −0
Original line number Diff line number Diff line
@@ -504,6 +504,12 @@ lib.makeOverridable (
        export HOME=${installkernel}
      '';

    preFixup = ''
      if [ -z "''${dontStrip-}" -a -e $out/vmlinux ]; then
        strip -v -S -p $out/vmlinux
      fi
    '';

    requiredSystemFeatures = [ "big-parallel" ];

    passthru = rec {
+21 −0
Original line number Diff line number Diff line
@@ -988,6 +988,9 @@ let
      XEN_PVHVM = option yes;
      XEN_SAVE_RESTORE = option yes;

      # Disabled by default on POWER
      VIRTIO_MENU = yes;

      # Enable device detection on virtio-mmio hypervisors
      VIRTIO_MMIO_CMDLINE_DEVICES = yes;

@@ -1435,6 +1438,10 @@ let
        # Enable coreboot firmware drivers.
        # While these are called CONFIG_GOOGLE_*, they apply to coreboot systems in general.
        GOOGLE_FIRMWARE = yes;

        # Disabled by default on POWER
        ATA_BMDMA = yes;
        ATA_SFF = yes;
      }
      //
        lib.optionalAttrs
@@ -1550,6 +1557,20 @@ let

        # Enable Intel Turbo Boost Max 3.0
        INTEL_TURBO_MAX_3 = yes;
      }
      // lib.optionalAttrs (stdenv.hostPlatform.isPower64) {
        # avoid driver/FS trouble arising from unusual page size
        PPC_64K_PAGES = no;
        PPC_4K_PAGES = yes;

        # Does not get auto-loaded on relevant systems, makes fans stuck at max speed.
        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713943 (2014 :<)
        # > This module ought to be auto-loaded where it's needed, but somehow that
        # > has broken.  I asked Benjamin Herrenschmidt (upstream powerpc maintainer
        # > and the last person to touch it) and he was aware of this but hadn't got
        # > round to working out why.  The workaround is to build it in[…].
        # > (It won't do any harm on non-Mac systems.)
        I2C_POWERMAC = yes;
      };

    accel = {