commit cb5367146efb3274473c14a561b65e7e470b7f3b
parent a5ad681c5417f962c947210885cf483f0bc9628b
Author: parazyd <parazyd@dyne.org>
Date: Tue, 14 Jul 2020 22:25:17 +0200
Update toolchain logic and add or1k.
Diffstat:
M | config | | | 16 | +++++----------- |
M | init.sh | | | 62 | ++++++++++---------------------------------------------------- |
M | lib/helpers | | | 2 | ++ |
M | sdk | | | 5 | ++--- |
4 files changed, 19 insertions(+), 66 deletions(-)
diff --git a/config b/config
@@ -1,5 +1,5 @@
#!/usr/bin/env zsh
-# Copyright (c) 2016-2017 Dyne.org Foundation
+# Copyright (c) 2016-2020 Dyne.org Foundation
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of arm-sdk
@@ -27,19 +27,13 @@ MAKEOPTS="-j$(( $(grep -c 'processor' /proc/cpuinfo) + 1 ))"
## uncomment if you wish to create stage4 tarballs for faster rebuilding
# TAR_STAGE4=true
-## devuan packaged toolchain
-devuantc="arm-none-eabi-"
-
-## linaro armhf toolchain
-armhftc="arm-linux-gnueabihf-"
-
-## linaro armel toolchain
-armeltc="arm-linux-gnueabi-"
-
-## linaro arm64 toolchain
+armhftc="arm-none-eabi-"
+armeltc="arm-none-eabi-"
arm64tc="aarch64-linux-gnu-"
+or1ktc="or1k-linux-musl-"
export PATH="$R/gcc/linaro-armhf/bin:$R/gcc/linaro-armel/bin:$R/gcc/linaro-arm64/bin"
+export PATH="$PATH:$R/gcc/or1k-linux-musl/bin"
export PATH="$PATH:/usr/sbin:/sbin:/usr/bin:/bin"
diff --git a/init.sh b/init.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2016-2017 Dyne.org Foundation
+# Copyright (c) 2016-2020 Dyne.org Foundation
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of arm-sdk
@@ -19,63 +19,21 @@
## This script will setup arm-sdk and make it ready for usage.
+set -e
git submodule update --init --recursive --checkout
mkdir -p gcc
-#cd lib/libdevuansdk && git checkout next && cd -
+cd gcc
-## =================
-## linaro toolchains
-## =================
+or1ktc="or1k-linux-musl"
+or1kurl="http://musl.cc/or1k-linux-musl-cross.tgz"
-gettc() {
- cd gcc
- [ -d "linaro-$2" ] && return 0
- echo "Downloading $1" && \
- wget -q -O "$(basename $1)" "$1" && \
- echo "Extracting $(basename $1)" && \
- tar xfp "$(basename $1)" && \
- mv "$(basename -s .tar.xz $1)" "linaro-${2}" || \
- return 1
- cd -
-}
+wget "$or1kurl"
+tar xf "$(basename "$or1kurl")"
+mv or1k-linux-musl-cross "$or1ktc"
+rm -f "$(basename "$or1kurl")"
-_hostarch="$(uname -m)"
-
-armeltc=arm-linux-gnueabi
-armhftc=arm-linux-gnueabihf
-arm64tc=aarch64-linux-gnu
-
-linarover="7.1.1-2017.08"
-linarourl="https://releases.linaro.org/components/toolchain/binaries/7.1-2017.08"
-
-tc="${linarourl}/${armeltc}/gcc-linaro-${linarover}-${_hostarch}_${armeltc}.tar.xz"
-gettc "$tc" "armel" || {
- echo "Something went wrong while downloading the armel toolchain."
- exit 1
-}
-
-tc="${linarourl}/${armhftc}/gcc-linaro-${linarover}-${_hostarch}_${armhftc}.tar.xz"
-gettc "$tc" "armhf" || {
- echo "Something went wrong while downloading the armhf toolchain."
- exit 1
-}
-
-tc="${linarourl}/${arm64tc}/gcc-linaro-${linarover}-${_hostarch}_${arm64tc}.tar.xz"
-gettc "$tc" "arm64" || {
- echo "Something went wrong while downloading the arm64 toolchain."
- exit 1
-}
-
-damnunicorncompanyver="4.9.4-2017.01"
-damnunicorncompanyurl="https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01"
-
-tc="${damnunicorncompanyurl}/${armhftc}/gcc-linaro-${damnunicorncompanyver}-${_hostarch}_${armhftc}.tar.xz"
-gettc "$tc" "armhf-unicorns" || {
- echo "Something went wrong while downloading the toolchain for the damn
- unicorn company kernels."
- exit 1
-}
+cd -
cat <<EOM
diff --git a/lib/helpers b/lib/helpers
@@ -151,4 +151,6 @@ EOF
"$strapdir/$armel_qemu_bin" \
"$strapdir/$armhf_qemu_bin" \
"$strapdir/$arm64_qemu_bin"
+
+ return 0
}
diff --git a/sdk b/sdk
@@ -1,5 +1,5 @@
#!/usr/bin/env zsh
-# Copyright (c) 2016-2018 Dyne.org Foundation
+# Copyright (c) 2016-2020 Dyne.org Foundation
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of arm-sdk
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
-armsdk_version="0.7"
+armsdk_version="1.0"
R=${ARM_SDK:-$PWD}
@@ -167,7 +167,6 @@ __EOF__
arm64) export compiler="$arm64tc";;
*) die "invalid architecture in board script"; exit 1;;
esac
- [[ -n "$USEDEVUANTC" ]] && export compiler="$devuantc"
export LANG=C
export LC_ALL=C