diff --git a/Cross.toml b/Cross.toml index 6d7355fa..b955213f 100644 --- a/Cross.toml +++ b/Cross.toml @@ -2,7 +2,7 @@ # Based on https://www.collabora.com/news-and-blog/blog/2020/06/23/cross-building-rust-gstreamer-plugins-for-the-raspberry-pi/ # but with `RUN apt-get install -y libdbus-1-dev:armhf` thrown in to get the dependency we need. # This image has been pushed to dockerhub. -image = "alsuren/xiaomi-temp-rpi-builder" +image = "alsuren/cross-dbus:armv7-unknown-linux-gnu-0.2.1" # Once https://github.com/rust-embedded/cross/pull/446 gets somewhere, you @@ -11,16 +11,16 @@ image = "alsuren/xiaomi-temp-rpi-builder" # cargo install --git=https://github.com/alsuren/cross --branch=docker-build-context # and then comment out `image`, above and uncomment the following two lines: # context = "./docker" -# dockerfile = "./docker/Dockerfile.buster-gst-armv7-unknown-linux-gnueabihf" +# dockerfile = "./docker/Dockerfile.dbus.armv7-unknown-linux-gnueabihf" [target.aarch64-unknown-linux-gnu] -image = "alsuren/xiaomi-temp-aarch64-builder" +image = "alsuren/cross-dbus:aarch64-unknown-linux-gnu-0.2.1" # context = "./docker" -# dockerfile = "./docker/Dockerfile.buster-gst-aarch64-unknown-linux-gnu" +# dockerfile = "./docker/Dockerfile.dbus.aarch64-unknown-linux-gnu" [target.x86_64-unknown-linux-gnu] -image = "alsuren/xiaomi-temp-x86_64-builder" +image = "alsuren/cross-dbus:x86_64-unknown-linux-gnu-0.2.1" # context = "./docker" -# dockerfile = "./docker/Dockerfile.buster-gst-x86_64-unknown-linux-gnu" +# dockerfile = "./docker/Dockerfile.dbus.x86_64-unknown-linux-gnu" diff --git a/docker/Dockerfile.buster-gst-aarch64-unknown-linux-gnu b/docker/Dockerfile.buster-gst-aarch64-unknown-linux-gnu deleted file mode 100644 index a1ad7e66..00000000 --- a/docker/Dockerfile.buster-gst-aarch64-unknown-linux-gnu +++ /dev/null @@ -1,27 +0,0 @@ -FROM alsuren/cross-context:latest as context - -FROM debian:buster - -COPY --from=context common.sh / -RUN /common.sh - -COPY --from=context cmake.sh / -RUN /cmake.sh - -COPY --from=context xargo.sh / -RUN /xargo.sh - -RUN apt-get install --assume-yes --no-install-recommends \ - g++-aarch64-linux-gnu \ - libc6-dev-arm64-cross - -RUN dpkg --add-architecture arm64 && \ - apt-get update && \ - apt-get install -y libssl-dev:arm64 libdbus-1-dev:arm64 - -ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ - CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \ - CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \ - QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \ - RUST_TEST_THREADS=1 \ - PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig diff --git a/docker/Dockerfile.buster-gst-armv7-unknown-linux-gnueabihf b/docker/Dockerfile.buster-gst-armv7-unknown-linux-gnueabihf deleted file mode 100644 index 61d56d24..00000000 --- a/docker/Dockerfile.buster-gst-armv7-unknown-linux-gnueabihf +++ /dev/null @@ -1,27 +0,0 @@ -FROM alsuren/cross-context:latest as context - -FROM debian:buster - -COPY --from=context common.sh / -RUN /common.sh - -COPY --from=context cmake.sh / -RUN /cmake.sh - -COPY --from=context xargo.sh / -RUN /xargo.sh - -RUN apt-get install --assume-yes --no-install-recommends \ - g++-arm-linux-gnueabihf \ - libc6-dev-armhf-cross - -RUN dpkg --add-architecture armhf && \ - apt-get update && \ - apt-get install -y libssl-dev:armhf libdbus-1-dev:armhf - -ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ - CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \ - CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++ \ - QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \ - RUST_TEST_THREADS=1 \ - PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig diff --git a/docker/Dockerfile.buster-gst-x86_64-unknown-linux-gnu b/docker/Dockerfile.buster-gst-x86_64-unknown-linux-gnu deleted file mode 100644 index f2160071..00000000 --- a/docker/Dockerfile.buster-gst-x86_64-unknown-linux-gnu +++ /dev/null @@ -1,15 +0,0 @@ -FROM alsuren/cross-context:latest as context - -FROM debian:buster - -COPY --from=context common.sh / -RUN /common.sh - -COPY --from=context cmake.sh / -RUN /cmake.sh - -COPY --from=context xargo.sh / -RUN /xargo.sh - -RUN apt-get update && \ - apt-get install -y libssl-dev libdbus-1-dev diff --git a/docker/Dockerfile.dbus.aarch64-unknown-linux-gnu b/docker/Dockerfile.dbus.aarch64-unknown-linux-gnu new file mode 100644 index 00000000..7575ed85 --- /dev/null +++ b/docker/Dockerfile.dbus.aarch64-unknown-linux-gnu @@ -0,0 +1,7 @@ +FROM rustembedded/cross:aarch64-unknown-linux-gnu-0.2.1 + +RUN dpkg --add-architecture arm64 && \ + apt-get update && \ + apt-get install -y libssl-dev:arm64 libdbus-1-dev:arm64 + +ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig diff --git a/docker/Dockerfile.dbus.armv7-unknown-linux-gnueabihf b/docker/Dockerfile.dbus.armv7-unknown-linux-gnueabihf new file mode 100644 index 00000000..b2ac501f --- /dev/null +++ b/docker/Dockerfile.dbus.armv7-unknown-linux-gnueabihf @@ -0,0 +1,7 @@ +FROM rustembedded/cross:armv7-unknown-linux-gnueabihf-0.2.1 + +RUN dpkg --add-architecture armhf && \ + apt-get update && \ + apt-get install -y libssl-dev:armhf libdbus-1-dev:armhf + +ENV PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig diff --git a/docker/Dockerfile.dbus.x86_64-unknown-linux-gnu b/docker/Dockerfile.dbus.x86_64-unknown-linux-gnu new file mode 100644 index 00000000..68899ae9 --- /dev/null +++ b/docker/Dockerfile.dbus.x86_64-unknown-linux-gnu @@ -0,0 +1,4 @@ +FROM rustembedded/cross:x86_64-unknown-linux-gnu-0.2.1 + +RUN apt-get update && \ + apt-get install -y libssl-dev libdbus-1-dev