Skip to content

Commit

Permalink
Add Salus TSM build target
Browse files Browse the repository at this point in the history
This makes the changes to Cargo.toml and the Makefile to build binaries
for the original Salus, and the new Salus-TSM.
  • Loading branch information
atulkharerivos committed Oct 10, 2022
1 parent 9fe3d8f commit feaed3d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ panic = "abort"
[features]
salustsm = []

[[bin]]
name = "salus-tsm"
path = "src/salus_tsm.rs"
required-features = ["salustsm"]

[[bin]]
name = "salus"
path = "src/main.rs"

[dependencies]
arrayvec = { version = "0.7.2", default-features = false }
assertions = { path = "./assertions" }
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,17 @@ guestvm:
tellus: guestvm
cargo build $(CARGO_FLAGS) --package test_workloads --bin tellus --release

.PHONY: salus_tsm
salus_tsm:
cargo build $(CARGO_FLAGS) --release --bin salus-tsm --features="salustsm"

# Runnable targets:
#
# run_tellus_gdb: Run Tellus as the host VM with GDB debugging enabled.
# run_tellus: Run Tellus as the host VM.
# run_linux: Run a bare Linux kernel as the host VM.
# run_debian: Run a Linux kernel as the host VM with a Debian rootfs.
# run_salus_tsm: Runs the Salus-TSM binary (currently a stub).

run_tellus_gdb: tellus_bin salus_debug
$(QEMU_BIN) \
Expand Down Expand Up @@ -141,6 +146,12 @@ run_debian: salus
-device e1000e,netdev=usernet \
$(EXTRA_QEMU_ARGS)

run_salus_tsm: salus_tsm
$(QEMU_BIN) \
$(MACH_ARGS) \
-kernel $(RELEASE_BINS)salus-tsm \
$(EXTRA_QEMU_ARGS)

.PHONY: lint
lint:
cargo clippy -- -D warnings -Wmissing-docs
Expand Down

0 comments on commit feaed3d

Please sign in to comment.