Skip to content

Could not compile & run. #317

Closed
Closed
@0400H

Description

@0400H

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions