forked from MatrixPilot/MatrixPilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all.sh
executable file
·154 lines (142 loc) · 4.22 KB
/
build-all.sh
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/bash
command_failed=false
git config --get remote.origin.url && git symbolic-ref --short HEAD
mkdir -p _build
cd _build
mkdir -p XPlane; cd XPlane
if ! make -j 8 -f ../../makefile TARGET_NAME=XPlane DEVICE=HIL
then
command_failed=true
fi
cd ..
mkdir -p MatrixPilot; cd MatrixPilot
mkdir -p SIL_MAVLINK; cd SIL_MAVLINK
if ! make -j 8 -f ../../../makefile TARGET_NAME=MPSIM DEVICE=SIL CONFIG=Cessna DEFS=CONSOLE_UART=0
then
command_failed=true
fi
cd ..; mkdir -p SIL_UDB_EXTRA; cd SIL_UDB_EXTRA
if ! make -j 8 -f ../../../makefile TARGET_NAME=MPSIM DEVICE=SIL CONFIG=Cessna DEFS='CONSOLE_UART=0 SERIAL_OUTPUT_FORMAT=SERIAL_UDB_EXTRA'
then
command_failed=true
fi
cd ..; mkdir -p SIL_NONE; cd SIL_NONE
if ! make -j 8 -f ../../../makefile TARGET_NAME=MPSIM DEVICE=SIL CONFIG=Cessna DEFS='CONSOLE_UART=0 SERIAL_OUTPUT_FORMAT=SERIAL_NONE'
then
command_failed=true
fi
cd ..; mkdir -p SIL_LOGO; cd SIL_LOGO
if ! make -j 8 -f ../../../makefile TARGET_NAME=MPSIM DEVICE=SIL CONFIG=EasyStar DEFS='CONSOLE_UART=0 SERIAL_OUTPUT_FORMAT=SERIAL_UDB_EXTRA'
then
command_failed=true
fi
cd ..; mkdir -p AUAV3; cd AUAV3
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB5 CONFIG=Cessna
then
command_failed=true
fi
cd ..; mkdir -p Grobularis; cd Grobularis
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB5 CONFIG=Grobularis
then
command_failed=true
fi
cd ..; mkdir -p E_Glider; cd E_Glider
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=AUAV3 CONFIG=E_Glider
then
command_failed=true
fi
cd ..; mkdir -p UDB5; cd UDB5
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB5 DEFS='USE_OSD=OSD_REMZIBI HILSIM=1'
then
command_failed=true
fi
cd ..; mkdir -p UDB5_UDB_EXTRA; cd UDB5_UDB_EXTRA
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB5 DEFS='SERIAL_OUTPUT_FORMAT=SERIAL_UDB_EXTRA MAG_YAW_DRIFT=1 HMC5883L MAG_FORWARDS USE_BAROMETER_ALTITUDE=1'
then
command_failed=true
fi
cd ..; mkdir -p UDB5_LOGO; cd UDB5_LOGO
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB5 DEFS='FLIGHT_PLAN_TYPE=FP_LOGO NORADIO=1 USE_CAMERA_STABILIZATION=1'
then
command_failed=true
fi
cd ..; mkdir -p UDB4; cd UDB4
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB4 DEFS='USE_OSD=OSD_MINIM AIRFRAME_TYPE=AIRFRAME_GLIDER GAINS_VARIABLE=1 ALTITUDE_GAINS_VARIABLE=1'
then
command_failed=true
fi
cd ..; mkdir -p UDB4_NV; cd UDB4_NV
if ! make -j 8 -f ../../../makefile TARGET_NAME=MatrixPilot DEVICE=UDB4 DEFS='USE_NV_MEMORY=1 USE_I2C1_DRIVER=1 SERIAL_OUTPUT_FORMAT=SERIAL_MAVLINK'
then
command_failed=true
fi
cd ../..
mkdir -p RollPitchYaw; cd RollPitchYaw
mkdir -p AUAV3; cd AUAV3
if ! make -j 8 -f ../../../makefile TARGET_NAME=RollPitchYaw DEVICE=AUAV3
then
command_failed=true
fi
cd ..; mkdir -p UDB5; cd UDB5
if ! make -j 8 -f ../../../makefile TARGET_NAME=RollPitchYaw DEVICE=UDB5
then
command_failed=true
fi
cd ..; mkdir -p UDB4; cd UDB4
if ! make -j 8 -f ../../../makefile TARGET_NAME=RollPitchYaw DEVICE=UDB4
then
command_failed=true
fi
cd ../..
mkdir -p LedTest; cd LedTest
mkdir -p AUAV3; cd AUAV3
if ! make -j 8 -f ../../../makefile TARGET_NAME=LedTest DEVICE=AUAV3
then
command_failed=true
fi
cd ..; mkdir -p UDB5; cd UDB5
if ! make -j 8 -f ../../../makefile TARGET_NAME=LedTest DEVICE=UDB5
then
command_failed=true
fi
cd ..; mkdir -p UDB4; cd UDB4
if ! make -j 8 -f ../../../makefile TARGET_NAME=LedTest DEVICE=UDB4
then
command_failed=true
fi
cd ../..
mkdir -p FlashOSD; cd FlashOSD
mkdir -p AUAV3; cd AUAV3
if ! make -j 8 -f ../../../makefile TARGET_NAME=FlashOSD DEVICE=AUAV3
then
command_failed=true
fi
cd ..; mkdir -p UDB5; cd UDB5
if ! make -j 8 -f ../../../makefile TARGET_NAME=FlashOSD DEVICE=UDB5
then
command_failed=true
fi
cd ..; mkdir -p UDB4; cd UDB4
if ! make -j 8 -f ../../../makefile TARGET_NAME=FlashOSD DEVICE=UDB4 DEFS=USE_OSD_SPI=1
then
command_failed=true
fi
cd ../..
cd ..
echo
echo "The following output files now exist:"
find _build | grep hex
find _build | grep "\.out"
find _build | grep xpl
find _build | grep px4
echo
echo "$0" complete.
echo
if [ $command_failed == "true" ]
then
echo "***** One of the make commands has failed *****"
exit 1
else
echo "All make commands have completed successfully."
exit 0
fi