Skip to content

Instantly share code, notes, and snippets.

@LesnyRumcajs
Last active January 3, 2022 17:39
Show Gist options
  • Save LesnyRumcajs/added2ef47bd0569ee18105377d1e7c4 to your computer and use it in GitHub Desktop.
Save LesnyRumcajs/added2ef47bd0569ee18105377d1e7c4 to your computer and use it in GitHub Desktop.
Script for enabling cross-compilation (to ARM) from Fedora 30
#!/bin/bash
echo '*** updating rust ***'
rustup update
rustup self update
echo '*** adding armv7 to rust target ***'
rustup target add armv7-unknown-linux-gnueabihf
echo '*** installing cross-compiling toolchain and headers ***'
sudo dnf install gcc-arm-linux-gnu glibc-arm-linux-gnu
echo '*** adding cross-linker to rust config ***'
echo [target.armv7-unknown-linux-gnueabihf] >> .cargo/config
echo linker = \"arm-linux-gnueabihf-gcc\" >> .cargo/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment