diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index 2beca10..bf21d57 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -65,18 +65,20 @@ in { # https://github.com/SolidHal/servo-v2-breakout-board console-device = "ttyS2"; + atf = final.nixpkgsOnBuildForHost.callPackage (import ./atf) { + buildArmTrustedFirmware = (final.nixpkgsOnBuildForHost.arm-trusted-firmware.override { + unfreeIncludeHDCPBlob = false; + openssl = null; # not sure why they would link in openssl... + }).buildArmTrustedFirmware; + }; + + fit = final.nixpkgsOnBuildForBuild.callPackage (import ./fit) { + inherit (final) initramfs kernel; + }; + coreboot = - let atf = final.nixpkgsOnBuildForHost.callPackage (import ./atf) { - buildArmTrustedFirmware = (final.nixpkgsOnBuildForHost.arm-trusted-firmware.override { - unfreeIncludeHDCPBlob = false; - openssl = null; # not sure why they would link in openssl... - }).buildArmTrustedFirmware; - }; - fit = final.nixpkgsOnBuildForBuild.callPackage (import ./fit) { - inherit (final) initramfs kernel; - }; - in (prev.coreboot.override { - payload = "${fit}/Image.fit"; + (prev.coreboot.override { + payload = "${final.fit}/Image.fit"; fmap = ./custom.fmap; config = with lib.kernel; { CBFS_PREFIX = lib.mkForce (freeform "prefix"); @@ -109,7 +111,7 @@ in { CONSOLE_CBMEM = lib.mkForce no; COLLECT_TIMESTAMPS = lib.mkForce no; - ARM64_BL31_EXTERNAL_FILE = lib.mkForce (freeform "${atf}/bl31.elf"); + ARM64_BL31_EXTERNAL_FILE = lib.mkForce (freeform "${final.atf}/bl31.elf"); }; coreboot-toolchain = with final.coreboot-toolchain; [ aarch64 ]; initramfs_image = null; # it is part of the FIT image @@ -120,11 +122,11 @@ in { }).overrideAttrs (a: { postConfigure = '' mkdir -p 3rdparty/arm-trusted-firmware/plat/rockchip/common/include/ - ln -s ${atf}/plat_params.h 3rdparty/arm-trusted-firmware/plat/rockchip/common/include/ + ln -s ${final.atf}/plat_params.h 3rdparty/arm-trusted-firmware/plat/rockchip/common/include/ mkdir -p 3rdparty/arm-trusted-firmware/plat/rockchip/rk3399/include/shared/ - ln -s ${atf}/bl31_param.h 3rdparty/arm-trusted-firmware/plat/rockchip/rk3399/include/shared/ + ln -s ${final.atf}/bl31_param.h 3rdparty/arm-trusted-firmware/plat/rockchip/rk3399/include/shared/ mkdir -p 3rdparty/arm-trusted-firmware - ln -s ${atf}/include 3rdparty/arm-trusted-firmware/include + ln -s ${final.atf}/include 3rdparty/arm-trusted-firmware/include ''; });