Blame view

MAKEALL 15.7 KB
f2352877c   Peter Tyser   MAKEALL: Fix retu...
1
  #!/bin/bash
7ebf7443a   wdenk   Initial revision
2

0777eafb3   Wolfgang Denk   MAKEALL: allow ad...
3
4
5
6
7
8
9
10
11
12
13
  # Tool mainly for U-Boot Quality Assurance: build one or more board
  # configurations with minimal verbosity, showing only warnings and
  # errors.
  #
  # There are several ways to select which boards to build.
  #
  # Traditionally, architecture names (like "powerpc"), CPU family names
  # (like "mpc83xx") or board names can be specified on the command
  # line; without any arguments, MAKEALL defaults to building all Power
  # Architecture systems (i. e. same as for "MAKEALL powerpc").
  #
cd57b0bb8   Peter Tyser   MAKEALL: Do a san...
14
  # With the introduction of the board.cfg file, it has become possible
0777eafb3   Wolfgang Denk   MAKEALL: allow ad...
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
  # to provide additional selections.  We use standard command line
  # options for this:
  #
  # -a or --arch	:	Select architecture
  # -c or --cpu	:	Select CPU family
  # -s or --soc	:	Select SoC type
  # -v or --vendor:	Select board vendor
  #
  # Selections by these options are logically ANDed; if the same option
  # is used repeatedly, such selections are ORed.  So "-v FOO -v BAR"
  # will select all configurations where the vendor is either FOO or
  # BAR.  Any additional arguments specified on the command line are
  # always build additionally.
  #
  # Examples:
  #
  # - build all Power Architecture boards:
  #
  #	MAKEALL -a powerpc
  #   or
  #	MAKEALL --arch powerpc
  #   or
  #	MAKEALL powerpc
  #
  # - build all PowerPC boards manufactured by vendor "esd":
  #
  #	MAKEALL -a powerpc -v esd
  #
  # - build all PowerPC boards manufactured either by "keymile" or
  #   "siemens":
  #
  #	MAKEALL -a powerpc -v keymile -v siemens
  #
  # - build all Freescale boards with MPC83xx CPUs, plus all 4xx boards:
  #
  #	MAKEALL -c mpc83xx -v freescale 4xx
  #
  #########################################################################
  
  SHORT_OPTS="a:c:v:s:"
  LONG_OPTS="arch:,cpu:,vendor:,soc:"
  
  # Option processing based on util-linux-2.13/getopt-parse.bash
071bc9233   Wolfgang Denk   Coding Style cleanup
58
  # Note that we use `"$@"' to let each command-line parameter expand to a
0777eafb3   Wolfgang Denk   MAKEALL: allow ad...
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
  # separate word. The quotes around `$@' are essential!
  # We need TEMP as the `eval set --' would nuke the return value of
  # getopt.
  TEMP=`getopt -o ${SHORT_OPTS} --long ${LONG_OPTS} \
       -n 'MAKEALL' -- "$@"`
  
  if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
  
  # Note the quotes around `$TEMP': they are essential!
  eval set -- "$TEMP"
  
  SELECTED=''
  
  while true ; do
  	case "$1" in
  	-a|--arch)
  		# echo "Option ARCH: argument \`$2'"
  		if [ "$opt_a" ] ; then
  			opt_a="${opt_a%)} || \$2 == \"$2\")"
  		else
  			opt_a="(\$2 == \"$2\")"
  		fi
  		SELECTED='y'
  		shift 2 ;;
  	-c|--cpu)
  		# echo "Option CPU: argument \`$2'"
  		if [ "$opt_c" ] ; then
  			opt_c="${opt_c%)} || \$3 == \"$2\")"
  		else
  			opt_c="(\$3 == \"$2\")"
  		fi
  		SELECTED='y'
  		shift 2 ;;
  	-s|--soc)
  		# echo "Option SoC: argument \`$2'"
  		if [ "$opt_s" ] ; then
  			opt_s="${opt_s%)} || \$6 == \"$2\")"
  		else
  			opt_s="(\$6 == \"$2\")"
  		fi
  		SELECTED='y'
  		shift 2 ;;
  	-v|--vendor)
  		# echo "Option VENDOR: argument \`$2'"
  		if [ "$opt_v" ] ; then
  			opt_v="${opt_v%)} || \$5 == \"$2\")"
  		else
  			opt_v="(\$5 == \"$2\")"
  		fi
  		SELECTED='y'
  		shift 2 ;;
  	--)
  		shift ; break ;;
  	*)
  		echo "Internal error!" >&2 ; exit 1 ;;
  	esac
  done
  # echo "Remaining arguments:"
  # for arg do echo '--> '"\`$arg'" ; done
  
  FILTER="\$1 !~ /^#/"
  [ "$opt_a" ] && FILTER="${FILTER} && $opt_a"
  [ "$opt_c" ] && FILTER="${FILTER} && $opt_c"
  [ "$opt_s" ] && FILTER="${FILTER} && $opt_s"
  [ "$opt_v" ] && FILTER="${FILTER} && $opt_v"
  
  if [ "$SELECTED" ] ; then
  	SELECTED=$(awk '('"$FILTER"') { print $1 }' boards.cfg)
