zCore: Could not compile & run.

Env:

Ubuntu18.04 docker rustc 1.60.0-nightly (5e57faa78 2022-01-19) commit fd67f173df1404fb805818e41ca97898deedb0c1


Run zcore in linux-libos mode

step 2: Compile & Run native Linux program (Busybox) in libos mode:
cargo run --release --features "linux libos" -- /bin/busybox [args]

type

cargo run --release --features "linux libos" -- /bin/busybox ls

get

error: none of the selected packages contains these features: libos, linux

Run Linux shell in linux-bare-metal mode

step 2: Create Linux rootfs image:
Note: Before below step, you can add some special apps in zCore/rootfs
make image

type

make image

get

cargo image --arch x86_64
warning: unused import: `ffi::OsStr`
 --> xtask/src/linux/opencv.rs:7:5
  |
7 |     ffi::OsStr,
  |     ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `xtask` (bin "xtask") generated 1 warning
    Finished release [optimized + debuginfo] target(s) in 0.12s
     Running `target/release/xtask image --arch x86_64`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', xtask/src/command/mod.rs:50:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

之前发了 需要先 cd zCore。建议看一下我前面的回复。目前 README 已经过时,没有时间改。