Skip to content

Commit

Permalink
Remove call by cargo for snp_measurement, thereby fixing the stage0_b…
Browse files Browse the repository at this point in the history
…in build. Remove the dispensable intermediate target.

Bug: 391513240
Change-Id: I8792a62b447eceb9938eee72d88726ed90ef21f0
  • Loading branch information
thmsbinder committed Jan 22, 2025
1 parent f2009a5 commit 5fcba0a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
16 changes: 8 additions & 8 deletions buildconfigs/stage0_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ export BUILD_COMMAND=(
develop
--command
just
stage0_provenance_subjects
stage0_bin
)

# The first element must be the Transparent Release binary (the main binary).
export SUBJECT_PATHS=(
artifacts/stage0_bin
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_01_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_02_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_04_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_08_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_16_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_32_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_64_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_01_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_02_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_04_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_08_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_16_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_32_vcpu
artifacts/stage0_bin_subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_64_vcpu
)
14 changes: 6 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ stage0_bin:
cp --force --preserve=timestamps --no-preserve=mode \
bazel-bin/stage0_bin/stage0_bin \
artifacts/stage0_bin
mkdir -p artifacts/stage0_bin_subjects
rm --force artifacts/stage0_bin_subjects/*
bazel run {{BAZEL_CONFIG_FLAG}} //snp_measurement -- \
--vcpu-count=1,2,4,8,16,32,64 \
--stage0-rom=$(realpath artifacts/stage0_bin) \
--attestation-measurements-output-dir=$(realpath artifacts/stage0_bin_subjects)

stage0_bin_tdx:
bazel build {{BAZEL_CONFIG_FLAG}} --platforms=//:x86_64-firmware \
Expand All @@ -199,14 +205,6 @@ stage0_bin_tdx:
bazel-bin/stage0_bin_tdx/stage0_bin_tdx \
artifacts/stage0_bin_tdx

stage0_provenance_subjects output_dir="stage0_bin/bin/subjects": stage0_bin
rm --recursive --force {{output_dir}}
mkdir --parents {{output_dir}}
cargo run --package=snp_measurement --quiet -- \
--vcpu-count=1,2,4,8,16,32,64 \
--stage0-rom=bazel-bin/stage0_bin/stage0_bin \
--attestation-measurements-output-dir={{output_dir}}

stage1_cpio:
bazel build {{BAZEL_CONFIG_FLAG}} //oak_containers/stage1_bin
cp --force --preserve=timestamps --no-preserve=mode \
Expand Down

0 comments on commit 5fcba0a

Please sign in to comment.