File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
12addons :
23 apt :
34 packages :
@@ -9,9 +10,12 @@ addons:
910 - gstreamer1.0-plugins-ugly
1011 - gstreamer1.0-libav
1112 - libgstrtspserver-1.0-dev
13+ update : true
14+ arch :
15+ - amd64
16+ - arm64 # while this technically isn't the RPi4 it's a nice proof of concept
1217cache : cargo
1318dist : bionic
1419language : rust
1520rust :
1621 - stable
17-
Original file line number Diff line number Diff line change 1+ [target .armv7-unknown-linux-gnueabihf ]
2+ image = " rusty-engine:latest"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ if [ " ${CARGO} " == " cross" ]; then
5+ sudo apt-get install -y qemu-user-static
6+ # set up docker
7+ echo Installing cross
8+ cargo install cross || true
9+ sudo systemctl start docker
10+ echo Building docker image
11+ $( pwd) /cross-build.sh
12+ fi
13+ eval " $CARGO $TASK --target $TARGET "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ # bind last argument in portable manner
5+ for last in " $@ " ; do : ; done
6+
7+ docker_qemu=" docker/qemu-arm-static"
8+ rm -f ${docker_qemu}
9+ cp $( which qemu-arm-static) ${docker_qemu}
10+ docker build -t rusty-engine:latest docker/
11+ rm ${docker_qemu}
12+
13+ if [ " ${last} " == " run" ]; then
14+ docker run --rm --privileged \
15+ --volume " $( pwd) " :/docking-bay \
16+ --name " opsi-rusty-engine-arm" \
17+ rusty-engine:latest \
18+ bash -e -o pipefail -c \
19+ " uname -a"
20+ fi
Original file line number Diff line number Diff line change 1+ FROM arm32v7/debian:buster
2+
3+ ARG DEBIAN_FRONTEND=noninteractive
4+
5+ COPY qemu-arm-static /usr/bin/qemu-arm-static
6+
7+ RUN apt-get -y update
8+ # basics
9+ RUN apt-get install -y build-essential curl debhelper g++-arm-linux-gnueabihf libc6-dev-armhf-cross
10+ # rust
11+ ENV RUSTUP_HOME=/opt/rustup
12+ ENV CARGO_HOME=/opt/cargo
13+ RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain stable -y
14+ ENV PATH="${PATH}:/opt/cargo/bin"
15+ ENV RUST_TOOLCHAIN="stable"
16+ RUN rustup toolchain install "${RUST_TOOLCHAIN}"
17+ RUN rustup default "${RUST_TOOLCHAIN}"
18+ # gstreamer
19+ RUN apt-get install --no-install-recommends -y libgstreamer1.0-dev \
20+ libgstreamer-plugins-base1.0-dev \
21+ gstreamer1.0-plugins-base \
22+ gstreamer1.0-plugins-good \
23+ gstreamer1.0-plugins-bad \
24+ gstreamer1.0-plugins-ugly \
25+ gstreamer1.0-libav:armhf \
26+ libgstrtspserver-1.0-dev
You can’t perform that action at this time.
0 commit comments