cd57b0bb8   Peter Tyser   MAKEALL: Do a san...
127
128
129
130
131
132
  
  	# Make sure some boards from boards.cfg are actually found
  	if [ -z "$SELECTED" ] ; then
  		echo "Error: No boards selected, invalid arguments"
  		exit 1
  	fi
0777eafb3   Wolfgang Denk   MAKEALL: allow ad...
133
134
135
  fi
  
  #########################################################################
40a28f088   Peter Tyser   MAKEALL: Add summ...
136
137
138
  # Print statistics when we exit
  trap exit 1 2 3 15
  trap print_stats 0
7fa6a2f3b   Wolfgang Denk   MAKEALL: Automati...
139
140
141
142
143
  # Determine number of CPU cores if no default was set
  : ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
  
  if [ "$BUILD_NCPUS" -gt 1 ]
  then
55f786d8b   Peter Tyser   MAKEALL: Use POSI...
144
  	JOBS="-j $((BUILD_NCPUS + 1))"
7fa6a2f3b   Wolfgang Denk   MAKEALL: Automati...
145
146
147
  else
  	JOBS=""
  fi
a8c7c708a   wdenk   * Patch by Gleb N...
148

7ebf7443a   wdenk   Initial revision
149
150
151
152
153
  if [ "${CROSS_COMPILE}" ] ; then
  	MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
  else
  	MAKE=make
  fi
f93286397   Marian Balakowicz   Add support for a...
154
155
156
157
158
  if [ "${MAKEALL_LOGDIR}" ] ; then
  	LOG_DIR=${MAKEALL_LOGDIR}
  else
  	LOG_DIR="LOG"
  fi
887e2ec9e   Stefan Roese   Add support for A...
159

f93286397   Marian Balakowicz   Add support for a...
160
161
162
  if [ ! "${BUILD_DIR}" ] ; then
  	BUILD_DIR="."
  fi
4f0645eb7   Marian Balakowicz   Fix LOG_DIR direc...
163
  [ -d ${LOG_DIR} ] || mkdir ${LOG_DIR} || exit 1
7ebf7443a   wdenk   Initial revision
164
165
  
  LIST=""
40a28f088   Peter Tyser   MAKEALL: Add summ...
166
167
168
169
  # Keep track of the number of builds and errors
  ERR_CNT=0
  ERR_LIST=""
  TOTAL_CNT=0
f2352877c   Peter Tyser   MAKEALL: Fix retu...
170
  RC=0
40a28f088   Peter Tyser   MAKEALL: Add summ...
171

9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
172
173
174
175
176
177
178
179
180
181
182
  # Helper funcs for parsing boards.cfg
  boards_by_field()
  {
  	awk \
  		-v field="$1" \
  		-v select="$2" \
  		'($1 !~ /^#/ && $field == select) { print $1 }' \
  		boards.cfg
  }
  boards_by_arch() { boards_by_field 2 "$@" ; }
  boards_by_cpu()  { boards_by_field 3 "$@" ; }
0a41edaab   Andreas Bießmann   MAKEALL: fix AT91
183
  boards_by_soc()  { boards_by_field 6 "$@" ; }
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
184

7ebf7443a   wdenk   Initial revision
185
  #########################################################################
0db5bca80   wdenk   * Patch by Martin...
186
187
  ## MPC5xx Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
188
  LIST_5xx="$(boards_by_cpu mpc5xx)"
0db5bca80   wdenk   * Patch by Martin...
189
190
  
  #########################################################################
945af8d72   wdenk   * Add support for...
191
192
  ## MPC5xxx Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
193
  LIST_5xxx="$(boards_by_cpu mpc5xxx)"
945af8d72   wdenk   * Add support for...
194
195
  
  #########################################################################
8993e54b6   Rafal Jaworowski   [ADS5121] Support...
196
197
  ## MPC512x Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
198
  LIST_512x="$(boards_by_cpu mpc512x)"
945af8d72   wdenk   * Add support for...
199
200
  
  #########################################################################
