You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
console.c goes to a new lib/ where we'll store other general utilities and console.h goes to include/ Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
6 years ago | |
|---|---|---|
| .. | ||
| .cargo | 6 years ago | |
| src | 6 years ago | |
| Cargo.toml | 6 years ago | |
| Makefile | 6 years ago | |
| README.md | 6 years ago | |
| Xargo.toml | 6 years ago | |
| console.c | 6 years ago | |
| console.h | 6 years ago | |
| head.S | 6 years ago | |
| hello_world.c | 6 years ago | |
| powerpc.lds | 6 years ago | |
README.md
I made a minimal Rust demo.
This needs a rebuild of the core library with xargo (https://github.com/japaric/xargo) for working soft floating-point support.
Steps:
$ rustup default nightly
$ rustup target add powerpc64le-unknown-linux-gnu
$ rustup component add rust-src
$ cargo install xargo
$ make
$ make run
ln -sf hello_world.bin main_ram.bin
../core_tb > /dev/null
Hello World
Rust
i 2
5
5
i 3
3.3333333333333335
3.3333333333333335
[-9, -6, 2, 3]
!panicked at 'test', src/lib.rs:58:5