-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-mix6000-linux
executable file
·82 lines (55 loc) · 1.65 KB
/
setup-mix6000-linux
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
NOT_SOURCED=0
test "X$(basename -- "$0")" = "Xsetup-mix6000-linux" && NOT_SOURCED=1
if [ $NOT_SOURCED = 1 ]; then
echo
echo "$(tput setaf 2)""Please source the script: source install-mix6000-linux""$(tput sgr 0)"
echo
exit 1
fi
CPWD=`pwd`
echo
echo "$(tput setaf 2)""$(tput bold)""MIX6000 Setup:" "$(tput sgr 0)"
echo
echo "$(tput setaf 2)""Please enter your sudo password:""$(tput sgr 0)"
sudo -p "" -v
# Open Embedded want bash (not dash)
sudo chsh -s /bin/bash `whoami`
# Enable caching of username and password
git config --global credential.helper cache
cd ${CPWD}/oe
ENVIR=`ls | grep environment`
source ${ENVIR}
echo
echo "$(tput setaf 2)""OpenEmbedded environment setup.""$(tput sgr 0)"
echo
cd ${CPWD}/sdk/sysroots
cd $(ls | grep arm)
OE_SYSROOT=`pwd`
cd ${CPWD}/sdk/sysroots
cd $(ls | grep x86)
export OE_PP=$(find `pwd` -name "*\-g++")
export OE_CC=$(find `pwd` -name "*\-gcc")
export OE_LD=$(find `pwd` -name "*\-ld")
export CC="$OE_CC --sysroot=$OE_SYSROOT"
export CXX="$OE_PP --sysroot=$OE_SYSROOT"
export LD="$OE_LD --sysroot=$OE_SYSROOT"
export ECLIPSE_SYS=$OE_SYSROOT
export CCLINT=$OE_CC
export CCPLUSLINT=$OE_PP
echo
echo "$(tput setaf 2)""GCC/SDK paths setup""$(tput sgr 0)"
echo
export PCLINT_PATH=${CPWD}/tools/lint
export PATH=$PATH:$PCLINT_PATH
echo
echo "$(tput setaf 2)""PCLint setup""$(tput sgr 0)"
echo
cd ${CPWD}
echo
echo "$(tput setaf 2)""$(tput bold)""Build: source start-build""$(tput sgr 0)"
echo "$(tput setaf 2)""$(tput bold)""(Set Build Configuration to 'linux_oe_debug' first)""$(tput sgr 0)"
echo
echo
echo "$(tput setaf 2)""$(tput bold)""Debug: source start-eclipse""$(tput sgr 0)"
echo