Skip to content

Commit

Permalink
Add info about building for pi with muslc
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh69 committed May 20, 2022
1 parent 6a48737 commit c22c232
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ The communication log is written to output.log

## Cross compile for RPi
```sh
rustup target add armv7-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-musleabihf

sudo apt-get install gcc-multilib-arm-linux-gnueabihf
sudo apt-get install gcc-multilib-arm-linux-gnueabihf musl-tools
```

Add to `~/.cargo/config`:
```
[target.armv7-unknown-linux-gnueabihf]
[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
```

Build with:
```sh
cargo build --target armv7-unknown-linux-gnueabihf
CC=/usr/bin/musl-gcc cargo build --target armv7-unknown-linux-musleabihf --release
```

The file is then in ./target/armv7-unknown-linux-musleabihf/release/otii_measurement

0 comments on commit c22c232

Please sign in to comment.