-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall_toolchain.sh
More file actions
executable file
·46 lines (35 loc) · 1.22 KB
/
install_toolchain.sh
File metadata and controls
executable file
·46 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -e
#####################################
##
## Install cross toolchain
#####################################
if [ -z $TOOT ]; then
ROOT=`cd .. && pwd`
fi
TOOLS="$ROOT/toolchain"
TOOLTARXZ="$ROOT/toolchain/toolchain_tar/toolchain"
TOOLTAR="$ROOT/toolchain/toolchain.tar.gz"
UBOOTTAR="$ROOT/toolchain/uboot-tools.tar.gz"
UBOOTTARXZ="$ROOT/toolchain/toolchain_tar/u-boot-compile-tools"
UBOOTS="$TOOLS/gcc-linaro-aarch"
whiptail --title "OrangePi Build System" --msgbox "Installing Cross-Tools. Pls wait a mount." --ok-button Continue 10 40 0
clear
if [ ! -d $TOOLS/gcc-linaro-aarch ]; then
echo -e "\e[1;31m Uncompress toolchain.. \e[0m"
cat ${TOOLTARXZ}* > ${TOOLTAR}
tar xzvf $TOOLTAR -C $TOOLS
rm -rf $TOOLTAR
mv $TOOLS/toolchain/gcc-linaro-aarch $TOOLS
rm -rf $TOOLS/toolchain
# rm -rf $TOOLS/gcc-linaro-aarch/gcc-linaro
fi
if [ -d $ROOT/toolchain/gcc-linaro-aarch/gcc-linaro/arm-linux-gnueabihf ]; then
rm -rf $ROOT/toolchain/gcc-linaro-aarch/gcc-linaro
fi
if [ ! -d $TOOLS/gcc-linaro-aarch/gcc-linaro/arm-linux-gnueabi ]; then
cat ${UBOOTTARXZ}* > ${UBOOTTAR}
tar xzvf $UBOOTTAR -C $UBOOTS
rm -rf $UBOOTTAR
fi
whiptail --title "OrangePi Build System" --msgbox "Cross-Tools has installed." 10 40 0