rustkpi
rustkpi copied to clipboard
Sources to the Master's thesis: Safe Kernel Programming with Rust
Safe Kernel Programming with Rust
Master Thesis Project
Johannes Lundberg
KTH, Stockholm, Sweden
2017-2018
Introduction
TODO: Fix compile warnings and write introduction.
How To
Preliminary
- Clone this repo (to folder we will call
$ROOT
) on a FreeBSD 12 machine - Install
rustup
(https://www.rust-lang.org/en-US/install.html) - Set toolchain
-
rustup toolchain link rustkpi $ROOT/rust/toolchains/x86_64-unknown-freebsd-1.25-nightly
-
cd $ROOT
-
rustup override set rustkpi
-
- Build RustKPI
-
cd $ROOT/rust/kmod-rustkpi
-
make
-
- Build Hello World module
-
cd $ROOT/rust/kmod-helloworld
-
make
-
- Test
-
cd $ROOT/rust/
-
sudo kldload kmod-rustkpi/rustkpi.ko
-
sudo kldload kmod-helloworld/rustkpi-hello.ko
-
dmesg
-
For the e1000 driver in kmod-e1000 the following devices are supported
- bhyve with e1000 nic emulation
- I218 (found in Intel Broadwell laptops)
- I219-LM (found in Intel Skylake laptops)
kmod-e1000 is built the same way as described above.