Cross compile using cargo-cross

This commit is contained in:
Frederik Menke 2024-01-08 22:34:49 +01:00
parent 36fddc99c8
commit b5129ff3e6
3 changed files with 5 additions and 1 deletions

2
red/Cross.toml Normal file
View file

@ -0,0 +1,2 @@
[target.armv7-unknown-linux-gnueabihf]
dockerfile = "./Dockerfile"

2
red/Dockerfile Normal file
View file

@ -0,0 +1,2 @@
FROM ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf
RUN dpkg --add-architecture armhf && apt-get update && apt-get install --assume-yes libudev-dev:armhf

View file

@ -1,7 +1,7 @@
url := "olimex@muele.local"
build:
cargo build --target=armv7-unknown-linux-gnueabihf
cross build --target=armv7-unknown-linux-gnueabihf
rrun:
#scp -r ./src {{url}}:red/