Last active
July 29, 2024 13:19
-
-
Save fdelacruz/3acfb257dad5b6ea4c89f4ed9a5b4873 to your computer and use it in GitHub Desktop.
Cross build to aarch64-unknown-linux-gnu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -xe | |
| readonly TARGET_ARCH=aarch64-unknown-linux-gnu | |
| readonly SOURCE_PATH="./target/$TARGET_ARCH/release/hello-world" | |
| readonly TARGET_PATH=/home/fdelacruz/workspace/cross_build | |
| # readonly PI_IP=192.168.1.x | |
| readonly TARGET_HOST=fdelacruz@$PI_IP | |
| readonly PORT=2202 | |
| cargo install -f cross | |
| cross build --release --target $TARGET_ARCH | |
| scp -P $PORT -r "$SOURCE_PATH" "$TARGET_HOST":$TARGET_PATH | |
| ssh -p $PORT "$USER"@"$PI_IP" $TARGET_PATH/hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment