diff --git a/.github/workflows/build-20210727.yml b/.github/workflows/build-20210727.yml new file mode 100644 index 00000000..350b4237 --- /dev/null +++ b/.github/workflows/build-20210727.yml @@ -0,0 +1,96 @@ +name: Build CI + +on: + push: + pull_request: + schedule: + - cron: '40 3 * * *' # every day at 3:40 + +jobs: + check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + override: true + components: rust-src, rustfmt, clippy + - name: Check code format + run: cargo fmt --all -- --check + - name: Clippy LibOS + run: cargo clippy --all-features + - name: Clippy x86_64 bare-metal + run: cd zCore && make clippy ARCH=x86_64 + - name: Clippy riscv64 bare-metal + run: cd zCore && make clippy ARCH=riscv64 LINUX=1 + + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, macos-latest] + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + components: rust-src, llvm-tools-preview + - uses: actions-rs/install@v0.1 + with: + crate: cargo-binutils + version: latest + - name: Build all packages + run: cargo build + - name: Build linux LibOS + run: cargo build --features "linux libos" + - name: Build zircon LibOS + run: cargo build --features "zircon libos" + - name: Build x86_64 bare-metal + run: cd zCore && make build ARCH=x86_64 + - name: Build riscv64 bare-metal + run: cd zCore && make build ARCH=riscv64 LINUX=1 + + build-aarch64: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + override: true + target: aarch64-unknown-linux-gnu + - uses: actions-rs/cargo@v1 + with: + command: build + use-cross: true + args: -p zircon-loader --target aarch64-unknown-linux-gnu --workspace --exclude linux-syscall --exclude linux-loader --exclude zcore + + build-user: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, macos-latest] + steps: + - uses: actions/checkout@v2 + - name: Pull prebuilt images + run: git lfs pull -I prebuilt/zircon/x64/libc.so,prebuilt/zircon/x64/libfdio.so,prebuilt/zircon/x64/libunwind.so,prebuilt/zircon/x64/libzircon.so,prebuilt/zircon/x64/Scrt1.o + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + target: x86_64-fuchsia + - name: Build Zircon user programs + run: cd zircon-user && make build MODE=release + + build-doc: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Build docs + run: cargo doc --no-deps --all-features diff --git a/.github/workflows/deploy.yml b/.github/workflows/docs.yml similarity index 97% rename from .github/workflows/deploy.yml rename to .github/workflows/docs.yml index 0bebf561..f4e5e7ff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: deploy CI +name: Deploy docs on: push: diff --git a/.github/workflows/rustc20210727.yml b/.github/workflows/test-20210727.yml similarity index 58% rename from .github/workflows/rustc20210727.yml rename to .github/workflows/test-20210727.yml index dca693b7..98595a30 100644 --- a/.github/workflows/rustc20210727.yml +++ b/.github/workflows/test-20210727.yml @@ -1,4 +1,4 @@ -name: current CI +name: Test CI on: push: @@ -7,90 +7,6 @@ on: - cron: '40 3 * * *' # every day at 3:40 jobs: - check: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2021-07-27 - override: true - components: rust-src, rustfmt, clippy - - name: Check code format - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Clippy LibOS - run: cargo clippy --all-features - - name: Clippy x86_64 bare-metal - run: cd zCore && make clippy ARCH=x86_64 - - name: Clippy riscv64 bare-metal - run: cd zCore && make clippy ARCH=riscv64 LINUX=1 - - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, macos-latest] - steps: - - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2021-07-27 - components: rust-src, llvm-tools-preview - - uses: actions-rs/install@v0.1 - with: - crate: cargo-binutils - version: latest - - name: Build linux LibOS - run: cargo build --features "linux libos" - - name: Build zircon LibOS - run: cargo build --features "zircon libos" - - name: Build x86_64 bare-metal - run: cd zCore && make build ARCH=x86_64 - - name: Build riscv64 bare-metal - run: cd zCore && make build ARCH=riscv64 LINUX=1 - - build-aarch64: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2021-07-27 - override: true - target: aarch64-unknown-linux-gnu - - uses: actions-rs/cargo@v1 - with: - command: build - use-cross: true - args: -p zircon-loader --target aarch64-unknown-linux-gnu - - build-user: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, macos-latest] - steps: - - uses: actions/checkout@v2 - - name: Pull prebuilt images - run: git lfs pull -I prebuilt/zircon/x64/libc.so,prebuilt/zircon/x64/libfdio.so,prebuilt/zircon/x64/libunwind.so,prebuilt/zircon/x64/libzircon.so,prebuilt/zircon/x64/Scrt1.o - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2021-07-27 - target: x86_64-fuchsia - - name: Build Zircon user programs - run: | - cd zircon-user - make build MODE=release - test: runs-on: ubuntu-20.04 steps: @@ -145,17 +61,14 @@ jobs: sudo apt update sudo apt install qemu-system-x86 - name: Build zCore - run: | - cd zCore - make build MODE=release - cd .. + run: cd zCore && make build MODE=release - name: Run core-tests run: | cd scripts - pip3 install pexpect + pip3 install -r requirements.txt python3 core-tests.py - core-test-libos: + libos-core-test: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -166,13 +79,13 @@ jobs: profile: minimal toolchain: nightly-2021-07-27 components: rust-src - - name: Run core-tests + - name: Run libos-core-tests run: | cd scripts - pip3 install pexpect + pip3 install -r requirements.txt python3 unix-core-tests.py - libc-test: + libos-libc-test: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -182,38 +95,13 @@ jobs: run: sudo apt-get install musl-tools musl-dev -y - name: Prepare rootfs and libc-test run: make rootfs && make libc-test - - name: Build - run: cargo build --release -p linux-loader -# uses: actions-rs/cargo@v1 -# with: -# command: build -# args: --release -p linux-loader - - name: Run libc-tests + - name: Run libos-libc-tests run: | cd scripts pip3 install -r requirements.txt - python3 libc-tests.py + python3 libos-libc-tests.py cat linux/test-result.txt - doc: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Build docs - run: cargo doc --no-deps --all-features -# uses: actions-rs/cargo@v1 -# with: -# command: doc -# args: --no-deps --all-features -# - name: Deploy to Github Pages -# if: ${{ github.ref == 'refs/heads/master' }} -# uses: JamesIves/github-pages-deploy-action@releases/v3 -# with: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# BRANCH: gh-pages -# FOLDER: target/doc - - baremetal-libc-test: runs-on: ubuntu-20.04 steps: @@ -233,7 +121,7 @@ jobs: sudo apt-get install musl-tools musl-dev qemu-system-x86 -y - name: Prepare rootfs and libc-test run: make baremetal-test-img - - name: Build kernel + - name: Build kernel run: cd zCore && make build MODE=release LINUX=1 ARCH=x86_64 - name: create qemu disk run: cd zCore && make baremetal-qemu-disk MODE=release LINUX=1 ARCH=x86_64 @@ -241,6 +129,7 @@ jobs: run: | cd scripts python3 ./baremetal-libc-test.py + baremetal-rv64-oscomp-test: runs-on: ubuntu-20.04 steps: @@ -266,7 +155,7 @@ jobs: tar xJf qemu-share.tar.xz && sudo cp -r qemu /usr/local/share/ - name: Prepare rootfs and oscomp run: make riscv-image - - name: Build kernel + - name: Build kernel run: cd zCore && make build MODE=release LINUX=1 ARCH=riscv64 - name: Run baremetal-libc-test run: | diff --git a/kernel-hal/Cargo.toml b/kernel-hal/Cargo.toml index 85d2f258..cd378684 100644 --- a/kernel-hal/Cargo.toml +++ b/kernel-hal/Cargo.toml @@ -8,8 +8,9 @@ description = "Kernel HAL interface definations." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] +default = ["libos"] smp = [] -libos = ["async-std", "bitmap-allocator", "zcore-drivers/mock"] +libos = ["nix", "tempfile", "async-std", "bitmap-allocator", "zcore-drivers/mock"] graphic = ["zcore-drivers/graphic"] [dependencies] @@ -25,8 +26,8 @@ zcore-drivers = { path = "../drivers", features = ["virtio"] } # LibOS mode [target.'cfg(not(target_os = "none"))'.dependencies] -nix = "0.23" -tempfile = "3" +nix = { version = "0.23", optional = true } +tempfile = { version = "3", optional = true } async-std = { version = "1.10", optional = true } bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator", rev = "b3f9f51", optional = true } diff --git a/linux-loader/Cargo.toml b/linux-loader/Cargo.toml index 83930a0b..c8984c76 100644 --- a/linux-loader/Cargo.toml +++ b/linux-loader/Cargo.toml @@ -12,7 +12,7 @@ log = "0.4" linux-syscall = { path = "../linux-syscall" } linux-object = { path = "../linux-object" } zircon-object = { path = "../zircon-object" } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } [features] default = ["libos"] diff --git a/linux-object/Cargo.toml b/linux-object/Cargo.toml index 503fac5f..9b9a2774 100644 --- a/linux-object/Cargo.toml +++ b/linux-object/Cargo.toml @@ -16,7 +16,7 @@ bitflags = "1.3" hashbrown = "0.9" numeric-enum-macro = "0.2" zircon-object = { path = "../zircon-object", features = ["elf"] } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } downcast-rs = { version = "1.2", default-features = false } lazy_static = { version = "1.4", features = ["spin_no_std"] } rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7c232ec" } diff --git a/linux-object/src/loader/abi.rs b/linux-object/src/loader/abi.rs index b7d1a914..39ef0a00 100644 --- a/linux-object/src/loader/abi.rs +++ b/linux-object/src/loader/abi.rs @@ -1,5 +1,6 @@ //! Process init info #![allow(unsafe_code)] +#![allow(dead_code)] use alloc::collections::btree_map::BTreeMap; use alloc::string::String; diff --git a/linux-syscall/Cargo.toml b/linux-syscall/Cargo.toml index 5d6de81a..4a5fad9a 100644 --- a/linux-syscall/Cargo.toml +++ b/linux-syscall/Cargo.toml @@ -14,7 +14,7 @@ bitflags = "1.3" numeric-enum-macro = "0.2" zircon-object = { path = "../zircon-object" } linux-object = { path = "../linux-object" } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7c232ec" } lazy_static = { version = "1.4", features = ["spin_no_std"] } bitvec = { version = "0.22", default-features = false, features = ["alloc"] } diff --git a/linux-syscall/src/lib.rs b/linux-syscall/src/lib.rs index 474b17ff..08044505 100644 --- a/linux-syscall/src/lib.rs +++ b/linux-syscall/src/lib.rs @@ -7,9 +7,9 @@ //! let args = [regs.rdi, regs.rsi, regs.rdx, regs.r10, regs.r8, regs.r9]; //! let mut syscall = Syscall { //! thread, -//! #[cfg(feature = "std")] +//! #[cfg(feature = "libos")] //! syscall_entry: kernel_hal::context::syscall_entry as usize, -//! #[cfg(not(feature = "std"))] +//! #[cfg(not(feature = "libos"))] //! syscall_entry: 0, //! thread_fn, //! regs, diff --git a/scripts/libc-tests.py b/scripts/libos-libc-tests.py similarity index 96% rename from scripts/libc-tests.py rename to scripts/libos-libc-tests.py index 0284e1cd..f11de12b 100755 --- a/scripts/libc-tests.py +++ b/scripts/libos-libc-tests.py @@ -25,7 +25,7 @@ def print_cases(cases, file=None): print(case, file=file) -subprocess.run("cd .. && cargo build -p zcore --release --features 'linux libos'", +subprocess.run("cargo build -p zcore --release --features 'linux libos'", shell=True, check=True) for path in sorted(glob.glob("../rootfs/libc-test/src/*/*.exe")): diff --git a/scripts/requirements.txt b/scripts/requirements.txt index f08cca14..516bbf2f 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1 +1,2 @@ +pexpect termcolor diff --git a/scripts/unix-core-testone.py b/scripts/unix-core-testone.py index cbead18a..12898e88 100644 --- a/scripts/unix-core-testone.py +++ b/scripts/unix-core-testone.py @@ -12,7 +12,7 @@ parser = argparse.ArgumentParser() parser.add_argument('testcase', nargs=1) args = parser.parse_args() -child = pexpect.spawn("cargo run -p zcore --features 'zircon libos' -- '%s' '%s'" % +child = pexpect.spawn("cargo run -p zcore --release --features 'zircon libos' -- '%s' '%s'" % (ZBI_PATH, CMDLINE_BASE+args.testcase[0]), timeout=TIMEOUT, encoding='utf-8') diff --git a/scripts/unix-core-tests.py b/scripts/unix-core-tests.py index bf90b9c8..f95a4448 100644 --- a/scripts/unix-core-tests.py +++ b/scripts/unix-core-tests.py @@ -2,6 +2,7 @@ import pexpect import sys import re import os +import subprocess TIMEOUT = 300 ZIRCON_LOADER_PATH = 'zircon-loader' @@ -40,9 +41,11 @@ with open(TEST_CASE_EXCEPTION, "r") as tcf: exception_case = set([case.strip() for case in tcf.readlines()]) check_case = all_case - exception_case +subprocess.run("cargo build -p zcore --release --features 'zircon libos'", + shell=True, check=True) + for line in check_case: - child = pexpect.spawn("cargo run -p zcore --features 'zircon libos' -- '%s' '%s'" % - (ZBI_PATH, CMDLINE_BASE+line), + child = pexpect.spawn("../target/release/zcore", [ZBI_PATH, CMDLINE_BASE+line], timeout=TIMEOUT, encoding='utf-8') child.logfile = Tee(OUTPUT_FILE, 'a') diff --git a/zCore/Cargo.toml b/zCore/Cargo.toml index 7851d250..4fbc9f3e 100644 --- a/zCore/Cargo.toml +++ b/zCore/Cargo.toml @@ -15,18 +15,18 @@ bench = false doc = false [features] -default = ["color_log"] -color_log = [] +default = ["libos"] +colorless-log = [] graphic = ["kernel-hal/graphic"] -init_ram_disk = [] -link_user_img = ["init_ram_disk"] +init-ram-disk = [] +link-user-img = ["init-ram-disk"] zircon = ["zircon-loader"] linux = ["linux-loader", "linux-object", "rcore-fs", "rcore-fs-sfs"] -libos = ["async-std", "chrono", "rcore-fs-hostfs", "linux-loader/libos", "zircon-loader/libos"] -board_qemu = [] -board_d1 = ["link_user_img"] +libos = ["async-std", "chrono", "rcore-fs-hostfs", "kernel-hal/libos", "linux-loader/libos", "zircon-loader/libos"] +board-qemu = [] +board-d1 = ["link-user-img"] [dependencies] log = "0.4" @@ -34,7 +34,7 @@ spin = "0.9" cfg-if = "1.0" lazy_static = { version = "1.4", features = ["spin_no_std" ] } bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator", rev = "b3f9f51" } -kernel-hal = { path = "../kernel-hal", features = ["smp"] } +kernel-hal = { path = "../kernel-hal", default-features = false, features = ["smp"] } zircon-object = { path = "../zircon-object" } linux-object = { path = "../linux-object", optional = true } zircon-loader = { path = "../zircon-loader", default-features = false, optional = true } diff --git a/zCore/Makefile b/zCore/Makefile index 7e8dcc7c..c0b264a5 100644 --- a/zCore/Makefile +++ b/zCore/Makefile @@ -80,12 +80,12 @@ ifeq ($(LIBOS), 1) features += libos else ifeq ($(ARCH), x86_64) - features += init_ram_disk + features += init-ram-disk else ifeq ($(ARCH), riscv64) ifeq ($(PLATFORM), d1) - features += board_d1 link_user_img + features += board-d1 link-user-img else - features += board_qemu + features += board-qemu endif endif endif @@ -106,7 +106,7 @@ endif build_args := --features "$(features)" ifneq ($(LIBOS), 1) # no_std - build_args += --target $(ARCH).json -Z build-std=core,alloc -Z build-std-features=compiler-builtins-mem + build_args += --no-default-features --target $(ARCH).json -Z build-std=core,alloc -Z build-std-features=compiler-builtins-mem endif ifeq ($(MODE), release) diff --git a/zCore/src/fs.rs b/zCore/src/fs.rs index e972aea9..b116407b 100644 --- a/zCore/src/fs.rs +++ b/zCore/src/fs.rs @@ -1,6 +1,6 @@ #[allow(dead_code)] fn init_ram_disk() -> &'static mut [u8] { - if cfg!(feature = "link_user_img") { + if cfg!(feature = "link-user-img") { extern "C" { fn _user_img_start(); fn _user_img_end(); @@ -36,7 +36,7 @@ cfg_if! { use linux_object::fs::rcore_fs_wrapper::{Block, BlockCache, MemBuf}; use rcore_fs::dev::Device; - let device: Arc = if cfg!(feature = "init_ram_disk") { + let device: Arc = if cfg!(feature = "init-ram-disk") { Arc::new(MemBuf::new(init_ram_disk())) } else { let block = kernel_hal::drivers::all_block().first_unwrap(); @@ -66,7 +66,7 @@ cfg_if! { // Hard link rootfs img #[cfg(not(feature = "libos"))] -#[cfg(feature = "link_user_img")] +#[cfg(feature = "link-user-img")] global_asm!(concat!( r#" .section .data.img diff --git a/zCore/src/logging.rs b/zCore/src/logging.rs index 808f473d..a3f115b9 100644 --- a/zCore/src/logging.rs +++ b/zCore/src/logging.rs @@ -52,10 +52,10 @@ enum ColorCode { /// Add escape sequence to print with color in Linux console macro_rules! with_color { ($color_code:expr, $($arg:tt)*) => {{ - #[cfg(feature = "color_log")] + #[cfg(feature = "colorless-log")] + { let _ = $color_code; format_args!($($arg)*) } + #[cfg(not(feature = "colorless-log"))] { format_args!("\u{1B}[{}m{}\u{1B}[m", $color_code as u8, format_args!($($arg)*)) } - #[cfg(not(feature = "color_log"))] - { format_args!($($arg)*) } }}; } diff --git a/zCore/src/memory.rs b/zCore/src/memory.rs index c4029a95..99720fa8 100644 --- a/zCore/src/memory.rs +++ b/zCore/src/memory.rs @@ -14,6 +14,9 @@ type FrameAlloc = bitmap_allocator::BitAlloc16M; // max 64G #[cfg(target_arch = "riscv64")] type FrameAlloc = bitmap_allocator::BitAlloc1M; // max 4G +#[cfg(target_arch = "aarch64")] +type FrameAlloc = bitmap_allocator::BitAlloc1M; // max 4G + const PAGE_SIZE: usize = 4096; /// Global physical frame allocator diff --git a/zCore/src/platform/mod.rs b/zCore/src/platform/mod.rs index ab375085..81d470c4 100644 --- a/zCore/src/platform/mod.rs +++ b/zCore/src/platform/mod.rs @@ -1,5 +1,5 @@ cfg_if! { - if #[cfg(not(target_os = "none"))] { + if #[cfg(feature = "libos")] { #[path = "libos/entry.rs"] mod entry; #[path = "libos/consts.rs"] diff --git a/zCore/src/platform/riscv/consts.rs b/zCore/src/platform/riscv/consts.rs index 098ed875..3fe058b6 100644 --- a/zCore/src/platform/riscv/consts.rs +++ b/zCore/src/platform/riscv/consts.rs @@ -1,11 +1,11 @@ // RISCV cfg_if! { - if #[cfg(feature = "board_qemu")] { + if #[cfg(feature = "board-qemu")] { pub const KERNEL_OFFSET: usize = 0xFFFF_FFFF_8000_0000; pub const PHYS_MEMORY_BASE: usize = 0x8000_0000; pub const PHYS_MEMORY_END: usize = 0x8800_0000; // TODO: get memory end from device tree - } else if #[cfg(feature = "board_d1")] { + } else if #[cfg(feature = "board-d1")] { pub const KERNEL_OFFSET: usize = 0xFFFF_FFFF_C000_0000; pub const PHYS_MEMORY_BASE: usize = 0x4000_0000; pub const PHYS_MEMORY_END: usize = 0x6000_0000; // 512M diff --git a/zCore/src/platform/riscv/entry.rs b/zCore/src/platform/riscv/entry.rs index 5b2ff60e..53b87c54 100644 --- a/zCore/src/platform/riscv/entry.rs +++ b/zCore/src/platform/riscv/entry.rs @@ -1,6 +1,6 @@ -#[cfg(feature = "board_qemu")] +#[cfg(feature = "board-qemu")] global_asm!(include_str!("boot/boot_qemu.asm")); -#[cfg(feature = "board_d1")] +#[cfg(feature = "board-d1")] global_asm!(include_str!("boot/boot_d1.asm")); global_asm!(include_str!("boot/entry64.asm")); diff --git a/zircon-loader/Cargo.toml b/zircon-loader/Cargo.toml index 68ed0d69..afab5c20 100644 --- a/zircon-loader/Cargo.toml +++ b/zircon-loader/Cargo.toml @@ -13,11 +13,11 @@ cfg-if = "1.0" xmas-elf = "0.7" zircon-object = { path = "../zircon-object", features = ["elf"] } zircon-syscall = { path = "../zircon-syscall" } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } [features] default = ["libos"] -libos = ["kernel-hal/libos", "zircon-object/aspace-separate", "zircon-syscall/std"] +libos = ["kernel-hal/libos", "zircon-object/aspace-separate", "zircon-syscall/libos"] [dev-dependencies] env_logger = "0.9" diff --git a/zircon-object/Cargo.toml b/zircon-object/Cargo.toml index 69197fbc..79a841cd 100644 --- a/zircon-object/Cargo.toml +++ b/zircon-object/Cargo.toml @@ -18,7 +18,7 @@ spin = "0.9" log = "0.4" hashbrown = "0.9" downcast-rs = { version = "1.2", default-features = false } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } numeric-enum-macro = "0.2" futures = { version = "0.3", default-features = false, features = ["alloc", "async-await"] } xmas-elf = { version = "0.7", optional = true } diff --git a/zircon-syscall/Cargo.toml b/zircon-syscall/Cargo.toml index 7e942997..17cfea01 100644 --- a/zircon-syscall/Cargo.toml +++ b/zircon-syscall/Cargo.toml @@ -11,8 +11,7 @@ description = "Zircon syscalls implementation" # hypervisor = ["zircon-object/hypervisor"] default = [] deny-page-fault = [] -std = ["deny-page-fault"] - +libos = ["deny-page-fault", "kernel-hal/libos"] [dependencies] log = "0.4" @@ -20,6 +19,6 @@ spin = "0.9" bitflags = "1.3" numeric-enum-macro = "0.2" zircon-object = { path = "../zircon-object" } -kernel-hal = { path = "../kernel-hal" } +kernel-hal = { path = "../kernel-hal", default-features = false } futures = { version = "0.3", default-features = false, features = ["alloc", "async-await"] } cfg-if = "1.0"