Comments (3)
Here's an example of the above that just worked for me, but done entirely from the command line rather than a config file:
rustup target add arm-unknown-linux-gnueabi
git clone https://github.com/raspberrypi/tools $HOME/rpi_tools
RUSTFLAGS="-C linker=$HOME/rpi_tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc" cargo build --target arm-unknown-linux-gnueabihf --tests
from rust-cross.
@theronic Yes, you only need to change the linker for the resulting binary to work.
Something like this in .cargo/config
:
# default target
target = "arm-unknown-linux-gnueabihf"
[target.arm-unknown-linux-gnueabihf]
linker = "/foo/raspberrypi-tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-cc"
I'm currently using official compiler build for manual cross compilation from x86_64 Linux to ARMv6 (for Pi Zero).
from rust-cross.
So, cargo build --target=arm-unknown-linux-gnueabihf
should work for Raspberry Pi Zero?
from rust-cross.
Related Issues (20)
- read-only file system HOT 1
- Cross compiling from Windows to Linux HOT 8
- Remove references to deprecated multirust
- missing gcc-multilib HOT 2
- <3 HOT 1
- cross compilation from ubuntu linux to s390 HOT 2
- Confusion with https://github.com/japaric/cross
- Target triple for Windows
- Tier 1 link in README doesn't go anywhere
- Missing header files when cross compiling to windows
- CloudABI support
- Update qemu to 2.12.0
- rust cross compile to riscv64gc
- Fix if example code isn't woking
- Build Failed: openssl-sys
- x86_64-unknown-linux-musl does not always produce statically linked binaries
- Best practices for testing cross-compiled targets?
- conttributing
- Cross compile fatal error: 'bits/libc-header-start.h' file not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-cross.