@@ -200,28 +200,16 @@ QEMU_ARGS+=( -E LD_PRELOAD="${SYSROOT_DIR}/usr/lib/libstdc++.so.6:${SYSROOT_DIR}
200200function 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