7ebf7443a   wdenk   Initial revision
201
202
  ## MPC8xx Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
203

2ae182419   Wolfgang Denk   Makefile: move al...
204
  LIST_8xx="$(boards_by_cpu mpc8xx)"
7ebf7443a   wdenk   Initial revision
205
206
207
208
  
  #########################################################################
  ## PPC4xx Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
209
  LIST_4xx="$(boards_by_cpu ppc4xx)"
7ebf7443a   wdenk   Initial revision
210
211
  
  #########################################################################
983fda839   wdenk   Patch by TsiChung...
212
213
  ## MPC8220 Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
214
  LIST_8220="$(boards_by_cpu mpc8220)"
983fda839   wdenk   Patch by TsiChung...
215
216
  
  #########################################################################
7ebf7443a   wdenk   Initial revision
217
218
  ## MPC824x Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
219
  LIST_824x="$(boards_by_cpu mpc824x)"
592c5cabe   wdenk   Patch by Murray J...
220

7ebf7443a   wdenk   Initial revision
221
  #########################################################################
7aa786147   wdenk   * Add support for...
222
  ## MPC8260 Systems (includes 8250, 8255 etc.)
7ebf7443a   wdenk   Initial revision
223
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
224
  LIST_8260="$(boards_by_cpu mpc8260)"
7ebf7443a   wdenk   Initial revision
225
226
  
  #########################################################################
f046ccd15   Eran Liberty   * Patch by Eran L...
227
228
  ## MPC83xx Systems (includes 8349, etc.)
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
229
  LIST_83xx="$(boards_by_cpu mpc83xx)"
f046ccd15   Eran Liberty   * Patch by Eran L...
230
231
  
  #########################################################################
42d1f0394   wdenk   * Patches by Xian...
232
233
  ## MPC85xx Systems (includes 8540, 8560 etc.)
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
234
  LIST_85xx="$(boards_by_cpu mpc85xx)"
42d1f0394   wdenk   * Patches by Xian...
235
236
  
  #########################################################################
822d55365   Jon Loeliger   Add LIST_86xx MAK...
237
238
  ## MPC86xx Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
239
  LIST_86xx="$(boards_by_cpu mpc86xx)"
822d55365   Jon Loeliger   Add LIST_86xx MAK...
240
241
  
  #########################################################################
7ebf7443a   wdenk   Initial revision
242
243
  ## 74xx/7xx Systems
  #########################################################################
2ae182419   Wolfgang Denk   Makefile: move al...
244
  LIST_74xx_7xx="$(boards_by_cpu 74xx_7xx)"
7ebf7443a   wdenk   Initial revision
245

d9a42c0ac   Wolfgang Denk   MAKEALL: sort ent...
246
247
248
249
250
251
252
253
254
  #########################################################################
  ## PowerPC groups
  #########################################################################
  
  LIST_TSEC="		\
  	${LIST_83xx}	\
  	${LIST_85xx}	\
  	${LIST_86xx}	\
  "
a47a12bec   Stefan Roese   Move arch/ppc to ...
255
  LIST_powerpc="		\
fb56579ff   Kim Phillips   make MAKEALL more...
256
  	${LIST_5xx}	\
3deca9d44   Jean-Christophe PLAGNIOL-VILLARD   MAKEALL: add miss...
257
  	${LIST_512x}	\
fb56579ff   Kim Phillips   make MAKEALL more...
258
259
260
261
262
263
264
265
266
  	${LIST_5xxx}	\
  	${LIST_8xx}	\
  	${LIST_8220}	\
  	${LIST_824x}	\
  	${LIST_8260}	\
  	${LIST_83xx}	\
  	${LIST_85xx}	\
  	${LIST_86xx}	\
  	${LIST_4xx}	\
2ae182419   Wolfgang Denk   Makefile: move al...
267
  	${LIST_74xx_7xx}\
fb56579ff   Kim Phillips   make MAKEALL more...
268
  "
7ebf7443a   wdenk   Initial revision
269

a47a12bec   Stefan Roese   Move arch/ppc to ...
270
271
272
273
274
  # Alias "ppc" -> "powerpc" to not break compatibility with older scripts
  # still using "ppc" instead of "powerpc"
  LIST_ppc="		\
  	${LIST_powerpc}	\
  "
7ebf7443a   wdenk   Initial revision
275
276
277
  #########################################################################
  ## StrongARM Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
278
  LIST_SA="$(boards_by_cpu sa1100)"
7ebf7443a   wdenk   Initial revision
279
280
281
282
  
  #########################################################################
  ## ARM7 Systems
  #########################################################################
