Giter Site home page Giter Site logo

Comments (3)

oconnor663 avatar oconnor663 commented on June 15, 2024 8

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.

Majkl578 avatar Majkl578 commented on June 15, 2024 2

@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.

theronic avatar theronic commented on June 15, 2024

So, cargo build --target=arm-unknown-linux-gnueabihf should work for Raspberry Pi Zero?

from rust-cross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.