Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It can't start test in Linux environment #32

Closed
ChaiEvan opened this issue Oct 13, 2022 · 6 comments
Closed

It can't start test in Linux environment #32

ChaiEvan opened this issue Oct 13, 2022 · 6 comments

Comments

@ChaiEvan
Copy link

ChaiEvan commented Oct 13, 2022

It looks good in windows :

PS C:\Rust\rustsbi-qemu> cargo qemu
    Finished release [optimized] target(s) in 0.06s
     Running `target\release\xtask.exe qemu`
    Finished release [optimized] target(s) in 0.06s
    Finished release [optimized] target(s) in 0.06s
[rustsbi] RustSBI version 0.3.0-alpha.4, adapting to RISC-V SBI v1.0.0
.______       __    __      _______.___________.  _______..______   __
|   _  \     |  |  |  |    /       |           | /       ||   _  \ |  |
|  |_)  |    |  |  |  |   |   (----`---|  |----`|   (----`|  |_)  ||  |
|      /     |  |  |  |    \   \       |  |      \   \    |   _  < |  |
|  |\  \----.|  `--'  |.----)   |      |  |  .----)   |   |  |_)  ||  |
| _| `._____| \______/ |_______/       |__|  |_______/    |______/ |__|
[rustsbi] Implementation     : RustSBI-QEMU Version 0.2.0-alpha.2
[rustsbi] Platform Name      : riscv-virtio,qemu
[rustsbi] Platform SMP       : 8
[rustsbi] Platform Memory    : 0x80000000..0x88000000
[rustsbi] Boot HART          : 6
[rustsbi] Device Tree Region : 0x87e00000..0x87e01925
[rustsbi] Firmware Address   : 0x80000000
[rustsbi] Supervisor Address : 0x80200000
[rustsbi] pmp01: 0x00000000..0x80000000 (-wr)
[rustsbi] pmp02: 0x80000000..0x80200000 (---)
[rustsbi] pmp03: 0x80200000..0x88000000 (xwr)
[rustsbi] pmp04: 0x88000000..0x00000000 (-wr)
.....................

But when I try to run it in ubuntu22.04, an error was thrown out in the beginnig like this:

$:~/workspace/debug/rustsbi-qemu$ cargo qemu
    Finished release [optimized] target(s) in 0.01s
     Running `target/release/xtask qemu`
    Finished release [optimized] target(s) in 0.01s
    Finished release [optimized] target(s) in 0.01s
xtask: QEMU command not found. Does your system have QEMU installed and environment variable configured?
xtask: error: No such file or directory (os error 2)
$: ~
@duskmoon314
Copy link
Member

duskmoon314 commented Oct 13, 2022

Do you have qemu installed? cargo qemu will search for qemu-system-riscv64 and need it to run correctly.

Though I think you have qemu, this seems not.

@ChaiEvan
Copy link
Author

yes, I thought it was installed too.
added qemu to path, it didn't throw out errors anymore. Installed, it hang there.

~/workspace/debug/rustsbi-qemu$ cargo qemu
Finished release [optimized] target(s) in 0.01s
Running target/release/xtask qemu
Finished release [optimized] target(s) in 0.01s
Finished release [optimized] target(s) in 0.01s

@duskmoon314
Copy link
Member

I think I know what is going on. This is a known issue that we haven't yet determined its direct cause. To be short, on some platform, qemu give rustsbi-qemu a wrong device tree (some part of its format does not follow the spec), and rustsbi-qemu currently does not ignore these error and will trap in a deadly loop. Thus no output is shown.

Recently I have modified it a bit to bypass this issue and will open a PR of this modification to solve your problem.

@luojia65
Copy link
Member

#33 is now merged, please test again with latest main branch :) @ChaiEvan

@ChaiEvan
Copy link
Author

fixed, thx

@luojia65
Copy link
Member

If there are futher problems, please reopen the issue to let the community know ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants