Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(qemu): add support to build qemu w/ different interrupt controllers #14

Merged
merged 12 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
miguelafsilva5 marked this conversation as resolved.
Show resolved Hide resolved
}:
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
Loading