fb56579ff   Kim Phillips   make MAKEALL more...
283
284
285
286
287
288
289
290
291
292
293
294
  LIST_ARM7="		\
  	ap7		\
  	ap720t		\
  	armadillo	\
  	B2		\
  	ep7312		\
  	evb4510		\
  	impa7		\
  	integratorap	\
  	lpc2292sodimm	\
  	modnet50	\
  	SMN42		\
74f4304ee   Wolfgang Denk   Add ARM946E cpu a...
295
  "
7ebf7443a   wdenk   Initial revision
296
297
298
299
  
  #########################################################################
  ## ARM9 Systems
  #########################################################################
fb56579ff   Kim Phillips   make MAKEALL more...
300
  LIST_ARM9="			\
43a5f0df2   Po-Yu Chuang   arm: A320: Add su...
301
  	a320evb			\
fb56579ff   Kim Phillips   make MAKEALL more...
302
303
304
305
306
  	ap920t			\
  	ap922_XA10		\
  	ap926ejs		\
  	ap946es			\
  	ap966			\
c291e2fc4   Prafulla Wadaskar   Armada100: Add Bo...
307
  	aspenite		\
fb56579ff   Kim Phillips   make MAKEALL more...
308
309
310
311
312
  	cp920t			\
  	cp922_XA10		\
  	cp926ejs		\
  	cp946es			\
  	cp966			\
2819e1365   Sekhar Nori   TI DA8xx: Integra...
313
  	da830evm		\
89b765c7f   Sudhakar Rajashekhara   TI: DaVinci: Add ...
314
  	da850evm		\
cf3c142ee   Matthias Kaehlcke   Add support for E...
315
316
317
318
319
320
321
322
  	edb9301			\
  	edb9302			\
  	edb9302a		\
  	edb9307			\
  	edb9307a		\
  	edb9312			\
  	edb9315			\
  	edb9315a		\
ce9c227cc   Albert Aribaud   Add support for t...
323
  	edminiv2		\
16b76705d   Siddarth Gore   Marvell GuruPlug ...
324
  	guruplug		\
10bc241df   Ilya Yanok   imx27lite: add su...
325
  	imx27lite		\
18a056a18   Matthias Weisser   ARM: Add support ...
326
  	jadecpu			\
fb56579ff   Kim Phillips   make MAKEALL more...
327
  	lpd7a400		\
bbe310922   Heiko Schocher   arm, i.mx27: add ...
328
  	magnesium		\
4abc5bffe   Prafulla Wadaskar   Marvell MV88F6281...
329
  	mv88f6281gtw_ge		\
fb56579ff   Kim Phillips   make MAKEALL more...
330
331
332
  	mx1ads			\
  	mx1fs2			\
  	netstar			\
ceb70b466   Jean-Christophe PLAGNIOL-VILLARD   nhk8815: fix MAKEALL
333
334
  	nhk8815			\
  	nhk8815_onenand		\
fb56579ff   Kim Phillips   make MAKEALL more...
335
336
337
  	omap1510inn		\
  	omap1610h2		\
  	omap1610inn		\
a3543d6dc   David Brownell   add missing ARM b...
338
  	omap5912osk		\
fb56579ff   Kim Phillips   make MAKEALL more...
339
  	omap730p2		\
e92daeb5c   Simon Kagstrom   Support for the O...
340
  	openrd_base		\
fbc8365ad   Prafulla Wadaskar   Marvell RD6281A B...
341
  	rd6281a			\
fb56579ff   Kim Phillips   make MAKEALL more...
342
343
  	sbc2410x		\
  	scb9328			\
55dd4ba54   Prafulla Wadaskar   Marvell Sheevaplu...
344
  	sheevaplug		\
fb56579ff   Kim Phillips   make MAKEALL more...
345
346
  	smdk2400		\
  	smdk2410		\
7e074158c   Vipin KUMAR   SPEAr : Support a...
347
  	spear300		\
080cfee71   Vipin KUMAR   SPEAr : Support a...
348
  	spear310		\
7da692360   Vipin KUMAR   SPEAr : Support a...
349
  	spear320		\
566c9c16f   Vipin KUMAR   SPEAr : Support a...
350
  	spear600		\
67fa8c25f   Heiko Schocher   arm: add support ...
351
  	suen3			\
fb56579ff   Kim Phillips   make MAKEALL more...
352
353
354
355
356
357
358
359
  	trab			\
  	VCMA9			\
  	versatile		\
  	versatileab		\
  	versatilepb		\
  	voiceblue		\
  	davinci_dvevm		\
  	davinci_schmoogie	\
