Skip to content

Commit 802eecb

Browse files
committed
tools: bump mips toolchain
* remove r2 * bump r6 to 2024.10-02
1 parent 91ef18b commit 802eecb

File tree

3 files changed

+11
-50
lines changed

3 files changed

+11
-50
lines changed

.github/workflows/mips64_toolchain_cmake.yml

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
mips64el, # alias to mips64el-r6
1919
mips64-r6, # codescape
2020
mips64el-r6, # codescape
21-
mips64-r2, # codescape
22-
mips64el-r2 # codescape
2321
]
2422
fail-fast: false
2523
name: Linux•Toolchain ${{matrix.targets}}

ci/docker/toolchain/Dockerfile

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# Create a virtual environment with all tools installed
22
# ref: https://hub.docker.com/_/ubuntu
33
FROM ubuntu:latest AS env
4+
45
# Install system build dependencies
56
ENV PATH=/usr/local/bin:$PATH
67
RUN apt-get update -qq \
78
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
8-
git wget libssl-dev \
9-
build-essential ninja-build \
9+
git wget libssl-dev build-essential \
10+
cmake ninja-build \
1011
python3 python3-venv \
1112
pkgconf libglib2.0-dev \
1213
&& apt-get clean \
1314
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1415
ENTRYPOINT ["/usr/bin/bash", "-c"]
1516
CMD ["/usr/bin/bash"]
1617

17-
# Install CMake 3.28.3
18-
RUN wget "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
19-
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
20-
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
21-
&& rm cmake-3.28.3-linux-x86_64.sh
22-
2318
FROM env AS devel
2419
WORKDIR /home/project
2520
COPY . .

tools/cross_compile.sh

