Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions toolchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > /opt/x-tools/switch-aarch64.sh
Expand All @@ -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
Expand Down
Loading