Skip to content

Commit 1a4e029

Browse files
authored
Add missing PATH in switch-arm.sh (#48)
* Add missing PATH in switch-arm.sh * Remove rust env from toolchain switch * Add rust env to rust image switch.sh Updated build target configuration for Rust.
1 parent 2b554b6 commit 1a4e029

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

rust/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -q \
1212
# Add rust binaries to PATH
1313
ENV PATH="$PATH:/root/.cargo/bin"
1414

15-
# Set default build target to armv7
16-
ENV CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"
17-
1815
# Target reMarkable architecture by default
1916
COPY config /root/.cargo/config
17+
18+
RUN echo 'export CARGO_BUILD_TARGET="aarch64-unknown-linux-gnu"' >> /opt/x-tools/switch-aarch64.sh \
19+
&& echo 'export CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"' >> /opt/x-tools/switch-arm.sh

toolchain/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ RUN touch /opt/x-tools/switch-arm.sh && chmod +x /opt/x-tools/switch-arm.sh && c
143143
export ARCH=arm
144144
export CHOST="$CHOST"
145145
export CROSS_COMPILE="$CHOST-"
146+
PATH="\$PATH:/opt/x-tools/$NGCONFIG/bin"
146147
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"
147148
export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot"
148149
export SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot"
149150
export NGCONFIG="$NGCONFIG"
150151
export TARGET_PREFIX="$CHOST"
151-
export CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"
152152
EOF
153153

154154
RUN touch /opt/x-tools/switch-aarch64.sh && chmod +x /opt/x-tools/switch-aarch64.sh && cat <<EOF > /opt/x-tools/switch-aarch64.sh
@@ -161,7 +161,6 @@ export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/
161161
export SYSROOT="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot"
162162
export NGCONFIG="$NGCONFIG_AARCH64"
163163
export TARGET_PREFIX="$CHOST_AARCH64"
164-
export CARGO_BUILD_TARGET="aarch64-unknown-linux-gnu"
165164
EOF
166165

167166
# Configure Opkg

0 commit comments

Comments
 (0)