init commit

This commit is contained in:
Robin Müller 2021-08-14 17:13:45 +02:00
commit 2f7e2ba881
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
7 changed files with 43 additions and 0 deletions

4
.cargo/config.toml Normal file
View File

@ -0,0 +1,4 @@
[build]
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

5
Cargo.lock generated Normal file
View 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
View 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
View 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
View 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
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}