Skip to content

Commit 56d63fd

Browse files
committed
Add code to install cross-compile utilities.
1 parent 4b1eb6f commit 56d63fd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ CheckPrerequisites() {
5252
if [ $? -ne 0 ]; then
5353
echo -e "\033[1;31mERROR! wget missing\033[m"
5454
read -p "Do you want to install wget (root password is needed) " -n 1 -r
55+
echo
5556
if [[ $REPLY =~ ^[Yy]$ ]]; then sudo apt-get install wget; fi
5657
fi
5758

5859
which tar > /dev/null
5960
if [ $? -ne 0 ]; then
6061
echo -e "\033[1;31mERROR! tar missing\033[m"
6162
read -p "Do you want to install tar (root password is needed) " -n 1 -r
63+
echo
6264
if [[ $REPLY =~ ^[Yy]$ ]]; then sudo apt-get install tar; fi
6365
fi
6466

@@ -67,6 +69,7 @@ CheckPrerequisites() {
6769
if [ $? -ne 0 ]; then
6870
echo -e "\033[1;31mERROR! cmake missing\033[m"
6971
read -p "Do you want to install cmake (root password is needed)? " -n 1 -r
72+
echo
7073
if [[ $REPLY =~ ^[Yy]$ ]]; then
7174
cd /usr/src
7275
sudo wget https://cmake.org/files/v3.9/cmake-3.9.5.tar.gz
@@ -78,6 +81,19 @@ CheckPrerequisites() {
7881
cd $HOME
7982
fi
8083
fi
84+
85+
# check if cross-compiler utilities are installed
86+
which arm-linux-gnueabi-g++ > /dev/null
87+
if [ $? -ne 0 ]; then
88+
echo -e "\033[1;31mERROR! cross-compiler utilities missing\033[m"
89+
read -p "Do you want to install them (root password is needed)? " -n 1 -r
90+
echo
91+
if [[ $REPLY =~ ^[Yy]$ ]]; then
92+
sudo apt-get install -y gcc-multilib g++-multilib
93+
sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi
94+
sudo apt-get install -y libncurses5-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
95+
fi
96+
fi
8197
}
8298

8399
# Check command arguments

0 commit comments

Comments
 (0)