src/plat/kevin: allow to override atf and fit

This commit lifts `atf` and `fit` into the ownerboot scope where
they can be selectively overridden.
master
Adam Joseph 1 year ago
parent c0c6141971
commit 1a92a17774

@ -65,18 +65,20 @@ in {
# https://github.com/SolidHal/servo-v2-breakout-board # https://github.com/SolidHal/servo-v2-breakout-board
console-device = "ttyS2"; console-device = "ttyS2";
coreboot = atf = final.nixpkgsOnBuildForHost.callPackage (import ./atf) {
let atf = final.nixpkgsOnBuildForHost.callPackage (import ./atf) {
buildArmTrustedFirmware = (final.nixpkgsOnBuildForHost.arm-trusted-firmware.override { buildArmTrustedFirmware = (final.nixpkgsOnBuildForHost.arm-trusted-firmware.override {
unfreeIncludeHDCPBlob = false; unfreeIncludeHDCPBlob = false;
openssl = null; # not sure why they would link in openssl... openssl = null; # not sure why they would link in openssl...
}).buildArmTrustedFirmware; }).buildArmTrustedFirmware;
}; };
fit = final.nixpkgsOnBuildForBuild.callPackage (import ./fit) { fit = final.nixpkgsOnBuildForBuild.callPackage (import ./fit) {
inherit (final) initramfs kernel; inherit (final) initramfs kernel;
}; };
in (prev.coreboot.override {
payload = "${fit}/Image.fit"; coreboot =
(prev.coreboot.override {
payload = "${final.fit}/Image.fit";
fmap = ./custom.fmap; fmap = ./custom.fmap;
config = with lib.kernel; { config = with lib.kernel; {
CBFS_PREFIX = lib.mkForce (freeform "prefix"); CBFS_PREFIX = lib.mkForce (freeform "prefix");
@ -109,7 +111,7 @@ in {
CONSOLE_CBMEM = lib.mkForce no; CONSOLE_CBMEM = lib.mkForce no;
COLLECT_TIMESTAMPS = 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 ]; coreboot-toolchain = with final.coreboot-toolchain; [ aarch64 ];
initramfs_image = null; # it is part of the FIT image initramfs_image = null; # it is part of the FIT image
@ -120,11 +122,11 @@ in {
}).overrideAttrs (a: { }).overrideAttrs (a: {
postConfigure = '' postConfigure = ''
mkdir -p 3rdparty/arm-trusted-firmware/plat/rockchip/common/include/ 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/ 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 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
''; '';
}); });

Loading…
Cancel
Save