From c9ac9d8311f0bc3a048407d3faef4d3444f4050b Mon Sep 17 00:00:00 2001 From: Miguel Silva Date: Fri, 31 May 2024 14:27:45 +0100 Subject: [PATCH] feat(setup-cfg): Add make flags for IRQ controller to the cfg This commit adds a irq_flags variable as an output of the setup-cfg. These flags are filled according to the platform arch. --- pkgs/setup-cfg/setup-cfg.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/setup-cfg/setup-cfg.nix b/pkgs/setup-cfg/setup-cfg.nix index e3a72bb..1cfa397 100644 --- a/pkgs/setup-cfg/setup-cfg.nix +++ b/pkgs/setup-cfg/setup-cfg.nix @@ -7,6 +7,9 @@ , bao-tests ? " " , tests_srcs ? " " , baremetal_patch ? " " + , GIC_VERSION ? " " + , IRQC ? " " + , IPIC ? " " }: let platforms-arch = { @@ -43,4 +46,8 @@ in { bao-tests = bao-tests; tests_srcs = tests_srcs; baremetal_patch = baremetal_patch; + + irq_flags = if arch == "riscv64" then + "IRQC=${IRQC} IPIC=${IPIC}" + else "GIC_VERSION=${GIC_VERSION}" } \ No newline at end of file