File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -q \
1212# Add rust binaries to PATH
1313ENV PATH="$PATH:/root/.cargo/bin"
1414
15+ # Set default build target to armv7
16+ ENV CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"
17+
1518# Target reMarkable architecture by default
1619COPY config /root/.cargo/config
Original file line number Diff line number Diff line change 1- [build]
2- target = "armv7-unknown-linux-gnueabihf"
3-
41[target.armv7-unknown-linux-gnueabihf]
52linker = "arm-linux-gnueabihf-gcc"
63rustflags = [
@@ -10,3 +7,10 @@ rustflags = [
107 "-C", "link-arg=-mfloat-abi=hard",
118 "-C", "link-arg=-mcpu=cortex-a9",
129]
10+
11+ [target.aarch64-unknown-linux-gnu]
12+ linker = "aarch64-remarkable-linux-gnu-gcc"
13+ rustflags = [
14+ "-C", "link-arg=-march=armv8-a+crc+crypto",
15+ "-C", "link-arg=-mtune=cortex-a53",
16+ ]
Original file line number Diff line number Diff line change @@ -157,21 +157,23 @@ export CHOST="$CHOST"
157157export CROSS_COMPILE="$CHOST-"
158158export 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"
159159export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot"
160- SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot"
161- NGCONFIG="$NGCONFIG"
160+ export SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot"
161+ export NGCONFIG="$NGCONFIG"
162162export TARGET_PREFIX="$CHOST"
163+ export CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf"
163164EOF
164165
165166RUN touch /opt/x-tools/switch-aarch64.sh && chmod +x /opt/x-tools/switch-aarch64.sh && cat <<EOF > /opt/x-tools/switch-aarch64.sh
166167export ARCH=aarch64
167168export CHOST="$CHOST_AARCH64"
168169export CROSS_COMPILE="$CHOST_AARCH64-"
169- export PATH="$PATH:/opt/x-tools/$NGCONFIG_AARCH64/bin"
170+ export PATH="\ $ PATH:/opt/x-tools/$NGCONFIG_AARCH64/bin"
170171export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/opt/lib/pkgconfig"
171172export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot"
172173export SYSROOT="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot"
173174export NGCONFIG="$NGCONFIG_AARCH64"
174175export TARGET_PREFIX="$CHOST_AARCH64"
176+ export CARGO_BUILD_TARGET="aarch64-unknown-linux-gnu"
175177EOF
176178
177179# Configure Opkg
You can’t perform that action at this time.
0 commit comments