Skip to content

Commit

Permalink
Migrate arm-sel4-fel4 target to armv7-sel4-fel4
Browse files Browse the repository at this point in the history
  • Loading branch information
jlamb-at-polysync committed May 22, 2018
1 parent 905761a commit 3f49872
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUST_TARGET_PATH=$PWD/test_configs FEL4_MANIFEST_PATH=$PWD/test_configs/fel4.tom
## Output Artifacts

The generated bindings should be treated as relatively ephemeral and dynamic compared
to most Rust libraries. The output is context-specific to the target (e.g. "arm-sel4-fel4")
to most Rust libraries. The output is context-specific to the target (e.g. "armv7-sel4-fel4")
and the set of configuration
flags derived from the input fel4 manifest file.

Expand Down
2 changes: 1 addition & 1 deletion Xargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[target.x86_64-sel4-fel4.dependencies]
alloc = {}
[target.arm-sel4-fel4.dependencies]
[target.armv7-sel4-fel4.dependencies]
alloc = {}
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn copy_artifacts(artifact_path: PathBuf, output_path: PathBuf) {
fn generate_bindings(fel4: &Fel4Config, include_path: PathBuf) {
let bindgen_include_config = get_bindgen_include_config(fel4);

let target_args = if fel4.target == SupportedTarget::ArmSel4Fel4 {
let target_args = if fel4.target == SupportedTarget::Armv7Sel4Fel4 {
String::from("-mfloat-abi=hard")
} else {
String::from("")
Expand Down Expand Up @@ -219,7 +219,7 @@ fn get_bindgen_include_config(
platform: fel4.platform.full_name().to_string(),
}
},
t @ &SupportedTarget::ArmSel4Fel4 => {
t @ &SupportedTarget::Armv7Sel4Fel4 => {
// TODO - add more mappings as platform options expand
//"exynos5410" => "exynos5",
//"exynos5422" => "exynos5",
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub unsafe extern "C" fn strcpy(
/// #define seL4_WordBits (sizeof(seL4_Word) * 8)
/// ```
///
/// For our `arm-sel4-fel4` target see file:
/// For our `armv7-sel4-fel4` target see file:
/// `libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h`
///
/// However due to bindgen not being able to expand functional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"llvm-target": "arm-linux-gnueabihf",
"llvm-target": "armv7-unknown-linux-gnueabihf",
"target-endian": "little",
"target-pointer-width": "32",
"target-c-int-width": "32",
Expand All @@ -16,9 +16,13 @@
"has-elf-tls": true,
"panic-strategy": "abort",
"no-default-libraries": true,
"features": "+v7,+vfp3,+d16,+thumb2,-neon",
"linker-flavor": "gcc",
"pre-link-args": {
"gcc": ["-ffreestanding", "-nodefaultlibs", "-nostdlib"]
},
"post-link-args": {
"gcc": ["-lm", "-lgcc_s", "-lgcc"]
},
"default-codegen-units": 1
}
19 changes: 8 additions & 11 deletions test_configs/fel4.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[fel4]
artifact-path = "artifacts"
target-specs-path = "targets"
target-specs-path = "target_specs"
target = "x86_64-sel4-fel4"
platform = "pc99"

[x86_64-sel4-fel4]
BuildWithCommonSimulationSettings = true
KernelOptimisation = "-02"
KernelOptimisation = "-O2"
KernelVerificationBuild = false
KernelBenchmarks = "none"
KernelDangerousCodeInjection = false
KernelFastpath = true
LibSel4FunctionAttributes = "public"
KernelNumDomains = 1
Expand Down Expand Up @@ -71,12 +70,11 @@ KernelPrinting = true
KernelDebugBuild = false
KernelPrinting = false

[arm-sel4-fel4]
[armv7-sel4-fel4]
BuildWithCommonSimulationSettings = true
KernelOptimisation = "-02"
KernelOptimisation = "-O2"
KernelVerificationBuild = false
KernelBenchmarks = "none"
KernelDangerousCodeInjection = false
KernelFastpath = true
LibSel4FunctionAttributes = "public"
KernelNumDomains = 1
Expand All @@ -91,8 +89,7 @@ KernelStackBits = 12
KernelTimeSlice = 5
KernelTimerTickMS = 2
KernelUserStackTraceLength = 16
# the following keys are specific to arm-sel4-fel4 targets
CROSS_COMPILER_PREFIX = "arm-linux-gnueabihf-"
# the following keys are specific to armv7-sel4-fel4 targets
KernelArch = "arm"
KernelArmSel4Arch = "aarch32"
KernelMaxNumNodes = 1
Expand All @@ -107,15 +104,15 @@ KernelMaxNumWorkUnitsPerPreemption = 100
LinkPageSize = 4096
UserLinkerGCSections = false

[arm-sel4-fel4.debug]
[armv7-sel4-fel4.debug]
KernelDebugBuild = true
KernelPrinting = true

[arm-sel4-fel4.release]
[armv7-sel4-fel4.release]
KernelDebugBuild = false
KernelPrinting = false

[arm-sel4-fel4.sabre]
[armv7-sel4-fel4.sabre]
KernelARMPlatform = "sabre"
ElfloaderImage = "elf"
ElfloaderMode = "secure supervisor"
Expand Down

0 comments on commit 3f49872

Please sign in to comment.