init commit
This commit is contained in:
commit
2f7e2ba881
4
.cargo/config.toml
Normal file
4
.cargo/config.toml
Normal file
@ -0,0 +1,4 @@
|
||||
[build]
|
||||
|
||||
[target.armv7-unknown-linux-gnueabihf]
|
||||
linker = "arm-linux-gnueabihf-gcc"
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
5
Cargo.lock
generated
Normal file
5
Cargo.lock
generated
Normal file
@ -0,0 +1,5 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "q7s-rs-crosscompile"
|
||||
version = "0.1.0"
|
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "q7s-rs-crosscompile"
|
||||
version = "0.1.0"
|
||||
authors = ["Robin Mueller <robin.mueller.m@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
Cross-compiling Rust for the Raspberry PI
|
||||
======
|
||||
|
||||
# Prerequisites
|
||||
|
||||
1. Install standard library
|
||||
|
||||
```sh
|
||||
rustup target add armv7-unknown-linux-gnueabihf
|
||||
```
|
||||
|
||||
2. Install a cross-compile toolchain and add it to your path.
|
||||
You can download one built with crosstool-ng from
|
||||
[here](https://www.dropbox.com/sh/hkn4lw87zr002fh/AAAO-HxFQzfmmPQQ9KVmoooGa?dl=0).
|
7
deploy-q7s.sh
Executable file
7
deploy-q7s.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash -i
|
||||
echo $PATH
|
||||
target="armv7-unknown-linux-gnueabihf"
|
||||
|
||||
cargo build --target ${target}
|
||||
|
||||
sshpass -e q7s-cp.py ./target/${target}/debug/q7s-rs-crosscompile
|
3
src/main.rs
Normal file
3
src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in New Issue
Block a user