mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
de6b29ab9d
This CL adds a "tpm" Cargo cfg to crosvm which enables a TPM device backed by libtpm2 simulator. Tested by running the following inside cros_sdk: LIBRARY_PATH=~/src/minijail LD_LIBRARY_PATH=~/src/minijail \ cargo run --release \ --features tpm \ -- \ run \ -r rootfs.ext4 \ --seccomp-policy-dir seccomp/x86_64/ \ -p init=/bin/bash \ -p panic=-1 \ --disable-sandbox \ vmlinux.bin with a Linux image built from CL:1387655. The TPM self test completes successfully with the following output: https://paste.googleplex.com/5996075978588160?raw Justin's TPM playground runs with the following trace output. https://paste.googleplex.com/4909751007707136?raw Design doc: go/vtpm-for-glinux TEST=ran TPM playground program inside crosvm TEST=local kokoro BUG=chromium:911799 Change-Id: I2feb24a3e38cba91f62c6d2cd1f378de4dd03ecf Reviewed-on: https://chromium-review.googlesource.com/1387624 Commit-Ready: David Tolnay <dtolnay@chromium.org> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Dylan Reid <dgreid@chromium.org>
76 lines
2 KiB
TOML
76 lines
2 KiB
TOML
[package]
|
|
name = "crosvm"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
|
|
[profile.release]
|
|
lto = true
|
|
panic = 'abort'
|
|
overflow-checks = true
|
|
|
|
[workspace]
|
|
members = ["qcow_utils"]
|
|
exclude = [
|
|
"assertions",
|
|
"data_model",
|
|
"sync",
|
|
"sys_util",
|
|
"syscall_defines",
|
|
"tempdir",
|
|
"rand_ish",
|
|
]
|
|
|
|
[features]
|
|
plugin = ["plugin_proto", "crosvm_plugin", "protobuf"]
|
|
default-no-sandbox = []
|
|
wl-dmabuf = ["devices/wl-dmabuf", "gpu_buffer", "resources/wl-dmabuf"]
|
|
gpu = ["devices/gpu"]
|
|
usb-emulation = ["usb_util"]
|
|
sandboxed-libusb = ["usb_util/sandboxed-libusb"]
|
|
tpm = ["devices/tpm"]
|
|
|
|
[dependencies]
|
|
arch = { path = "arch" }
|
|
bit_field = { path = "bit_field" }
|
|
devices = { path = "devices" }
|
|
gpu_buffer = { path = "gpu_buffer", optional = true }
|
|
io_jail = { path = "io_jail" }
|
|
kvm = { path = "kvm" }
|
|
kvm_sys = { path = "kvm_sys" }
|
|
msg_socket = { path = "msg_socket" }
|
|
sys_util = "*"
|
|
usb_util = { path = "usb_util", optional = true }
|
|
kernel_cmdline = { path = "kernel_cmdline" }
|
|
kernel_loader = { path = "kernel_loader" }
|
|
libc = "=0.2.44"
|
|
byteorder = "=1.1.0"
|
|
net_util = { path = "net_util" }
|
|
vhost = { path = "vhost" }
|
|
vm_control = { path = "vm_control" }
|
|
data_model = "*"
|
|
qcow = { path = "qcow" }
|
|
plugin_proto = { path = "plugin_proto", optional = true }
|
|
crosvm_plugin = { path = "crosvm_plugin", optional = true }
|
|
protobuf = { version = "=1.4.3", optional = true }
|
|
resources = { path = "resources" }
|
|
p9 = { path = "p9" }
|
|
sync = { path = "sync" }
|
|
rand_ish = { path = "rand_ish" }
|
|
|
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
|
x86_64 = { path = "x86_64" }
|
|
|
|
[target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies]
|
|
aarch64 = { path = "aarch64" }
|
|
|
|
[dev-dependencies]
|
|
sys_util = "*"
|
|
|
|
[patch.crates-io]
|
|
assertions = { path = "assertions" }
|
|
data_model = { path = "data_model" }
|
|
poll_token_derive = { path = "sys_util/poll_token_derive" }
|
|
sync = { path = "sync" }
|
|
sys_util = { path = "sys_util" }
|
|
syscall_defines = { path = "syscall_defines" }
|
|
tempdir = { path = "tempdir" }
|