forked from laswick/arm-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_toolchain
executable file
·44 lines (38 loc) · 1.06 KB
/
build_toolchain
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
#
# build_toolchain
#
# Rob Laswick
# May 2 2013
#
# Top level "master" build script to build and install a gcc toolchain.
WORKING_DIR=/home/rlaswick/engineering/arm-toolchain-build
PREFIX=/home/rlaswick/opt/arm-toolchain
BINUTILS_VER=2.23.2
GCC_VER=4.8.0
NEWLIB_VER=2.0.0
GDB_VER=7.6
which nproc &> /dev/null
STATUS=$?
if [ ${STATUS} = 0 ]; then
NUM_CORES=`nproc --all`
else
NUM_CORES=1
fi
./00_download ${WORKING_DIR} ${BINUTILS_VER} ${GCC_VER} ${NEWLIB_VER} \
${GDB_VER} || exit 1
./01_setup ${WORKING_DIR} ${BINUTILS_VER} ${GCC_VER} ${NEWLIB_VER} \
${GDB_VER} || exit 1
./02_binutils ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
./03_gcc_pre ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
./04_newlib ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
./05_gcc_post ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
./06_gdb ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
./07_openocd ${WORKING_DIR} ${PREFIX} ${NUM_CORES} || exit 1
echo
echo
echo
echo Toolchain built and installed successfully!
echo `date`
echo
echo