A seL4 configuration format, managed by a library.
Direct use of this library is largely not necessary. End users will usually just deal with the toml format when they need to tweak the version or compilation-options of the seL4 they wish to build against when using selfe-sys
In addition to handling deserialization, serialization, and in-memory representation of
a full::Full
configuration model, the model
module provides a contextualized::Contextualized
type that narrows the configuration options to those applicable to a specific contextualized::Context
.
The compilation
module provides the build_sel4
function for compiling either the seL4
client library
or a seL4
kernel (and optionally-distinct root task artifact)
build_helpers
provides utilities for use in the build.rs
files of libraries or applications
that want to standardize on a shared configuration. End users may consider using this module
to apply their sel4.toml configuration as Rust compile-time feature flags to improve portability.
In build.rs: ``` use selfeconfig::buildhelpers::*;
fn main() { /// Rerun this build script if any of the config-driving environment variables change BuildEnv::request_reruns();
/// Like it says on the tin, paying particular attention to the SEL4_CONFIG_PATH env-var
let config = load_config_from_env_or_default();
/// Tells cargo to build the current library with feature-flags set
/// based on the content of the selected-or-default sel4.toml configuration
config.print_boolean_feature_flags();
} ```
See default_config.toml for a minimal example of the format materialized as toml, or consider the following commented walkthrough.
```toml
git
or path
approach.[sel4] kernel = { git = "https://github.com/seL4/seL4" , tag = "10.1.1" } tools = { git = "https://github.com/seL4/seL4tools" , branch = "10.1.x-compatible" } utillibs = { path = "../misc/utillibs" } utillibs = { path = "../misc/util_libs" }
#
model::Arch
[sel4.config.arm] KernelArch = 'arm'
model::SeL4Arch
[sel4.config.aarch32] KernelSel4Arch = 'aarch32' KernelArmSel4Arch = 'aarch32'
model::Platform
[sel4.config.sabre] KernelARMPlatform = 'imx6' KernelHaveFPU = true
[sel4.config.some-other-platform] KernelARMPlatform = 'whatever'
[sel4.config.debug] KernelPrinting = true KernelDebugBuild = true
[sel4.config.release] KernelPrinting = false KernelDebugBuild = false
cross_compiler_prefix
, used when[build.sabre] crosscompilerprefix = "arm-linux-gnueabihf-"
#
[build.sabre.debug] makeroottask = "cargo xbuild --target=armv7-unknown-linux-gnueabihf" roottaskimage = "target/armv7-unknown-linux-gnueabihf/debug/example"
make_root_task
property is technically optional[build.sabre.release] makeroottask = "cargo xbuild --target=armv7-unknown-linux-gnueabihf --release" roottaskimage = "target/armv7-unknown-linux-gnueabihf/release/example" ```
A build and simulation tool for seL4 applications.
The selfe
tool's job is to orchestrate the construction of seL4 applications.
It uses a sel4.toml file sitting in a project's root dir to establish a canonical configuration source and pipes that configuration, along with explicit output platform expectations down through the application's build steps.