abuild:
[coreboot.git] / util / abuild / abuild
1 #!/bin/bash
2 #
3 #  coreboot autobuild
4 #
5 #  This script builds coreboot images for all available targets.
6 #
7 #  (C) 2004 by Stefan Reinauer <stepan@openbios.org>
8 #  (C) 2006-2010 by coresystems GmbH <info@coresystems.de>
9 #
10 #  This file is subject to the terms and conditions of the GNU General
11 #  Public License. See the file COPYING in the main directory of this
12 #  archive for more details.
13 #     
14
15 #set -x # Turn echo on....
16
17 ABUILD_DATE="January 29th, 2010"
18 ABUILD_VERSION="0.9"
19
20 # Where shall we place all the build trees?
21 TARGET=coreboot-builds
22 XMLFILE=$( pwd )/abuild.xml
23
24 # path to payload. Should be more generic
25 PAYLOAD=/dev/null
26
27 # Lines of error context to be printed in FAILURE case
28 CONTEXT=6
29
30 TESTSUBMISSION="http://qa.coreboot.org/deployment/send.php"
31
32 # Number of CPUs to compile on per default
33 cpus=1
34
35 # Configure-only mode
36 configureonly=0
37
38 # One might want to adjust these in case of cross compiling
39 for i in make gmake gnumake nonexistant_make; do
40         $i --version 2>/dev/null |grep "GNU Make" >/dev/null && break
41 done
42 if [ "$i" = "nonexistant_make" ]; then
43         echo No GNU Make found.
44         exit 1
45 fi
46 MAKE=$i
47
48 # this can be changed to xml by -x
49 mode=text
50
51 # silent mode.. no compiler calls, only warnings in the log files.
52 # this is disabled per default but can be enabled with -s
53 silent=
54
55 # clang mode enabled by -sb option.
56 scanbuild=false
57
58 # use ccache
59 ccache=false
60
61 # stackprotect mode enabled by -ns option.
62 stackprotect=false
63
64 # loglevel changed with -l / --loglevel option
65 loglevel=default
66
67 # update existing image
68 update=false
69
70 # CBFS prefix
71 cbfs_prefix=fallback
72
73 ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
74         -e s/i86pc/i386/ \
75         -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
76         -e "s/Power Macintosh/ppc/"`
77
78 trap interrupt INT
79
80 function interrupt
81 {
82         printf "\n$0: execution interrupted manually.\n"
83         if [ "$mode" == "xml" ]; then
84                 printf "$0: deleting incomplete xml output file.\n"
85         fi
86         exit 1
87 }
88
89 function debug
90 {
91         test "$verbose" == "true" && printf "$*\n"
92 }
93
94 function xml
95 {
96         test "$mode" == "xml" && printf "$*\n" >> $XMLFILE
97         return 0
98 }
99
100 function xmlfile
101 {
102         test "$mode" == "xml" && { 
103                 printf '<![CDATA[\n'
104                 cat $1
105                 printf ']]>\n' 
106         } >> $XMLFILE
107 }
108
109
110
111 function vendors
112 {
113         # make this a function so we can easily select
114         # without breaking readability
115         ls -1 "$ROOT/src/mainboard" | grep -v Kconfig | grep -v Makefile
116 }
117
118 function mainboards
119 {
120         # make this a function so we can easily select
121         # without breaking readability
122         
123         VENDOR=$1
124         
125         ls -1 $ROOT/src/mainboard/$VENDOR | grep -v Kconfig
126 }
127
128 function architecture
129 {
130         VENDOR=$1
131         MAINBOARD=$2
132         ARCH=`cat $ROOT/src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
133                 grep "select ARCH_"|cut -f2- -d_`
134         echo $ARCH | sed s/X86/i386/
135 }
136
137 function create_config
138 {
139         VENDOR=$1
140         MAINBOARD=$2
141         CONFIG=$3
142
143         build_dir=$TARGET/${VENDOR}_${MAINBOARD}
144
145         # get a working payload for the board if we have one.
146         # the --payload option expects a directory containing 
147         # a shell script payload.sh
148         #   Usage: payload.sh [VENDOR] [DEVICE]
149         # the script returns an absolute path to the payload binary.
150
151         if [ -f $payloads/payload.sh ]; then
152                 PAYLOAD=`sh $payloads/payload.sh $VENDOR $MAINBOARD`
153                 printf "Using payload $PAYLOAD\n"
154         fi
155
156         [ "$update" = "true" ] && mv ${build_dir}/coreboot.rom coreboot.rom.tmp
157         $MAKE distclean obj=${build_dir}
158         mkdir -p ${build_dir}
159         [ "$update" = "true" ] && mv coreboot.rom.tmp ${build_dir}/coreboot.rom
160
161         if [ "$CONFIG" != "" ]; then
162                 printf "  Using existing configuration $CONFIG ... "
163                 xml "  <config>$CONFIG</config>"
164                 cp $CONFIG .config
165         else
166                 printf "  Creating config file... "
167                 xml "  <config>autogenerated</config>"
168                 grep "depends[\t ]on[\t ]*VENDOR" src/mainboard/$VENDOR/$MAINBOARD/../Kconfig | \
169                         sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > .config
170                 grep "config[\t ]*BOARD" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
171                         sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
172                 grep "select[\t ]*ARCH" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
173                         sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
174                 echo "CONFIG_MAINBOARD_DIR=\"$VENDOR/$MAINBOARD\"" >> .config
175                 echo "CONFIG_CBFS_PREFIX=\"$cbfs_prefix\"" >> .config
176                 if [ "$PAYLOAD" != "/dev/null" ]; then
177                         echo "# CONFIG_PAYLOAD_NONE is not set" >> .config
178                         echo "CONFIG_PAYLOAD_ELF=y" >> .config
179                         echo "CONFIG_FALLBACK_PAYLOAD_FILE=\"$PAYLOAD\"" >> .config
180                 fi
181
182                 if [ "$loglevel" != "default" ]; then
183                         printf "(loglevel override) "
184                         echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL_$loglevel=y" >> .config
185                         echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=$loglevel" >> .config
186                         echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL_$loglevel=y" >> .config
187                         echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL=$loglevel" >> .config
188                 fi
189
190                 if [ "$update" != "false" ]; then
191                         printf "(update) "
192                         echo "CONFIG_UPDATE_IMAGE=y" >> .config
193                 fi
194
195                 if [ "$ccache" = "true" ]; then
196                         printf "(ccache enabled) "
197                         echo "CONFIG_CCACHE=y" >> .config
198                 fi
199
200                 if [ "$scanbuild" = "true" ]; then
201                         printf "(scan-build enabled) "
202                         echo "CONFIG_SCANBUILD_ENABLE=y" >> .config
203                         echo "CONFIG_SCANBUILD_REPORT_LOCATION=\"$TARGET/scan-build-results-tmp\"" >> .config
204                 fi
205         fi
206
207         yes "" | $MAKE oldconfig -j $cpus obj=${build_dir} > ${build_dir}/config.log
208         ret=$?
209         mv .config.old $TARGET/${VENDOR}_${MAINBOARD}/config.in
210         if [ $ret -eq 0 ]; then
211                 printf "ok; "
212                 xml "  <builddir>ok</builddir>"
213                 xml "  <log>"
214                 xmlfile $build_dir/config.log
215                 xml "  </log>"
216                 xml ""
217                 return 0
218         else
219                 # Does this ever happen?
220                 printf "FAILED!\nLog excerpt:\n"
221                 xml "  <builddir>failed</builddir>"
222                 xml "  <log>"
223                 xmlfile $build_dir/config.log
224                 xml "  </log>"
225                 xml ""
226                 tail -n $CONTEXT $build_dir/config.log 2> /dev/null || tail -$CONTEXT $build_dir/config.log
227                 return 1
228         fi
229 }
230
231 function create_buildenv
232 {
233         VENDOR=$1
234         MAINBOARD=$2
235         CONFIG=$3
236         create_config $VENDOR $MAINBOARD $CONFIG
237
238         # Allow simple "make" in the target directory
239         MAKEFILE=$TARGET/${VENDOR}_${MAINBOARD}/Makefile
240         echo "# autogenerated makefile" > $MAKEFILE
241         echo "TOP=$ROOT" >> $MAKEFILE
242         echo "OUT=$TARGET/${VENDOR}_${MAINBOARD}" >> $MAKEFILE
243         echo "all:" >> $MAKEFILE
244         echo "  cp config.build \$(TOP)/.config" >> $MAKEFILE
245         echo "  cd \$(TOP); \$(MAKE) oldconfig obj=\$(OUT)" >> $MAKEFILE
246         echo "  cd \$(TOP); \$(MAKE) obj=\$(OUT)" >> $MAKEFILE
247 }
248
249 function compile_target
250 {       
251         VENDOR=$1
252         MAINBOARD=$2
253
254         printf " Compiling image "
255         test "$cpus" == "" && printf "in parallel .. "
256         test "$cpus" == "1" && printf "on 1 cpu .. "
257         test 0$cpus -gt 1 && printf "on %d cpus in parallel .. " $cpus
258
259         CURR=$( pwd )
260         #stime=`perl -e 'print time();' 2>/dev/null || date +%s`
261         build_dir=$TARGET/${VENDOR}_${MAINBOARD}
262         eval $MAKE $silent -j $cpus obj=${build_dir} \
263                 &> ${build_dir}/make.log
264         ret=$?
265         mv .config ${build_dir}/config.build
266         mv .xcompile ${build_dir}/xcompile.build
267         cd $TARGET/${VENDOR}_${MAINBOARD}
268
269         etime=`perl -e 'print time();' 2>/dev/null || date +%s`
270         duration=$(( $etime - $stime ))
271         xml "  <buildtime>${duration}s</buildtime>"
272
273         xml "  <log>"
274         xmlfile make.log
275         xml "  </log>"
276
277         if [ $ret -eq 0 ]; then
278                 xml "  <compile>ok</compile>"
279                 printf "ok\n" > compile.status
280                 printf "ok. (took ${duration}s)\n"
281                 cd $CURR
282                 return 0
283         else
284                 xml "  <compile>failed</compile>"
285                 printf "FAILED after ${duration}s!\nLog excerpt:\n"
286                 tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log
287                 cd $CURR
288                 return 1
289         fi
290 }
291
292 function built_successfully
293 {
294         CURR=`pwd`
295         status="fail"
296         if [ -d "$TARGET/${VENDOR}_${MAINBOARD}" ]; then
297                 cd $TARGET/${VENDOR}_${MAINBOARD}
298                 if [ -r compile.status ] ; then
299                         status=`cat compile.status`
300                 fi
301                 cd $CURR
302         fi
303         [ "$buildall" != "true" -a "$status" == "ok" ]
304 }
305
306 function build_broken
307 {
308         CURR=`pwd`
309         status="yes"
310         [ -r "$ROOT/src/mainboard/${VENDOR}/${MAINBOARD}/BROKEN" ] && status="no"
311         [ "$buildbroken" == "true" -o "$status" == "yes" ]
312 }
313
314 function build_target
315 {
316         VENDOR=$1
317         MAINBOARD=$2
318         CONFIG=$3
319         TARCH=$( architecture $VENDOR $MAINBOARD )
320
321         # Allow architecture override in an abuild.info file.
322         # This is used for the Motorola Sandpoint, which is not a real target
323         # but a skeleton target for the Sandpoint X3.
324         [ -r "$ROOT/src/mainboard/${VENDOR}/${MAINBOARD}/abuild.info" ] && \
325                 source $ROOT/src/mainboard/${VENDOR}/${MAINBOARD}/abuild.info
326
327         # default setting
328
329         CC="${CROSS_COMPILE}gcc"
330         CROSS_COMPILE=""
331         found_crosscompiler=false
332         if which $TARCH-elf-gcc 2>/dev/null >/dev/null; then
333                 # i386-elf target needs --divide, for i386-linux, that's the default
334                 if [ "$TARCH" = "i386" ]; then
335                         CC="$CC -Wa,--divide"
336                 fi
337                 CROSS_COMPILE="$TARCH-elf-"
338                 CC=gcc
339                 CROSS_TEXT=", using $CROSS_COMPILE$CC"
340                 found_crosscompiler=true
341         fi
342
343         HOSTCC='gcc'
344
345         printf "Building $VENDOR/$MAINBOARD; "
346
347         xml "<mainboard>"
348         xml ""
349         xml "  <vendor>$VENDOR</vendor>"
350         xml "  <device>$MAINBOARD</device>"
351         xml ""
352         xml "  <architecture>$TARCH</architecture>"
353         xml ""
354
355         if [ "$ARCH" = "$TARCH" -o $found_crosscompiler = true ]; then
356                 printf "$TARCH: ok$CROSS_TEXT\n"
357         else
358                 # FIXME this is basically the same as above.
359                 found_crosscompiler=false
360                 if [ "$ARCH" == amd64 -a "$TARCH" == i386 ]; then
361                         CC="gcc -m32"
362                         found_crosscompiler=true
363                 fi
364                 if [ "$ARCH" == ppc64 -a "$TARCH" == ppc ]; then
365                         CC="gcc -m32"
366                         found_crosscompiler=true
367                 fi
368                 if [ "$found_crosscompiler" == "false" -a "$TARCH" == ppc ];then
369                         for prefix in powerpc-eabi- powerpc-linux- ppc_74xx- \
370                             powerpc-7450-linux-gnu- powerpc-elf-; do
371                                 if ${prefix}gcc --version > /dev/null 2> /dev/null ; then
372                                         found_crosscompiler=true
373                                         CROSS_COMPILE=$prefix
374                                 fi
375                         done
376                 fi
377
378         
379                 # TBD: look for suitable cross compiler suite
380                 # cross-$TARCH-gcc and cross-$TARCH-ld
381                 
382                 # Check result:
383                 if [ $found_crosscompiler == "false" ]; then
384                         printf "$TARCH: skipped, we're $ARCH\n\n"
385                         xml "  <status>notbuilt</status>"
386                         xml ""
387                         xml "</mainboard>"
388                 
389                         return 0
390                 else
391                         printf "$TARCH: ok, $ARCH using ${CROSS_COMPILE}gcc\n"
392                         xml "  <compiler>"
393                         xml "    <path>`which ${CROSS_COMPILE}gcc`</path>"
394                         xml "    <version>`${CROSS_COMPILE}gcc --version | head -1`</version>"
395                         xml "  </compiler>"
396                         xml ""
397                 fi
398         fi
399
400         CC=${CROSS_COMPILE}$CC
401
402         if  [ "$stackprotect" = "true" ]; then
403                 CC="$CC -fno-stack-protector"
404         fi
405
406         built_successfully $VENDOR $MAINBOARD && test $update = "false" && \
407         {
408                 printf " ( mainboard/$VENDOR/$MAINBOARD previously ok )\n\n"
409                 xml "  <status>previouslyok</status>"
410                 xml ""
411                 xml "</mainboard>"
412                 return 0
413         }
414
415         build_broken $VENDOR $MAINBOARD || \
416         {
417                 printf " ( broken mainboard/$VENDOR/$MAINBOARD skipped )\n\n"
418                 xml "  <status>knownbroken</status>"
419                 xml ""
420                 xml "</mainboard>"
421                 return 0
422         }
423         
424         stime=`perl -e 'print time();' 2>/dev/null || date +%s`
425         create_buildenv $VENDOR $MAINBOARD $CONFIG
426         if [ $? -eq 0  -a  $configureonly -eq 0 ]; then
427                 compile_target $VENDOR $MAINBOARD && 
428                         xml "  <status>ok</status>" ||
429                         xml "<status>broken</status>"
430                 if [ "$scanbuild" = "true" ]; then
431                         mv `dirname $TARGET/scan-build-results-tmp/*/index.html` $TARGET/${VENDOR}_${MAINBOARD}-scanbuild
432                         MAKE=$origMAKE
433                 fi
434         fi
435         # Not calculated here because we still print it in compile_target
436         #etime=`perl -e 'print time();' 2>/dev/null || date +%s`
437         #duration=$(( $etime - $stime ))
438         #xml "  <buildtime>${duration}s</buildtime>"
439
440         xml ""
441         xml "</mainboard>"
442
443         printf "\n"
444 }
445
446 function test_target
447 {
448         VENDOR=$1
449         MAINBOARD=$2
450
451         if [ "$hwtest" != "true" ]; then
452                 return 0
453         fi
454
455         # image does not exist. we silently skip the patch.
456         if [ ! -r "$TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom" ]; then
457                 return 0
458         fi
459
460         which curl &> /dev/null
461         if [ $? != 0 ]; then
462                 printf "curl is not installed but required for test submission.  skipping test.\n\n"
463                 return 0
464         fi
465
466         CURR=`pwd`
467         if [ -r "$TARGET/${VENDOR}_${MAINBOARD}/tested" ]; then
468                 printf "Testing image for board $VENDOR $MAINBOARD skipped (previously submitted).\n\n"
469                 return 0
470         fi
471         # touch $TARGET/${VENDOR}_${MAINBOARD}/tested
472
473         printf "Submitting image for board $VENDOR $MAINBOARD to test system...\n"
474
475         curl -f -F "romfile=@$TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom" \
476                 -F "mode=abuild" -F "mainboard=${VENDOR}_${MAINBOARD}" -F "submit=Upload" \
477                 "http://qa.coreboot.org/deployment/send.php"
478
479         printf "\n"
480         return 0
481 }
482
483 function remove_target
484 {
485         if [ "$remove" != "true" ]; then
486                 return 0
487         fi
488
489         VENDOR=$1
490         MAINBOARD=$2
491
492         # Save the generated coreboot.rom file of each board.
493         if [ -r "$TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom" ]; then
494                 cp $TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom \
495                    ${VENDOR}_${MAINBOARD}_coreboot.rom
496         fi
497
498         printf "Removing build dir for board $VENDOR $MAINBOARD...\n"
499         rm -rf $TARGET/${VENDOR}_${MAINBOARD}
500
501         return 0
502 }
503
504 function myhelp
505 {
506         printf "Usage: $0 [-v] [-a] [-b] [-r] [-t <vendor/board>] [-p <dir>] [lbroot]\n"
507         printf "       $0 [-V|--version]\n"
508         printf "       $0 [-h|--help]\n\n"
509
510         printf "Options:\n"
511         printf "    [-v|--verbose]                print more messages\n"
512         printf "    [-a|--all]                    build previously succeeded ports as well\n"
513         printf "    [-b|--broken]                 attempt to build ports that are known broken\n"
514         printf "    [-r|--remove]                 remove output dir after build\n"
515         printf "    [-t|--target <vendor/board>]  attempt to build target vendor/board only\n"
516         printf "    [-p|--payloads <dir>]         use payloads in <dir> to build images\n"
517         printf "    [-V|--version]                print version number and exit\n"
518         printf "    [-h|--help]                   print this help and exit\n"
519         printf "    [-x|--xml]                    write xml log file \n"
520         printf "                                  (defaults to $XMLFILE)\n"
521         printf "    [-T|--test]                   submit image(s) to automated test system\n"
522         printf "    [-c|--cpus <numcpus>]         build on <numcpus> at the same time\n"
523         printf "    [-s|--silent]                 omit compiler calls in logs\n"
524         printf "    [-ns|--nostackprotect]        use gcc -fno-stack-protector option\n"
525         printf "    [-sb|--scan-build]            use clang's static analyzer\n"
526         printf "    [-y|--ccache]                 use ccache\n"
527         printf "    [-C|--config]                 configure-only mode\n"
528         printf "    [-l|--loglevel <num>]         set loglevel\n"
529         printf "    [-u|--update]                 update existing image\n"
530         printf "    [-P|--prefix <name>]          file name prefix in CBFS\n"
531         printf "    [lbroot]                      absolute path to coreboot sources\n"
532         printf "                                  (defaults to $ROOT)\n\n"
533 }
534
535 function myversion 
536 {
537         cat << EOF
538
539 coreboot autobuild v$ABUILD_VERSION ($ABUILD_DATE)
540
541 Copyright (C) 2004 by Stefan Reinauer <stepan@openbios.org>
542 Copyright (C) 2006-2010 by coresystems GmbH <info@coresystems.de>
543
544 This program is free software; you may redistribute it under the terms
545 of the GNU General Public License. This program has absolutely no
546 warranty.
547
548 EOF
549 }
550
551 # default options
552 target=""
553 buildall=false
554 verbose=false
555
556 test -f util/sconfig/config.g && ROOT=$( pwd )
557 test -f ../util/sconfig/config.g && ROOT=$( cd ..; pwd )
558 test "$ROOT" = "" && ROOT=$( cd ../..; pwd )
559
560 # parse parameters.. try to find out whether we're running GNU getopt
561 getoptbrand="`getopt -V`"
562 if [ "${getoptbrand:0:6}" == "getopt" ]; then
563         # Detected GNU getopt that supports long options.
564         args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml,config,loglevel:,remove,prefix:,update,nostackprotect,scan-build,ccache Vvhat:bp:Tc:sxCl:rP:uy -- "$@"`
565         eval set "$args"
566 else
567         # Detected non-GNU getopt
568         args=`getopt Vvhat:bp:Tc:sxCl:rP:uy $*`
569         set -- $args
570 fi
571
572 if [ $? != 0 ]; then
573         myhelp
574         exit 1
575 fi
576
577 while true ; do
578         case "$1" in
579                 -x|--xml)       shift; mode=xml; rm -f $XMLFILE ;;
580                 -t|--target)    shift; target="$1"; shift;;
581                 -a|--all)       shift; buildall=true;;
582                 -b|--broken)    shift; buildbroken=true;;
583                 -r|--remove)    shift; remove=true; shift;;
584                 -v|--verbose)   shift; verbose=true; silent='V=1';;
585                 -V|--version)   shift; myversion; exit 0;;
586                 -h|--help)      shift; myversion; myhelp; exit 0;;
587                 -p|--payloads)  shift; payloads="$1"; shift;;
588                 -T|--test)      shift; hwtest=true;;
589                 -c|--cpus)      shift; cpus="$1"; test "$cpus" == "max" && cpus=""; shift;;
590                 -s|--silent)    shift; silent="-s";;
591                 -ns|--nostackprotect) shift; stackprotect=true;;
592                 -sb|--scan-build) shift; scanbuild=true;;
593                 -y|--ccache)    shift; ccache=true;;
594                 -C|--config)    shift; configureonly=1;;
595                 -l|--loglevel)  shift; loglevel="$1"; shift;;
596                 -u|--update)    shift; update="true";;
597                 -P|--prefix)    shift; cbfs_prefix="$1"; shift;;
598                 --)             shift; break;;
599                 -*)             printf "Invalid option\n\n"; myhelp; exit 1;;
600                 *)              break;;
601         esac
602 done
603
604 # /path/to/freebios2/
605 test -z "$1" || ROOT=$1
606
607 debug "ROOT=$ROOT"
608
609 xml '<?xml version="1.0" encoding="utf-8"?>'
610 xml '<abuild>'
611
612 if [ "$target" != "" ]; then
613         # build a single board
614         VENDOR=`printf $target|cut -f1 -d/`
615         MAINBOARD=`printf $target|cut -f2 -d/`
616         CONFIG=`printf $target|cut -f3 -d/`
617         if [ ! -r $ROOT/src/mainboard/$target ]; then
618                 printf "No such target: $target\n"
619                 xml '</abuild>'
620                 exit 1
621         fi
622         build_target $VENDOR $MAINBOARD $CONFIG
623         test_target $VENDOR $MAINBOARD
624 else
625         # build all boards per default
626         for VENDOR in $( vendors ); do
627                 for MAINBOARD in $( mainboards $VENDOR ); do
628                         build_target $VENDOR $MAINBOARD
629                         test_target $VENDOR $MAINBOARD
630                         remove_target $VENDOR $MAINBOARD
631                 done
632         done
633 fi
634 xml '</abuild>'
635