diff --git a/rust/Dockerfile b/rust/Dockerfile index 8e13490..725dd1e 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -12,8 +12,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -q \ # Add rust binaries to PATH ENV PATH="$PATH:/root/.cargo/bin" -# Set default build target to armv7 -ENV CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf" - # Target reMarkable architecture by default COPY config /root/.cargo/config + +RUN echo 'export CARGO_BUILD_TARGET="aarch64-unknown-linux-gnu"' >> /opt/x-tools/switch-aarch64.sh \ + && echo 'export CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"' >> /opt/x-tools/switch-arm.sh diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 8f4cbda..db46bca 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -143,12 +143,12 @@ RUN touch /opt/x-tools/switch-arm.sh && chmod +x /opt/x-tools/switch-arm.sh && c export ARCH=arm export CHOST="$CHOST" export CROSS_COMPILE="$CHOST-" +PATH="\$PATH:/opt/x-tools/$NGCONFIG/bin" export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/opt/lib/pkgconfig" export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" export SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" export NGCONFIG="$NGCONFIG" export TARGET_PREFIX="$CHOST" -export CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf" EOF RUN touch /opt/x-tools/switch-aarch64.sh && chmod +x /opt/x-tools/switch-aarch64.sh && cat < /opt/x-tools/switch-aarch64.sh @@ -161,7 +161,6 @@ export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/ export SYSROOT="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" export NGCONFIG="$NGCONFIG_AARCH64" export TARGET_PREFIX="$CHOST_AARCH64" -export CARGO_BUILD_TARGET="aarch64-unknown-linux-gnu" EOF # Configure Opkg