TESLA
Building FreeBSD
Within the FreeBSD Perforce repository, there is a TESLA branch located at
//depot/projects/ctsrd/tesla/src
.
To build the FreeBSD base system with TESLA instrumentation, first set up your environment, then move some LLVM-generated headers out of the way to prevent conflicts with FreeBSD system ones:
You then need to set some environment variables. With sh/bash/zsh, set:
Or in csh/tcsh:
You then need to build the FreeBSD kernel toolchain, either by itself:
or as part of the normal buildworld process:
(where XX is the number of parallel jobs you'd like 'make' to run)
Then run make in the FreeBSD source tree with the
fbsdmake
wrapper script from the
$TESLA_SOURCE_DIR/scripts
directory:
This script works by setting environment variables
(XCC, XCXX, etc.)
that describe the TESLA toolchain and calling make
,
passing through command-line arguments like -jXX
and buildkernel
above.
The result is an instrumented kernel in
$OBJDIR/sys/TESLA
.