Skip to content

Commit 8879997

Browse files
feat(recipe): Add the main nix recipe file for a single baremetal
Signed-off-by: Miguel Silva <[email protected]>
1 parent 0a38599 commit 8879997

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
pkgs ? import (fetchTarball {
3+
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11.tar.gz";
4+
sha256 = "sha256:11w3wn2yjhaa5pv20gbfbirvjq6i3m7pqrq2msf0g7cv44vijwgw";
5+
}) {},
6+
platform ? " ",
7+
bao_cfg_repo ? " ",
8+
bao_cfg ? " ",
9+
list_tests ? " ",
10+
list_suites ? " ",
11+
log_level ? " ",
12+
GIC_VERSION ? " ",
13+
IRQC ? " ",
14+
IPIC ? " ",
15+
}:
16+
17+
with pkgs;
18+
19+
let
20+
packages = rec {
21+
22+
setup-cfg = callPackage ../../bao-nix/pkgs/setup-cfg/setup-cfg.nix{
23+
inherit platform;
24+
inherit GIC_VERSION;
25+
inherit IRQC;
26+
inherit IPIC;
27+
bao-tests = ../../bao-tests;
28+
tests_srcs = ./src;
29+
baremetal_patch = ./baremetal.patch;
30+
};
31+
32+
#Build toolchain
33+
toolchain = callPackage ../../bao-nix/pkgs/toolchains/${setup-cfg.toolchain_name}.nix{};
34+
35+
#Build guests
36+
guests = [
37+
(callPackage (../../bao-nix/pkgs/guest/tf/baremetal.nix)
38+
{
39+
inherit setup-cfg;
40+
inherit toolchain;
41+
guest_name = "baremetal";
42+
list_tests = "";
43+
list_suites = "CPU_BOOT_CHECK";
44+
inherit log_level;
45+
}
46+
)
47+
];
48+
49+
bao_cfg_repo = ./configs;
50+
51+
#Build Hypervisor
52+
bao = callPackage ../../bao-nix/pkgs/bao/bao.nix
53+
{
54+
inherit setup-cfg;
55+
inherit toolchain;
56+
inherit bao_cfg_repo;
57+
inherit bao_cfg;
58+
inherit guests;
59+
#bao_srcs_path = /home/mafs/bao-hypervisor;
60+
};
61+
62+
# Build Firmware
63+
firmware = callPackage ../../bao-nix/pkgs/firmware/${platform}.nix {
64+
inherit toolchain;
65+
inherit platform;
66+
inherit setup-cfg;
67+
};
68+
inherit pkgs;
69+
};
70+
in
71+
packages

0 commit comments

Comments
 (0)