+8-40
Original file line numberDiff line numberDiff line change
@@ -200,28 +200,16 @@ QEMU_ARGS+=( -E LD_PRELOAD="${SYSROOT_DIR}/usr/lib/libstdc++.so.6:${SYSROOT_DIR}
200200
function expand_codescape_config() {
201201
# https://www.mips.com/mips-toolchain-configurations/
202202
# mips-img: MIPS32R6 and MIPS64R6
203-
# mips-mti: MIPS32R2 and MIPS64R2
204203
case "${TARGET}" in
205204
"mips" | "mipsel" | "mips64" | "mips64el" | \
206205
"mips32-r6" | "mips32el-r6" | "mips64-r6" | "mips64el-r6" )
207206
# IMG Toolchain MIPS32R6 and MIPS64R6
208-
# ref: https://codescape.mips.com/components/toolchain/2021.09-01/downloads.html
209-
local -r DATE=2021.09-01
207+
# ref: https://codescape.mips.com/components/toolchain/2024.10-02/downloads.html
208+
local -r DATE=2024.10-02
210209
local -r CODESCAPE_URL=https://codescape.mips.com/components/toolchain/${DATE}/Codescape.GNU.Tools.Package.${DATE}.for.MIPS.IMG.Linux.CentOS-6.x86_64.tar.gz
211210
local -r GCC_PREFIX="mips-img-linux-gnu"
212211
local -r GCC_RELATIVE_DIR="${GCC_PREFIX}/${DATE}"
213212
;;
214-
"mips32-r2" | "mips32el-r2" | "mips64-r2" | "mips64el-r2")
215-
# MTI Toolchain MIPS32R2-MIPS32R6, MIPS64R2-MIPS64R6
216-
# ref: https://codescape.mips.com/components/toolchain/2020.06-01/downloads.html
217-
local -r DATE=2020.06-01
218-
local -r CODESCAPE_URL=https://codescape.mips.com/components/toolchain/${DATE}/Codescape.GNU.Tools.Package.${DATE}.for.MIPS.MTI.Linux.CentOS-6.x86_64.tar.gz
219-
# # ref: https://codescape.mips.com/components/toolchain/2019.09-06/downloads.html
220-
# local -r DATE=2019.09-06
221-
# local -r CODESCAPE_URL=https://codescape.mips.com/components/toolchain/${DATE}/Codescape.GNU.Tools.Package.${DATE}.for.MIPS.MTI.Linux.CentOS-6.x86_64.tar.gz
222-
local -r GCC_PREFIX="mips-mti-linux-gnu"
223-
local -r GCC_RELATIVE_DIR="${GCC_PREFIX}/${DATE}"
224-
;;
225213
*)
226214
>&2 echo 'unknown platform'
227215
exit 1 ;;
@@ -238,41 +226,21 @@ function expand_codescape_config() {
238226
local -r FLAVOUR="mips-r6-hard"
239227
local -r LIBC_DIR_SUFFIX="lib"
240228
;;
241-
"mips32-r2")
242-
local -r MIPS_FLAGS="-EB -mips32r2 -mabi=32"
243-
local -r FLAVOUR="mips-r2-hard"
244-
local -r LIBC_DIR_SUFFIX="lib"
245-
;;
246229
"mipsel" | "mips32el-r6")
247230
local -r MIPS_FLAGS="-EL -mips32r6 -mabi=32"
248231
local -r FLAVOUR="mipsel-r6-hard"
249232
local -r LIBC_DIR_SUFFIX="lib"
250233
;;
251-
"mips32el-r2")
252-
local -r MIPS_FLAGS="-EL -mips32r2 -mabi=32"
253-
local -r FLAVOUR="mipsel-r2-hard"
254-
local -r LIBC_DIR_SUFFIX="lib"
255-
;;
256234
"mips64" | "mips64-r6")
257235
local -r MIPS_FLAGS="-EB -mips64r6 -mabi=64"
258236
local -r FLAVOUR="mips-r6-hard"
259237
local -r LIBC_DIR_SUFFIX="lib64"
260238
;;
261-
"mips64-r2")
262-
local -r MIPS_FLAGS="-EB -mips64r2 -mabi=64"
263-
local -r FLAVOUR="mips-r2-hard"
264-
local -r LIBC_DIR_SUFFIX="lib64"
265-
;;
266239
"mips64el" | "mips64el-r6")
267240
local -r MIPS_FLAGS="-EL -mips64r6 -mabi=64"
268241
local -r FLAVOUR="mipsel-r6-hard"
269242
local -r LIBC_DIR_SUFFIX="lib64"
270243
;;
271-
"mips64el-r2")
272-
local -r MIPS_FLAGS="-EL -mips64r2 -mabi=64"
273-
local -r FLAVOUR="mipsel-r2-hard"
274-
local -r LIBC_DIR_SUFFIX="lib64"
275-
;;
276244
*)
277245
>&2 echo 'unknown mips platform'
278246
exit 1 ;;
@@ -354,8 +322,8 @@ DESCRIPTION
354322
\t\tx86_64
355323
\t\tarmv7-eabihf(arm) armebv7-eabihf(armeb) (bootlin)
356324
\t\taarch64(arm64) aarch64be(arm64be) (bootlin)
357-
\t\tmips32-r6(mips) mips32el-r6(mipsel) mips32-r2 mips32el-r2 (codespace)
358-
\t\tmips64-r6(mips64) mips64el-r6(mips64el) mips64-r2 mips64el-r2 (codespace)
325+
\t\tmips32-r6(mips) mips32el-r6(mipsel) (codespace)
326+
\t\tmips64-r6(mips64) mips64el-r6(mips64el) (codespace)
359327
\t\tppc-440fp(ppc) ppc-e500mc (bootlin)
360328
\t\tppc64 ppc64le (bootlin)
361329
\t\triscv32 riscv64 (bootlin)
@@ -422,16 +390,16 @@ function main() {
422390
expand_bootlin_config
423391
declare -r QEMU_ARCH=aarch64_be ;;
424392

425-
mips | mips32-r6 | mips32-r2)
393+
mips | mips32-r6)
426394
expand_codescape_config
427395
declare -r QEMU_ARCH=mips ;;
428-
mipsel | mips32el-r6 | mips32el-r2)
396+
mipsel | mips32el-r6)
429397
expand_codescape_config
430398
declare -r QEMU_ARCH=mipsel ;;
431-
mips64 | mips64-r6 | mips64-r2)
399+
mips64 | mips64-r6)
432400
expand_codescape_config
433401
declare -r QEMU_ARCH=mips64 ;;
434-
mips64el | mips64el-r6 | mips64el-r2)
402+
mips64el | mips64el-r6)
435403
expand_codescape_config
436404
declare -r QEMU_ARCH=mips64el ;;
437405

0 commit comments

Comments
 (0)