crosvm/tools/examples/baremetal
Anton Romanov a4cb63d7ce crosvm: add example rust baremetal app that can be booted with crosvm
BUG=none
TEST=`cargo run`

Change-Id: I97eb56eec0d08c67e62755ef21b5ac0cd3e9a461
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3638965
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Anton Romanov <romanton@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-10 23:36:47 +00:00
..
.cargo crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
src crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
build.rs crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
Cargo.toml crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
layout.ld crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
README.md crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
rust-toolchain crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00
x86_64-naked.json crosvm: add example rust baremetal app that can be booted with crosvm 2022-05-10 23:36:47 +00:00

This is a small baremetal x86_64 application that can be booted with crosvm. You can simply do cargo run and it'll build it and use crosvm from PATH to launch it. Alternatively you can build it with cargo build and run with crosvm run --disable-sandbox path/to/target/x86_64-naked/debug/baremetal

The application does nothing but output Hello World! log line over serial port and go into infinite loop. This is expected and you'll need to kill crosvm to stop it.