~amjoseph/ownerboot

4504f5afb5fadb39015e2251fc452816fb17b864 — Adam Joseph 6 months ago 4dbea5f
kgpe: fix no-microcode builds
1 files changed, 7 insertions(+), 9 deletions(-)

M src/platform/kgpe/default.nix
M src/platform/kgpe/default.nix => src/platform/kgpe/default.nix +7 -9
@@ 112,9 112,6 @@

        NO_POST = lib.mkForce yes;

        CPU_MICROCODE_CBFS_GENERATE = lib.mkForce yes;
        CPU_MICROCODE_MULTIPLE_FILES = lib.mkForce yes;
        CPU_UCODE_BINARIES = lib.mkForce (freeform "");
        COLLECT_TIMESTAMPS = lib.mkForce no;
        DRIVERS_INTEL_WIFI = lib.mkForce no;
        EXT_CONF_SUPPORT = lib.mkForce no;


@@ 129,7 126,13 @@
        # booting, although it may take two (or in rare cases three)
        # attempts.  You absolutely want this for unattended servers.
        USE_WATCHDOG_ON_BOOT = lib.mkForce yes;
      };
      } // (if final.microcode-blob != null then {
        CPU_MICROCODE_CBFS_GENERATE = lib.mkForce yes;
        CPU_MICROCODE_MULTIPLE_FILES = lib.mkForce yes;
        CPU_UCODE_BINARIES = lib.mkForce (freeform "");
      } else {
        CPU_MICROCODE_CBFS_NONE = lib.mkForce yes;
      });
      coreboot-toolchain = with final.coreboot-toolchain; [ x64 i386 ];
      uart-for-console =
        if      final.console-device == "ttyS0" then 0 # the DB9 connector on the rear panel


@@ 137,11 140,6 @@
        else if final.console-device == null then null
        else throw "kgpe currently supports only `null` and `ttyS{0,1}` for `console-device`";
    }).overrideAttrs (a: {
      postConfigure = if final.microcode-blob != null then ''
        echo CONFIG_CPU_MICROCODE_MULTIPLE_FILES=y >> .config
      '' else ''
        echo CONFIG_CPU_MICROCODE_CBFS_NONE=y >> .config
      '';
      preBuild = final.lib.optionalString (final.microcode-blob != null) ''
        mkdir -p 3rdparty/blobs/cpu/amd/family_15h/
        ln -sfT ${final.microcode-blob} \