Skip to content

Commit

Permalink
Fix stage0
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsbinder committed May 29, 2024
1 parent 7475052 commit 91c471f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
18 changes: 10 additions & 8 deletions buildconfigs/stage0_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
19 changes: 10 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91c471f

Please sign in to comment.