c7f879ec2   Hugo Villeneuve   ARM: Add support ...
360
  	davinci_sffsdr		\
fb56579ff   Kim Phillips   make MAKEALL more...
361
  	davinci_sonata		\
28b00324b   David Brownell   dm355 evm support
362
  	davinci_dm355evm	\
5df65cf56   Sandeep Paulraj   TI: DaVinci: DM35...
363
  	davinci_dm355leopard	\
3fca29294   Sandeep Paulraj   DaVinci: Adding e...
364
  	davinci_dm365evm	\
6ab176d70   Sandeep Paulraj   TI DaVinci DM646x...
365
  	davinci_dm6467evm	\
6f21347d4   wdenk   * Patch by George...
366
  "
7ebf7443a   wdenk   Initial revision
367
368
  
  #########################################################################
74f4304ee   Wolfgang Denk   Add ARM946E cpu a...
369
370
  ## ARM10 Systems
  #########################################################################
fb56579ff   Kim Phillips   make MAKEALL more...
371
372
373
  LIST_ARM10="		\
  	integratorcp	\
  	cp1026		\
74f4304ee   Wolfgang Denk   Add ARM946E cpu a...
374
375
376
  "
  
  #########################################################################
8ed960461   wdenk   * Patches by Rich...
377
378
  ## ARM11 Systems
  #########################################################################
0c6926736   Guennadi Liakhovetski   ARM: Add the imx3...
379
380
381
382
383
384
385
386
  LIST_ARM11="			\
  	cp1136			\
  	omap2420h4		\
  	apollon			\
  	imx31_litekit		\
  	imx31_phycore		\
  	imx31_phycore_eet	\
  	mx31ads			\
8449f287f   Magnus Lilja   MX31: Add basic s...
387
  	mx31pdk			\
d08e5ca30   Magnus Lilja   MX31: Add NAND SP...
388
  	mx31pdk_nand		\
0c6926736   Guennadi Liakhovetski   ARM: Add the imx3...
389
390
  	qong			\
  	smdk6400		\
5cc48f7e5   Cyril Chemparathy   TI: TNETV107X EVM...
391
  	tnetv107x_evm		\
74f4304ee   Wolfgang Denk   Add ARM946E cpu a...
392
  "
8ed960461   wdenk   * Patches by Rich...
393
394
  
  #########################################################################
f56348af5   Steve Sakoman   ARM: Rename arch/...
395
  ## ARMV7 Systems
f904cdbb6   Dirk Behme   OMAP3: Add common...
396
  #########################################################################
f56348af5   Steve Sakoman   ARM: Rename arch/...
397
  LIST_ARMV7="		\
ed01e45cf   Vaibhav Hiremath   AM35x: Add suppor...
398
  	am3517_evm		\
b80e41ac5   Matt Waddel   ARMV7: Versatile ...
399
  	ca9x4_ct_vxp		\
c35d7cf07   Frederik Kriewitz   Add support for t...
400
  	devkit8000		\
8a3f6bb6f   Enric Balletbo i Serra   OMAP3: Add suppor...
401
  	igep0020		\
1a832dc4f   Enric Balletbo i Serra   OMAP3: Add suppor...
402
  	igep0030		\
c5fb70c91   Stefano Babic   Add initial suppo...
403
  	mx51evk			\
f904cdbb6   Dirk Behme   OMAP3: Add common...
404
  	omap3_beagle		\
9d0fc8110   Dirk Behme   OMAP3: Add Overo ...
405
  	omap3_overo		\
ad9bc8e52   Dirk Behme   OMAP3: Add EVM board
406
  	omap3_evm		\
2be2c6cc6   Dirk Behme   OMAP3: Add Pandor...
407
  	omap3_pandora		\
e63e5904b   Tom Rix   TI OMAP3 SDP3430:...
408
  	omap3_sdp3430		\
7379f45a7   Dirk Behme   OMAP3: Add Zoom1 ...
409
  	omap3_zoom1		\
376aee78d   Tom Rix   ZOOM2 Add initial...
410
  	omap3_zoom2		\
c57cca255   Steve Sakoman   ARMV7: Add suppor...
411
  	omap4_panda		\
3e76d62a6   Steve Sakoman   ARMV7: Add suppor...
412
  	omap4_sdp4430		\
c474a8ebb   Minkyu Kang   s5pc1xx: Add supp...
413
  	s5p_goni		\
8bc4ee9e8   Minkyu Kang   s5pc1xx: add supp...
414
  	smdkc100		\
f904cdbb6   Dirk Behme   OMAP3: Add common...
415
416
417
  "
  
  #########################################################################
