raspberry-cross-build.sh 656 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # Cross compiles release build of joystream-node
  3. # for Raspberry Pi - using docker
  4. # joystream/rust-raspberry image was built from:
  5. # https://github.com/mnaamani/rust-on-raspberry-docker/tree/add-wasm-toolchain-and-clang
  6. export WORKSPACE_ROOT=`cargo metadata --offline --no-deps --format-version 1 | jq .workspace_root -r`
  7. docker run \
  8. -e WASM_BUILD_TOOLCHAIN=nightly-2021-03-24 \
  9. --volume ${WORKSPACE_ROOT}/:/home/cross/project \
  10. --volume ${HOME}/.cargo/registry:/home/cross/.cargo/registry \
  11. joystream/rust-raspberry \
  12. build --release -p joystream-node
  13. ls -l target/arm-unknown-linux-gnueabihf/joystream-node