3 # Print statistics when we exit
7 # Determine number of CPU cores if no default was set
8 : ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
10 if [ "$BUILD_NCPUS" -gt 1 ]
12 JOBS="-j $((BUILD_NCPUS + 1))"
18 if [ "${CROSS_COMPILE}" ] ; then
19 MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
24 if [ "${MAKEALL_LOGDIR}" ] ; then
25 LOG_DIR=${MAKEALL_LOGDIR}
30 if [ ! "${BUILD_DIR}" ] ; then
34 [ -d ${LOG_DIR} ] || mkdir ${LOG_DIR} || exit 1
38 # Keep track of the number of builds and errors
44 # Helper funcs for parsing boards.cfg
50 '($1 !~ /^#/ && $field == select) { print $1 }' \
53 boards_by_arch() { boards_by_field 2 "$@" ; }
54 boards_by_cpu() { boards_by_field 3 "$@" ; }
56 #########################################################################
58 #########################################################################
60 LIST_5xx="$(boards_by_cpu mpc5xx)"
62 #########################################################################
64 #########################################################################
66 LIST_5xxx="$(boards_by_cpu mpc5xxx)
86 #########################################################################
88 #########################################################################
90 LIST_512x="$(boards_by_cpu mpc512x)
94 #########################################################################
96 #########################################################################
98 LIST_8xx="$(boards_by_cpu mpc8xx)
138 #########################################################################
140 #########################################################################
142 LIST_4xx="$(boards_by_cpu ppc4xx)
177 xilinx-ppc440-generic \
178 xilinx-ppc440-generic_flash \
183 #########################################################################
185 #########################################################################
187 LIST_8220="$(boards_by_cpu mpc8220)"
189 #########################################################################
191 #########################################################################
193 LIST_824x="$(boards_by_cpu mpc824x)
202 #########################################################################
203 ## MPC8260 Systems (includes 8250, 8255 etc.)
204 #########################################################################
206 LIST_8260="$(boards_by_cpu mpc8260)
222 #########################################################################
223 ## MPC83xx Systems (includes 8349, etc.)
224 #########################################################################
226 LIST_83xx="$(boards_by_cpu mpc83xx)
229 MPC8313ERDB_NAND_66 \
247 #########################################################################
248 ## MPC85xx Systems (includes 8540, 8560 etc.)
249 #########################################################################
251 LIST_85xx="$(boards_by_cpu mpc85xx)
288 sbc8548_PCI_33_PCIE \
289 sbc8548_PCI_66_PCIE \
301 #########################################################################
303 #########################################################################
305 LIST_86xx="$(boards_by_cpu mpc86xx)
310 #########################################################################
312 #########################################################################
334 #########################################################################
336 #########################################################################
360 # Alias "ppc" -> "powerpc" to not break compatibility with older scripts
361 # still using "ppc" instead of "powerpc"
366 #########################################################################
368 #########################################################################
370 LIST_SA="$(boards_by_cpu sa1100)"
372 #########################################################################
374 #########################################################################
390 #########################################################################
392 #########################################################################
456 davinci_dm355leopard \
461 #########################################################################
463 #########################################################################
469 #########################################################################
471 #########################################################################
487 #########################################################################
489 #########################################################################
509 #########################################################################
511 #########################################################################
544 #########################################################################
546 #########################################################################
548 LIST_pxa="$(boards_by_cpu pxa)
555 LIST_ixp="$(boards_by_cpu ixp)
560 #########################################################################
562 #########################################################################
576 #########################################################################
577 ## MIPS Systems (default = big endian)
578 #########################################################################
585 vct_platinum_onenand \
586 vct_platinum_onenand_small \
588 vct_platinumavc_small \
589 vct_platinumavc_onenand \
590 vct_platinumavc_onenand_small \
593 vct_premium_onenand \
594 vct_premium_onenand_small \
616 #########################################################################
617 ## MIPS Systems (little endian)
618 #########################################################################
635 #########################################################################
637 #########################################################################
639 LIST_x86="$(boards_by_arch i386)
643 #########################################################################
645 #########################################################################
647 LIST_nios2="$(boards_by_arch nios2)
651 #########################################################################
652 ## MicroBlaze Systems
653 #########################################################################
655 LIST_microblaze="$(boards_by_arch microblaze)"
657 #########################################################################
659 #########################################################################
661 LIST_coldfire="$(boards_by_arch m68k)
665 EB+MCF-EV123_internal \
676 #########################################################################
678 #########################################################################
680 LIST_avr32="$(boards_by_arch avr32)"
682 #########################################################################
684 #########################################################################
686 LIST_blackfin="$(boards_by_arch blackfin)
690 #########################################################################
692 #########################################################################
720 #########################################################################
722 #########################################################################
724 LIST_sparc="$(boards_by_arch sparc)"
726 #-----------------------------------------------------------------------
731 ${MAKE} distclean >/dev/null
732 ${MAKE} -s ${target}_config
734 ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
735 | tee ${LOG_DIR}/$target.ERR
737 # Check for 'make' errors
738 if [ ${PIPESTATUS[0]} -ne 0 ] ; then
742 if [ -s ${LOG_DIR}/$target.ERR ] ; then
743 ERR_CNT=$((ERR_CNT + 1))
744 ERR_LIST="${ERR_LIST} $target"
746 rm ${LOG_DIR}/$target.ERR
749 TOTAL_CNT=$((TOTAL_CNT + 1))
751 ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
752 | tee -a ${LOG_DIR}/$target.MAKELOG
756 # If a LIST_xxx var exists, use it. But avoid variable
757 # expansion in the eval when a board name contains certain
758 # characters that the shell interprets.
761 *) list=$(eval echo '${LIST_'$t'}') ;;
763 if [ -n "${list}" ] ; then
764 build_targets ${list}
771 #-----------------------------------------------------------------------
775 echo "--------------------- SUMMARY ----------------------------"
776 echo "Boards compiled: ${TOTAL_CNT}"
777 if [ ${ERR_CNT} -gt 0 ] ; then
778 echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
780 echo "----------------------------------------------------------"
785 #-----------------------------------------------------------------------
787 #----- for now, just run PowerPC by default -----
788 [ $# = 0 ] && set -- powerpc