forked from MeIsReallyBa/padavan-4.4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
該脚本是工具鏈下載脚本(代替dl_toolchain.sh從本地獲取構建工具鏈)方便使用
- Loading branch information
dev
committed
Oct 3, 2024
1 parent
40d3196
commit d6a24bd
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
DIR="toolchain-4.4.x" | ||
|
||
# DL_URL="https://github.com/hanwckf/padavan-toolchain/releases/download/linux-4.4-v1.0" | ||
#gcc: 7.4.0 | ||
#uclibc-ng: 1.0.32 | ||
#build with crosstool-ng-1.24.0 | ||
#This release has SO_REUSEPORT backport patch | ||
|
||
dl() { | ||
[ -z "$1" ] && return | ||
echo "Download toolchain v1.0 from location: $1" | ||
mkdir -p $DIR && \ | ||
tar -xf "${1}" -C $DIR | ||
} | ||
|
||
if [ -d $DIR ]; then | ||
echo "$DIR exists!" | ||
exit | ||
fi | ||
|
||
ARCH="$(uname -m)" | ||
|
||
case $ARCH in | ||
aarch64) | ||
dl "dl/aarch64_mipsel-linux-uclibc.tar.xz" | ||
;; | ||
x86_64) | ||
dl "dl/mipsel-linux-uclibc.tar.xz" | ||
;; | ||
*) | ||
echo "Unknown ARCH: $ARCH" | ||
exit 1 | ||
esac |