-
Couldn't load subscription status.
- Fork 428
Add qemu-system support for more targets #166
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
Conversation
|
The qemu parameters and cpu type was found using trial an error. We must decide which cpu type to use by default. Maybe @gnzlbg can help with this? We can also allow the user to specify the cpu type, memory and numbers of cpus. To show the qemu cpu type and boot time, I executed the following script #!/bin/bash
set -e
if [ ! -e xx ]; then
cargo new xx --bin
fi
cd xx
cat << EOF > src/main.rs
use std::process::Command;
fn main() {
let output = Command::new("cat").arg("/proc/cpuinfo").output().expect("exec cat command");
print!("{}", String::from_utf8_lossy(&output.stdout));
}
EOF
for target in aarch64-unknown-linux-gnu \
armv7-unknown-linux-gnueabihf \
i686-unknown-linux-gnu \
mips-unknown-linux-gnu \
mipsel-unknown-linux-gnu \
mips64el-unknown-linux-gnuabi64 \
powerpc-unknown-linux-gnu \
powerpc64-unknown-linux-gnu \
powerpc64le-unknown-linux-gnu \
s390x-unknown-linux-gnu \
sparc64-unknown-linux-gnu \
x86_64-unknown-linux-gnu; do
echo -e "[target.$target]\nrunner = \"qemu-system\"" > Cross.toml
cross run --target $target
donewhich outputs: |
|
I think that having a single CPU that is known to "work" is a good start. In the longer term it might be better if the user could specify their own (maybe from a list of CPUs that are known to work?). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will r+ after #153 lands
84a003d to
7c5de7d
Compare
4d7b9a3 to
302a4e4
Compare
|
@malbarbo need to resolve conflicts with this. next in line |
cargo run works, but cargo test fails... qemu or rust bug?
cargo test fails, but cargo run works. qemu or rust bug?
Remove the workaround of copying files before execute
302a4e4 to
cec4fd5
Compare
|
Pushed fixes for the two failing targets. |
|
bors: try |
tryNot awaiting review |
tryBuild failed |
|
bors: try |
|
Spurious failure for sparc64 https://travis-ci.org/rust-embedded/cross/jobs/442351783#L9340 |
|
bors: stop |
|
bors: r+ |
|
👎 Rejected by too few approved reviews |
|
bors: r- |
|
bors: try |
tryNot awaiting review |
tryBuild failed |
|
bors: try |
tryBuild succeeded |
|
bors: r+ |
166: Add qemu-system support for more targets r=Dylan-DPC a=malbarbo Add qemu-system support for the following targets: - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabihf - i686-unknown-linux-gnu - mips-unknown-linux-gnu - mipsel-unknown-linux-gnu - mips64el-unknown-linux-gnuabi64 - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - s390x-unknown-linux-gnu - sparc64-unknown-linux-gnu - x86_64-unknown-linux-gnu Running `cross test` fails for `s390x-unknown-linux-gnu` and `sparc64-unknown-linux-gnu`, but `cargo run` works. This maybe be a bug in qemu or rustc. Debian does not have a port for `mips64-unknown-linux-gnuabi64`. Support for arm targets can be add later, but I think a custom kernel will be need. musl targets can get qemu-system support latter. Co-authored-by: Marco A L Barbosa <[email protected]>
Timed out |
|
bors: r+ |
166: Add qemu-system support for more targets r=Dylan-DPC a=malbarbo Add qemu-system support for the following targets: - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabihf - i686-unknown-linux-gnu - mips-unknown-linux-gnu - mipsel-unknown-linux-gnu - mips64el-unknown-linux-gnuabi64 - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - s390x-unknown-linux-gnu - sparc64-unknown-linux-gnu - x86_64-unknown-linux-gnu Running `cross test` fails for `s390x-unknown-linux-gnu` and `sparc64-unknown-linux-gnu`, but `cargo run` works. This maybe be a bug in qemu or rustc. Debian does not have a port for `mips64-unknown-linux-gnuabi64`. Support for arm targets can be add later, but I think a custom kernel will be need. musl targets can get qemu-system support latter. Co-authored-by: Marco A L Barbosa <[email protected]>
166: Add qemu-system support for more targets r=Dylan-DPC a=malbarbo Add qemu-system support for the following targets: - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabihf - i686-unknown-linux-gnu - mips-unknown-linux-gnu - mipsel-unknown-linux-gnu - mips64el-unknown-linux-gnuabi64 - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - s390x-unknown-linux-gnu - sparc64-unknown-linux-gnu - x86_64-unknown-linux-gnu Running `cross test` fails for `s390x-unknown-linux-gnu` and `sparc64-unknown-linux-gnu`, but `cargo run` works. This maybe be a bug in qemu or rustc. Debian does not have a port for `mips64-unknown-linux-gnuabi64`. Support for arm targets can be add later, but I think a custom kernel will be need. musl targets can get qemu-system support latter. Co-authored-by: Marco A L Barbosa <[email protected]>
Timed out |
|
bors: r+ p=10 |
166: Add qemu-system support for more targets r=Dylan-DPC a=malbarbo Add qemu-system support for the following targets: - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabihf - i686-unknown-linux-gnu - mips-unknown-linux-gnu - mipsel-unknown-linux-gnu - mips64el-unknown-linux-gnuabi64 - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - s390x-unknown-linux-gnu - sparc64-unknown-linux-gnu - x86_64-unknown-linux-gnu Running `cross test` fails for `s390x-unknown-linux-gnu` and `sparc64-unknown-linux-gnu`, but `cargo run` works. This maybe be a bug in qemu or rustc. Debian does not have a port for `mips64-unknown-linux-gnuabi64`. Support for arm targets can be add later, but I think a custom kernel will be need. musl targets can get qemu-system support latter. Co-authored-by: Marco A L Barbosa <[email protected]>
Build succeeded |
Add qemu-system support for the following targets:
Running
cross testfails fors390x-unknown-linux-gnuandsparc64-unknown-linux-gnu, butcargo runworks. This maybe be a bug in qemu or rustc.Debian does not have a port for
mips64-unknown-linux-gnuabi64. Support for arm targets can be add later, but I think a custom kernel will be need.musl targets can get qemu-system support latter.