602cac138   Jean-Christophe PLAGNIOL-VILLARD   MAKEALL: add at91...
418
419
  ## AT91 Systems
  #########################################################################
0a41edaab   Andreas Bießmann   MAKEALL: fix AT91
420
421
  LIST_at91="$(boards_by_soc at91)\
  	$(boards_by_soc at91rm9200)\
22ee64738   Sedji Gaouaou   at91: Introductio...
422
423
424
  	at91sam9260ek		\
  	at91sam9261ek		\
  	at91sam9263ek		\
d8380c9d3   Tom Rix   Add support for E...
425
  	at91sam9g10ek		\
22ee64738   Sedji Gaouaou   at91: Introductio...
426
  	at91sam9g20ek		\
5ccc2d99d   Sedji Gaouaou   at91: Introductio...
427
  	at91sam9m10g45ek	\
22ee64738   Sedji Gaouaou   at91: Introductio...
428
  	at91sam9rlek		\
d8380c9d3   Tom Rix   Add support for E...
429
  	CPUAT91			\
23b80982a   Tom Rix   Add support for E...
430
431
  	CPU9260			\
  	CPU9G20			\
b5d289fc2   Asen Dimov   add new board pm9g45
432
  	pm9g45			\
2dc851e3b   Albin Tonnerre   Support for the C...
433
434
435
  	SBC35_A9G20		\
  	TNY_A9260		\
  	TNY_A9G20		\
602cac138   Jean-Christophe PLAGNIOL-VILLARD   MAKEALL: add at91...
436
437
438
  "
  
  #########################################################################
7ebf7443a   wdenk   Initial revision
439
440
  ## Xscale Systems
  #########################################################################
7c957c0e7   Marek Vasut   Build: PXA: Fix T...
441
  LIST_pxa="$(boards_by_cpu pxa)"
7ebf7443a   wdenk   Initial revision
442

9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
443
  LIST_ixp="$(boards_by_cpu ixp)
fb56579ff   Kim Phillips   make MAKEALL more...
444
445
446
  	pdnb3		\
  	scpu		\
  "
7ebf7443a   wdenk   Initial revision
447

d9a42c0ac   Wolfgang Denk   MAKEALL: sort ent...
448
449
450
  #########################################################################
  ## ARM groups
  #########################################################################
2d5b561e2   wdenk   * Make sure HUSH ...
451

f904cdbb6   Dirk Behme   OMAP3: Add common...
452
453
454
455
456
457
  LIST_arm="			\
  	${LIST_SA}		\
  	${LIST_ARM7}		\
  	${LIST_ARM9}		\
  	${LIST_ARM10}		\
  	${LIST_ARM11}		\
f56348af5   Steve Sakoman   ARM: Rename arch/...
458
  	${LIST_ARMV7}	\
f904cdbb6   Dirk Behme   OMAP3: Add common...
459
460
461
  	${LIST_at91}		\
  	${LIST_pxa}		\
  	${LIST_ixp}		\
8ed960461   wdenk   * Patches by Rich...
462
  "
7ebf7443a   wdenk   Initial revision
463

c021880ac   wdenk   * Add support for...
464
  #########################################################################
b62bdffb7   Wolfgang Denk   Adjust MAKEALL sc...
465
  ## MIPS Systems		(default = big endian)
c021880ac   wdenk   * Add support for...
466
  #########################################################################
fb56579ff   Kim Phillips   make MAKEALL more...
467
468
  LIST_mips4kc="		\
  	incaip		\
0764c164f   Vlad Lungu   MIPS:Target suppo...
469
  	qemu_mips	\
2a61eff6a   Stefan Roese   MIPS: Add VCT boa...
470
471
472
473
474
475
476
477
478
479
480
481
  	vct_platinum	\
  	vct_platinum_small	\
  	vct_platinum_onenand	\
  	vct_platinum_onenand_small	\
  	vct_platinumavc	\
  	vct_platinumavc_small	\
  	vct_platinumavc_onenand	\
  	vct_platinumavc_onenand_small	\
  	vct_premium	\
  	vct_premium_small	\
  	vct_premium_onenand	\
  	vct_premium_onenand_small	\
fb56579ff   Kim Phillips   make MAKEALL more...
482
  "
c021880ac   wdenk   * Add support for...
483

fb56579ff   Kim Phillips   make MAKEALL more...
484
485
486
  LIST_mips5kc="		\
  	purple		\
  "
3e38691e8   wdenk   * Patch by Arun D...
487

