From d217c4eff44379b9fff69433cfb7434e1a7d6172 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 3 Jul 2023 23:56:49 -0700 Subject: [PATCH] fmap, payload: move to top-level scope This commit moves the `fmap` and `payload` arguments to `coreboot` into the top-level scope, so they can be provided without needing to override the `coreboot` expression. --- src/platform/am1i/default.nix | 7 ++----- src/platform/kevin/default.nix | 5 +++-- src/platform/kgpe/default.nix | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/platform/am1i/default.nix b/src/platform/am1i/default.nix index cd1653b..2cf908f 100644 --- a/src/platform/am1i/default.nix +++ b/src/platform/am1i/default.nix @@ -18,15 +18,12 @@ }); console-device = "ttyS1"; - - image = prev.image.override { - payload = "${final.kernel}/bzImage"; - }; + payload = "${final.kernel}/bzImage"; + fmap = ./custom.fmap; coreboot = (prev.coreboot.override { iasl = final.iasl_20180531; coreboot-toolchain = with final.coreboot-toolchain; [ x64 i386 ]; - fmap = ./custom.fmap; config = with lib.kernel; { CBFS_PREFIX = lib.mkForce (freeform "prefix"); diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index ef77cca..56b23fc 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -76,14 +76,15 @@ in { inherit (final) initramfs kernel linux-command-line; }; + payload = "${final.fit}/Image.fit"; + fmap = ./custom.fmap; + image = prev.image.override { - payload = "${final.fit}/Image.fit"; initramfs = null; # it is part of the FIT image }; coreboot = (prev.coreboot.override { - fmap = ./custom.fmap; config = with lib.kernel; { CBFS_PREFIX = lib.mkForce (freeform "prefix"); diff --git a/src/platform/kgpe/default.nix b/src/platform/kgpe/default.nix index 5b79565..df56223 100644 --- a/src/platform/kgpe/default.nix +++ b/src/platform/kgpe/default.nix @@ -43,13 +43,11 @@ # TODO: use a NixOS-style structuredConfig for this. cmos-default = null; - image = prev.image.override { - payload = "${final.kernel}/bzImage"; - }; + payload = "${final.kernel}/bzImage"; + fmap = ./custom.fmap; coreboot = (prev.coreboot.override { iasl = final.iasl_20180531; - fmap = ./custom.fmap; config = with lib.kernel; { CBFS_PREFIX = lib.mkForce (freeform "prefix");