Skip to content

Commit

Permalink
feat(nix): abstract platform-specific configurations of baremetal-tf.nix
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Costa <[email protected]>
  • Loading branch information
Diogo21Costa authored and ESCristiano committed Sep 30, 2023
1 parent 455e11c commit 7e17649
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkgs/guest/baremetal-tf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
, python3
, python3Packages
, rsync
, platform
, platform_cfg
, list_tests
, list_suites
, bao-tests
Expand All @@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
pname = "baremetal-tf";
version = "1.0.0";

platform = platform_cfg.platform_name;
plat_arch = platform_cfg.platforms-arch.${platform};
plat_toolchain = platform_cfg.platforms-toolchain.${platform};

src = ../../../../.;

nativeBuildInputs = [ toolchain]; #build time dependencies
Expand All @@ -38,8 +42,8 @@ stdenv.mkDerivation rec {
echo "Platform: ${platform}"
echo "Suites: ${list_suites}"
echo "Testes: ${list_tests}"
export ARCH=aarch64
export CROSS_COMPILE=aarch64-none-elf-
export ARCH=${plat_arch}
export CROSS_COMPILE=${plat_toolchain}
export TESTF_TESTS_DIR=$out/tests
export TESTF_REPO_DIR=$out/bao-tests
chmod -R u+w bao-tests #make sure we can write to bao-tests
Expand Down

0 comments on commit 7e17649

Please sign in to comment.