diff --git a/.cargo/config.toml b/.cargo/config.toml index 08d1f8c..0af9cee 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -4,8 +4,14 @@ # SPDX-License-Identifier: BSD-2-Clause # -[unstable] -unstable-options = true - [env] RUST_TARGET_PATH = { value = "support/targets", relative = true } +SEL4_PREFIX = { value = "/opt/seL4", relative = false } + +[build] +target = "aarch64-sel4" + +[unstable] +unstable-options = true +build-std = ["core", "alloc", "compiler_builtins"] +build-std-features = ["compiler-builtins-mem"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..316b5ba --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// +// Copyright 2024, Colias Group, LLC +// +// SPDX-License-Identifier: BSD-2-Clause +// + +{ + "name": "rust-root-task-demo", + "image": "rust-root-task-demo", + + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer" + ], + "settings": { + "terminal.integrated.defaultProfile.linux": null, + "rust-analyzer.check.allTargets": false, + "rust-analyzer.cargo.allTargets": false + } + } + } +} diff --git a/.gitignore b/.gitignore index b9ae3dc..c0da0cf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ # SPDX-License-Identifier: BSD-2-Clause # +/target/ /build/ diff --git a/Cargo.lock b/Cargo.lock index 460e644..81b4f9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,7 +36,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.68", + "syn 2.0.77", "which", ] @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -202,15 +202,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", "windows-targets", @@ -274,9 +274,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" dependencies = [ "memchr", "thiserror", @@ -285,9 +285,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" dependencies = [ "pest", "pest_generator", @@ -295,22 +295,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.77", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" dependencies = [ "once_cell", "pest", @@ -319,12 +319,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.68", + "syn 2.0.77", ] [[package]] @@ -338,18 +338,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -382,18 +382,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags", "errno", @@ -417,7 +417,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sel4" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "cfg-if", "sel4-config", @@ -427,12 +427,15 @@ dependencies = [ [[package]] name = "sel4-bitfield-ops" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" +dependencies = [ + "rustc_version", +] [[package]] name = "sel4-bitfield-parser" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "pest", "pest_derive", @@ -442,12 +445,12 @@ dependencies = [ [[package]] name = "sel4-build-env" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" [[package]] name = "sel4-config" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "sel4-config-data", "sel4-config-generic", @@ -458,7 +461,7 @@ dependencies = [ [[package]] name = "sel4-config-data" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "lazy_static", "sel4-build-env", @@ -469,7 +472,7 @@ dependencies = [ [[package]] name = "sel4-config-generic" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "fallible-iterator", "proc-macro2", @@ -481,7 +484,7 @@ dependencies = [ [[package]] name = "sel4-config-generic-types" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "serde", ] @@ -489,7 +492,7 @@ dependencies = [ [[package]] name = "sel4-config-macros" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "sel4-config-data", "sel4-config-generic", @@ -498,7 +501,7 @@ dependencies = [ [[package]] name = "sel4-dlmalloc" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "dlmalloc", "lock_api", @@ -507,17 +510,17 @@ dependencies = [ [[package]] name = "sel4-elf-header" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" [[package]] name = "sel4-immediate-sync-once-cell" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" [[package]] name = "sel4-initialize-tls" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "cfg-if", ] @@ -525,7 +528,7 @@ dependencies = [ [[package]] name = "sel4-panicking" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "cfg-if", "rustc_version", @@ -537,12 +540,12 @@ dependencies = [ [[package]] name = "sel4-panicking-env" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" [[package]] name = "sel4-root-task" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "sel4", "sel4-dlmalloc", @@ -557,7 +560,7 @@ dependencies = [ [[package]] name = "sel4-root-task-macros" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "proc-macro2", "quote", @@ -567,38 +570,53 @@ dependencies = [ [[package]] name = "sel4-runtime-common" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "cfg-if", "sel4", "sel4-elf-header", "sel4-initialize-tls", "sel4-panicking-env", + "sel4-stack", "unwinding", ] [[package]] name = "sel4-rustfmt-helper" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "which", ] +[[package]] +name = "sel4-stack" +version = "0.1.0" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" + [[package]] name = "sel4-sync" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "lock_api", "sel4", "sel4-immediate-sync-once-cell", + "sel4-sync-trivial", +] + +[[package]] +name = "sel4-sync-trivial" +version = "0.1.0" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" +dependencies = [ + "lock_api", ] [[package]] name = "sel4-sys" version = "0.1.0" -source = "git+https://github.com/seL4/rust-sel4#4f13dd2ec30cd6542d6cd23f0b7cb70f64ff321e" +source = "git+https://github.com/seL4/rust-sel4#1cd063a0f69b2d2045bfa224a36c9341619f0e9b" dependencies = [ "bindgen", "glob", @@ -623,31 +641,32 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -682,9 +701,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -693,22 +712,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.77", ] [[package]] @@ -725,9 +744,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unwinding" @@ -740,9 +759,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "which" @@ -767,9 +786,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -783,57 +802,57 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "xml-rs" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "xmltree" diff --git a/Makefile b/Makefile index a050429..8ef524d 100644 --- a/Makefile +++ b/Makefile @@ -34,14 +34,10 @@ $(app): $(app).intermediate # configuration and libsel4 headers. .INTERMDIATE: $(app).intermediate $(app).intermediate: - SEL4_PREFIX=$(sel4_prefix) \ - cargo build \ - -Z build-std=core,alloc,compiler_builtins \ - -Z build-std-features=compiler-builtins-mem \ - --target-dir $(build_dir)/target \ - --out-dir $(build_dir) \ - --target aarch64-sel4 \ - -p $(app_crate) + cargo build \ + --target-dir $(build_dir)/target \ + --artifact-dir $(build_dir) \ + -p $(app_crate) image := $(build_dir)/image.elf diff --git a/docker/Dockerfile b/docker/Dockerfile index bb85b91..ad49a74 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,19 +4,39 @@ # SPDX-License-Identifier: BSD-2-Clause # -FROM trustworthysystems/sel4 - -WORKDIR /tmp - -RUN rm -r * +FROM debian:bookworm RUN apt-get update -q && apt-get install -y --no-install-recommends \ - bash-completion man sudo \ + build-essential \ + curl \ + git \ + # for seL4 + gcc-aarch64-linux-gnu \ + python3-dev \ + python3-venv \ + cmake \ + ninja-build \ + device-tree-compiler \ + libxml2-utils \ + qemu-utils \ + qemu-system-arm \ + qemu-efi-aarch64 \ + ipxe-qemu \ + # for bindgen + libclang-dev \ + # for test script + python3-pexpect \ + # for hacking + bash-completion \ + man \ + sudo \ && rm -rf /var/lib/apt/lists/* +WORKDIR /tmp + RUN curl -sSf https://sh.rustup.rs | \ bash -s -- -y --no-modify-path \ - --default-toolchain nightly-2024-05-01 \ + --default-toolchain nightly-2024-09-01 \ --component rust-src ENV PATH=/root/.cargo/bin:$PATH @@ -32,6 +52,9 @@ RUN set -eux; \ RUN set -eux; \ cd seL4; \ + python3 -m venv pyenv; \ + export PATH=$(realpath ./pyenv/bin):$PATH; \ + pip install tools/python-deps; \ cmake \ -DCROSS_COMPILER_PREFIX=aarch64-linux-gnu- \ -DCMAKE_INSTALL_PREFIX=$SEL4_INSTALL_DIR \ @@ -48,7 +71,7 @@ RUN set -eux; \ RUN set -eux; \ url="https://github.com/seL4/rust-sel4"; \ - rev="be7d740dc70e8f438b31cb6a069261a5b5af109d"; \ + rev="1cd063a0f69b2d2045bfa224a36c9341619f0e9b"; \ common_args="--git $url --rev $rev --root $SEL4_INSTALL_DIR"; \ CC_aarch64_unknown_none=aarch64-linux-gnu-gcc \ SEL4_PREFIX=$SEL4_INSTALL_DIR \ @@ -94,4 +117,6 @@ RUN set -eux; \ ENV PATH=/home/x/.cargo/bin:$PATH +ENV SHELL=/bin/bash + WORKDIR /work diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 84a9735..26bb669 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -5,5 +5,5 @@ # [toolchain] -channel = "nightly-2024-05-01" -components = [ "rustfmt", "rust-src", "rustc-dev", "llvm-tools-preview" ] +channel = "nightly-2024-09-01" +components = [ "rustfmt", "rust-src", "rustc-dev", "llvm-tools-preview", "rust-analyzer" ] diff --git a/support/targets/aarch64-sel4.json b/support/targets/aarch64-sel4.json index 0432c64..dd3dcf5 100644 --- a/support/targets/aarch64-sel4.json +++ b/support/targets/aarch64-sel4.json @@ -1,7 +1,7 @@ { "arch": "aarch64", "crt-objects-fallback": "false", - "data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", + "data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32", "disable-redzone": true, "env": "sel4", "exe-suffix": ".elf", @@ -12,10 +12,10 @@ "llvm-target": "aarch64-unknown-none", "max-atomic-width": 128, "metadata": { - "description": null, - "host_tools": null, - "std": null, - "tier": null + "description": "Bare ARM64, hardfloat", + "host_tools": false, + "std": false, + "tier": 2 }, "pre-link-args": { "gnu-lld": [