fb56579ff   Kim Phillips   make MAKEALL more...
488
489
490
491
492
493
494
495
  LIST_au1xx0="		\
  	dbau1000	\
  	dbau1100	\
  	dbau1500	\
  	dbau1550	\
  	dbau1550_el	\
  	gth2		\
  "
5da627a42   wdenk   * Patch by Steven...
496

fb56579ff   Kim Phillips   make MAKEALL more...
497
498
499
500
501
  LIST_mips="		\
  	${LIST_mips4kc}	\
  	${LIST_mips5kc}	\
  	${LIST_au1xx0}	\
  "
c021880ac   wdenk   * Add support for...
502

7a8e9bed1   wdenk   * Patch by Marc S...
503
  #########################################################################
b62bdffb7   Wolfgang Denk   Adjust MAKEALL sc...
504
505
506
507
508
509
  ## MIPS Systems		(little endian)
  #########################################################################
  
  LIST_mips4kc_el=""
  
  LIST_mips5kc_el=""
fb56579ff   Kim Phillips   make MAKEALL more...
510
511
  LIST_au1xx0_el="	\
  	dbau1550_el	\
b09258c53   Shinya Kuribayashi   MAKEALL: Added mi...
512
  	pb1000		\
fb56579ff   Kim Phillips   make MAKEALL more...
513
  "
b62bdffb7   Wolfgang Denk   Adjust MAKEALL sc...
514

fb56579ff   Kim Phillips   make MAKEALL more...
515
516
517
518
519
  LIST_mips_el="			\
  	${LIST_mips4kc_el}	\
  	${LIST_mips5kc_el}	\
  	${LIST_au1xx0_el}	\
  "
b62bdffb7   Wolfgang Denk   Adjust MAKEALL sc...
520
521
  
  #########################################################################
7a8e9bed1   wdenk   * Patch by Marc S...
522
523
  ## i386 Systems
  #########################################################################
6d79c3995   Mike Frysinger   MAKEALL: drop non...
524
  LIST_x86="$(boards_by_arch i386)"
7a8e9bed1   wdenk   * Patch by Marc S...
525

c935d3bd8   wdenk   Patches by Stepha...
526
  #########################################################################
5c952cf02   wdenk   Patches by Scott ...
527
528
  ## Nios-II Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
529
  LIST_nios2="$(boards_by_arch nios2)
8cbb0ddd7   Thomas Chou   nios2: add nios2-...
530
  	nios2-generic	\
4176c7996   Wolfgang Denk   Merge with /home/...
531
  "
5c952cf02   wdenk   Patches by Scott ...
532
533
  
  #########################################################################
857cad37a   wdenk   Patches by Yasush...
534
535
  ## MicroBlaze Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
536
  LIST_microblaze="$(boards_by_arch microblaze)"
857cad37a   wdenk   Patches by Yasush...
537

f8c3b4f31   Zachary P. Landau   Add ColdFire targ...
538
539
540
  #########################################################################
  ## ColdFire Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
541
  LIST_coldfire="$(boards_by_arch m68k)
9d79e5758   Wolfgang Wegner   add ASTRO MCF5373...
542
  	astro_mcf5373l		\
fb56579ff   Kim Phillips   make MAKEALL more...
543
544
545
  	cobra5272		\
  	EB+MCF-EV123		\
  	EB+MCF-EV123_internal	\
1552af70e   TsiChungLiew   ColdFire: Add MCF...
546
  	M52277EVB		\
4a442d318   TsiChungLiew   ColdFire: Add M52...
547
  	M5235EVB		\
aa5f1f9dc   TsiChungLiew   ColdFire: Add M53...
548
549
  	M5329AFEE		\
  	M5373EVB		\
05316f8ec   TsiChung Liew   ColdFire: Add M54...
550
  	M54451EVB		\
8ae158cd8   TsiChungLiew   ColdFire: Add M54...
551
  	M54455EVB		\
57a127201   TsiChungLiew   ColdFire: MCF547x...
552
553
  	M5475AFE		\
  	M5485AFE		\
9acb626fc   Heiko Schocher   Add MCF5282 suppo...
554
  "
f8c3b4f31   Zachary P. Landau   Add ColdFire targ...
555

6ccec4492   Wolfgang Denk   Add ATSTK1000 and...
556
557
558
  #########################################################################
  ## AVR32 Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
559
  LIST_avr32="$(boards_by_arch avr32)"
6ccec4492   Wolfgang Denk   Add ATSTK1000 and...
560

