Skip to content

Commit

Permalink
fix(aarch64_firmware): add setup-cfg as derivation input
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Costa <[email protected]>
  • Loading branch information
Diogo21Costa committed Jun 4, 2024
1 parent 25dad55 commit 30f8028
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkgs/firmware/atf/atf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
, u-boot
, openssl
, platform
, gic-version ? "QEMU_GICV3"
, setup-cfg
}:

stdenv.mkDerivation rec {
Expand All @@ -25,8 +25,9 @@ stdenv.mkDerivation rec {

buildPhase = ''
export CROSS_COMPILE=aarch64-none-elf-
gic_version=$(echo "${setup-cfg.irq_flags}" | grep -oP '(?<=GIC_VERSION=)[^ ]+')
make PLAT=qemu bl1 fip BL33=${u-boot}/bin/u-boot.bin\
QEMU_USE_GIC_DRIVER=QEMU_${gic-version}
QEMU_USE_GIC_DRIVER=QEMU_$gic_version
'';

installPhase = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/firmware/qemu-aarch64-virt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
, fetchFromGitHub
, toolchain
, platform
, gic-version ? "QEMU_GICV3"
, setup-cfg
}:
let
u-boot = pkgs.callPackage ./u-boot/u-boot.nix
Expand All @@ -17,7 +17,7 @@ let
inherit toolchain;
inherit u-boot;
inherit platform;
inherit gic-version;
inherit setup-cfg;
};
in
stdenv.mkDerivation rec {
Expand Down

0 comments on commit 30f8028

Please sign in to comment.