From 91c471fa3d6c5009b471397dbac19912d45a3f76 Mon Sep 17 00:00:00 2001 From: Tom Binder Date: Wed, 29 May 2024 09:11:38 +0000 Subject: [PATCH] Fix stage0 --- buildconfigs/stage0_bin.sh | 18 ++++++++++-------- justfile | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/buildconfigs/stage0_bin.sh b/buildconfigs/stage0_bin.sh index eb61ae473e6..888fd6fa538 100644 --- a/buildconfigs/stage0_bin.sh +++ b/buildconfigs/stage0_bin.sh @@ -9,16 +9,18 @@ export BUILD_COMMAND=( develop .#rust --command - env - --chdir=stage0_bin - cargo - objcopy - --release - -- - --output-target=binary - target/x86_64-unknown-none/release/stage0_bin + just + stage0_provenance_subjects ) +# The first element must be the Transparent Release binary (the main binary). export SUBJECT_PATHS=( stage0_bin/target/x86_64-unknown-none/release/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 ) diff --git a/justfile b/justfile index 577a2fccf61..c3dbf4b1d6d 100644 --- a/justfile +++ b/justfile @@ -62,17 +62,18 @@ oak_restricted_kernel_simple_io_init_rd_bin: oak_restricted_kernel_simple_io_init_rd_wrapper: oak_restricted_kernel_simple_io_init_rd_bin just restricted_kernel_bzimage_and_provenance_subjects oak_restricted_kernel_simple_io_init_rd -stage0_bin output_bin_path="stage0_bin/target/x86_64-unknown-none/release/stage0_bin": - env --chdir=stage0_bin cargo objcopy --release -- --output-target=binary ../{{output_bin_path}} +stage0_bin: + env --chdir=stage0_bin \ + cargo objcopy --release -- --output-target=binary \ + target/x86_64-unknown-none/release/stage0_bin -stage0_provenance_subjects vcpu_count="1,2,4,8,16,32,64" provenance_subjects_dir="stage0_bin/bin/subjects": - rm --recursive --force {{provenance_subjects_dir}} - mkdir -p {{provenance_subjects_dir}} - just stage0_bin {{provenance_subjects_dir}}/stage0_bin +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={{vcpu_count}} \ - --stage0-rom={{provenance_subjects_dir}}/stage0_bin \ - --attestation-measurements-output-dir={{provenance_subjects_dir}} + --vcpu-count=1,2,4,8,16,32,64 \ + --stage0-rom=stage0_bin/target/x86_64-unknown-none/release/stage0_bin \ + --attestation-measurements-output-dir={{output_dir}} stage1_cpio: env --chdir=oak_containers_stage1 make