From 1ce457858719aac171bfb66837064fcc40b2639f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Mon, 25 Nov 2024 20:25:20 -0500 Subject: [PATCH] Adapting the build script to use the new toolchains, until I find something better suited --- build.sh | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index ed10046..b608081 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -DL="https://github.com/openipc/firmware/releases/download/latest" +DL="https://github.com/OpenIPC/firmware/releases/download/toolchain" EXT="tgz" PRE="linux" @@ -9,6 +9,7 @@ toolchain() { mkdir -p toolchain/$1 if [ "$EXT" = "zip" ]; then unzip $1.$EXT || exit 1 + chmod -R +x toolchain/$1/bin else tar -xf $1.$EXT -C toolchain/$1 --strip-components=1 || exit 1 fi @@ -23,31 +24,35 @@ else OPT="-Os -s" fi -if [ "$1" = "arm-glibc" ]; then - toolchain cortex_a7-gcc13-glibc-4_9 arm -lm -elif [ "$1" = "arm-musl" ]; then - toolchain cortex_a7_thumb2-gcc13-musl-4_9 arm -elif [ "$1" = "arm9-glibc" ]; then +if [ "$1" = "arm-glibc" ] || [ "$1" = "hisi-v4a" ]; then + toolchain toolchain.hisilicon-hi3516cv500 -lm +elif [ "$1" = "arm-musl3" ] || [ "$1" = "hisi-v2a" ] || [ "$1" = "hisi-v3a" ]; then + toolchain toolchain.hisilicon-hi3516av100 arm +elif [ "$1" = "arm-musl4" ] || [ "$1" = "hisi-v4" ]; then + toolchain toolchain.hisilicon-hi3516ev200 arm +elif [ "$1" = "arm9-glibc" ] || [ "$1" = "ak39xx" ]; then DL="https://github.com/Lamobo/Lamobo-D1/raw/master/compiler" EXT="tar.bz2" PRE="none-linux-gnueabi" toolchain arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu arm "-ldl -lm -lpthread -lrt -std=gnu99" -elif [ "$1" = "arm9-musl3" ]; then - toolchain arm926t-gcc13-musl-3_0 arm -elif [ "$1" = "arm9-musl4" ]; then - toolchain arm926t-gcc13-musl-4_9 arm -elif [ "$1" = "arm9-uclibc" ]; then - toolchain arm926t-gcc13-uclibc-3_3 arm -elif [ "$1" = "armhf-glibc" ]; then - toolchain cortex_a7_thumb2_hf-gcc13-glibc-4_9 arm -lm -elif [ "$1" = "armhf-musl" ]; then - toolchain cortex_a7_thumb2_hf-gcc13-musl-4_9 arm -elif [ "$1" = "mips-musl" ]; then - toolchain mips_xburst-gcc13-musl-3_10 mipsel +elif [ "$1" = "arm9-musl3" ] || [ "$1" = "hisi-v1" ]; then + toolchain toolchain.hisilicon-hi3516cv100 arm +elif [ "$1" = "arm9-musl4" ] || [ "$1" = "hisi-v2" ] || [ "$1" = "hisi-v3" ]; then + toolchain toolchain.hisilicon-hi3516cv200 arm +elif [ "$1" = "arm9-uclibc" ] || [ "$1" = "gm813x" ]; then + toolchain toolchain.grainmedia-gm8136 arm +elif [ "$1" = "armhf-glibc" ] || [ "$1" = "star6e" ]; then + toolchain toolchain.sigmastar-infinity6e arm -lm +elif [ "$1" = "armhf-musl" ] || [ "$1" = "star6" ]; then + toolchain toolchain.sigmastar-infinity6 arm +elif [ "$1" = "mips-musl" ] || [ "$1" = "inge-t31" ]; then + toolchain toolchain.ingenic-t31 mipsel elif [ "$1" = "riscv64-musl" ]; then DL="https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64-lp64d/tarballs" EXT="tar.xz" toolchain riscv64-lp64d--musl--stable-2024.05-1 riscv64 else - echo "Usage: $0 [arm-glibc|arm-musl|arm9-musl3|arm9-musl4|arm9-uclibc|armhf-glibc|armhf-musl|mips-musl|riscv64-musl]" + echo "Usage: $0 [arm-glibc|arm-musl3|arm-musl4|arm9-musl3|arm9-musl4|arm9-uclibc|armhf-glibc|armhf-musl|mips-musl|riscv64-musl|" + echo " ak39xx|gm813x|hisi-v1|hisi-v2|hisi-v2a|hisi-v3|hisi-v3a|hisi-v4|hisi-v4a|inge-t31|star6|star6e]" + echo " (debug)" fi