ef26a08fe   Aubrey.Li   [Blackfin][PATCH-...
561
562
563
  #########################################################################
  ## Blackfin Systems
  #########################################################################
36cf8cb45   Mike Frysinger   Blackfin: bf527-e...
564
  LIST_blackfin="$(boards_by_arch blackfin)"
ef26a08fe   Aubrey.Li   [Blackfin][PATCH-...
565

c71443734   Jean-Christophe PLAGNIOL-VILLARD   sh: Add sh3 and s...
566
567
568
  #########################################################################
  ## SH Systems
  #########################################################################
e0f0e527f   Nobuhiro Iwamatsu   sh: rsk7203: Move...
569
  LIST_sh2="$(boards_by_cpu sh2)"
3771c69d7   Nobuhiro Iwamatsu   sh: sh3: Move to ...
570
  LIST_sh3="$(boards_by_cpu sh3)"
03626be3f   Nobuhiro Iwamatsu   sh: sh4: Move to ...
571
  LIST_sh4="$(boards_by_cpu sh4)"
d9a42c0ac   Wolfgang Denk   MAKEALL: sort ent...
572

03626be3f   Nobuhiro Iwamatsu   sh: sh4: Move to ...
573
  LIST_sh="$(boards_by_arch sh)"
c71443734   Jean-Christophe PLAGNIOL-VILLARD   sh: Add sh3 and s...
574

c2f02da21   Daniel Hellstrom   SPARC: Added gene...
575
576
577
  #########################################################################
  ## SPARC Systems
  #########################################################################
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
578
  LIST_sparc="$(boards_by_arch sparc)"
7ebf7443a   wdenk   Initial revision
579
580
581
582
583
584
585
  
  #-----------------------------------------------------------------------
  
  build_target() {
  	target=$1
  
  	${MAKE} distclean >/dev/null
d70d8ccc2   Kim Phillips   silence config st...
586
  	${MAKE} -s ${target}_config
f93286397   Marian Balakowicz   Add support for a...
587
588
589
  
  	${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
  				| tee ${LOG_DIR}/$target.ERR
f2352877c   Peter Tyser   MAKEALL: Fix retu...
590
591
592
593
594
  
  	# Check for 'make' errors
  	if [ ${PIPESTATUS[0]} -ne 0 ] ; then
  		RC=1
  	fi
40a28f088   Peter Tyser   MAKEALL: Add summ...
595
596
597
598
599
600
601
602
  	if [ -s ${LOG_DIR}/$target.ERR ] ; then
  		ERR_CNT=$((ERR_CNT + 1))
  		ERR_LIST="${ERR_LIST} $target"
  	else
  		rm ${LOG_DIR}/$target.ERR
  	fi
  
  	TOTAL_CNT=$((TOTAL_CNT + 1))
f93286397   Marian Balakowicz   Add support for a...
603

208447f8e   Mike Frysinger   Do not specify a ...
604
  	${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
f93286397   Marian Balakowicz   Add support for a...
605
  				| tee -a ${LOG_DIR}/$target.MAKELOG
7ebf7443a   wdenk   Initial revision
606
  }
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
  build_targets() {
  	for t in "$@" ; do
  		# If a LIST_xxx var exists, use it.  But avoid variable
  		# expansion in the eval when a board name contains certain
  		# characters that the shell interprets.
  		case ${t} in
  			*[-+=]*) list= ;;
  			*)       list=$(eval echo '${LIST_'$t'}') ;;
  		esac
  		if [ -n "${list}" ] ; then
  			build_targets ${list}
  		else
  			build_target ${t}
  		fi
  	done
  }
7ebf7443a   wdenk   Initial revision
623
624
  
  #-----------------------------------------------------------------------
40a28f088   Peter Tyser   MAKEALL: Add summ...
625
626
627
628
629
630
631
632
  print_stats() {
  	echo ""
  	echo "--------------------- SUMMARY ----------------------------"
  	echo "Boards compiled: ${TOTAL_CNT}"
  	if [ ${ERR_CNT} -gt 0 ] ; then
  		echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
  	fi
  	echo "----------------------------------------------------------"
f2352877c   Peter Tyser   MAKEALL: Fix retu...
633
634
  
  	exit $RC
40a28f088   Peter Tyser   MAKEALL: Add summ...
635
  }
7ebf7443a   wdenk   Initial revision
636

40a28f088   Peter Tyser   MAKEALL: Add summ...
637
  #-----------------------------------------------------------------------
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
638

0777eafb3   Wolfgang Denk   MAKEALL: allow ad...
639
640
641
  # Build target groups selected by options, plus any command line args
  set -- ${SELECTED} "$@"
  # run PowerPC by default
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
642
  [ $# = 0 ] && set -- powerpc
9ec49f8f8   Mike Frysinger   MAKEALL: cut down...
643
  build_targets "$@"