mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-05-04 05:26:40 +00:00
Adds a kata-io-compatible client that returns data from a slice and sends writes to the kernel (if possible) or discards them. This will be used for running cli scripts and for platforms that do not have a uart device/driver. Change-Id: I84facebf16eb9b6692e872e930db027998dd160f GitOrigin-RevId: 11a3502fb2f8716f9d1a204519b5e93162274590
34 lines
1.4 KiB
Rust
34 lines
1.4 KiB
Rust
// Copyright 2022 Google LLC
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
use std::env;
|
|
|
|
fn main() {
|
|
// If SEL4_OUT_DIR is not set we expect the kernel build at a fixed
|
|
// location relative to the ROOTDIR env variable.
|
|
println!("SEL4_OUT_DIR {:?}", env::var("SEL4_OUT_DIR"));
|
|
let sel4_out_dir = env::var("SEL4_OUT_DIR")
|
|
.unwrap_or_else(|_| format!("{}/out/kata/kernel", env::var("ROOTDIR").unwrap()));
|
|
println!("sel4_out_dir {}", sel4_out_dir);
|
|
|
|
// Dredge seL4 kernel config for settings we need as features to generate
|
|
// correct code: e.g. CONFIG_KERNEL_MCS enables MCS support which changes
|
|
// the system call numbering.
|
|
let features = sel4_config::get_sel4_features(&sel4_out_dir);
|
|
println!("features={:?}", features);
|
|
for feature in features {
|
|
println!("cargo:rustc-cfg=feature=\"{}\"", feature);
|
|
}
|
|
}
|