source: rtems-testing/rtems/bit_all_bsps @ 5f060dc

4.11
Last change on this file since 5f060dc was 5f060dc, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 25, 2011 at 6:37:39 PM

2011-07-25 Joel Sherrill <joel.sherrilL@…>

  • bit_all_bsps: Ensure BSPs exist in version under test.
  • Property mode set to 100755
File size: 4.8 KB
Line 
1#! /bin/sh
2#
3#  Test build all the tool configurations
4#
5#  $Id$
6#
7
8# Include user configurable information
9test -r ./user.cfg || \
10  check_fatal 1 "Cannot find user configuration (user.cfg)"
11. ./user.cfg
12
13#
14#  Set up variables which control the scripts behavior
15verbose=yes
16testing=no
17quit_on_error=yes
18do_barebsps=no
19if [ "x${BSP}" = "x" ]; then
20  BSP=all
21fi
22
23
24#
25#  Now get started
26#
27start=`date`
28
29# Verify that the environment is correct
30if [ ! -d log ] ; then
31  echo No log directory
32  exit 1
33fi
34
35# Determine the list of CPUs to build
36if [ $# -ne 0 ] ; then
37  CPUS=$*
38else
39  # leave out nios2 tic4x
40  CPUs=
41  for c in arm avr bfin h8300 i386 lm32 m32c m32r m68k mips \
42           powerpc sh sparc sparc64
43  do
44    if [ -r ${RTEMS}/cpukit/score/cpu/${c} ] ; then
45      CPUS="${CPUS} ${c}"
46    else
47      rm -f log/${CPU}-*.log
48    fi
49  done
50fi
51
52# we collect the ticker executables for users to try out
53rm -rf ticker-executables
54mkdir ticker-executables
55
56#
57#  Calculate the set of BSPs which could be built
58#
59#  Pick up the minimum set and then see if we are doing everything.
60#
61get_bsps()
62{
63  if [ -d ${RTEMS}/c/src/lib/libbsp/i386/pc386/make/custom ] ; then
64    ALL_BSPS=`ls -1 ${RTEMS}/c/src/lib/libbsp/${CPU}/*/make/custom/*cfg | \
65      while read f; do \
66        basename $f; done | sed -e 's/.cfg$//' `
67     
68  else
69    # RTEMS before 4.10
70    case $CPU in   
71      avr)     all_bsps="avrtest" ;;
72      bfin)    all_bsps="eZKit533 bf537Stamp" ;;
73      arm)     all_bsps="csb336 csb337 csb637 edb7312 gba gp32 nds"
74               all_bsps="${all_bsps} rtl22xx rtl22xx_t smdk2410"
75               all_bsps="${all_bsps} lpc2478 gumstix" ;;
76      h8300)   all_bsps="h8sim" ;;
77      i386)    all_bsps="i386ex pc386 pc386dx pc486 pc586 pc686"
78               all_bsps="${all_bsps} ts_386ex" ;;
79      lm32)    all_bsps="lm32_evr" ;;
80      m32c)    all_bsps="m32csim" ;;
81      m32r)    all_bsps="m32rsim" ;;
82      m68k)    all_bsps="gen68360 gen68360_040 mvme136 mvme147 mvme147s"
83               all_bsps="${all_bsps} mvme162 mvme162lx mvme167 ods68302"
84               all_bsps="${all_bsps} sim68000 mcf5206elite "
85               all_bsps="${all_bsps} uC5282 mcf52235 mcf5329"
86               all_bsps="${all_bsps} gen68302 csb360 simcpu32 mrm332 av5282"
87               all_bsps="${all_bsps} gen68340 mcf5235 idp pgh360"
88               all_bsps="${all_bsps} m5484FireEngine" ;;
89      mips)    all_bsps="jmr3904 genmongoosev csb350 hurricane"
90               all_bsps="${all_bsps} rbtx4925 rbtx4938" ;;
91      nios2)   all_bsps="nios2_iss" ;;
92      powerpc) all_bsps="psim score603e mcp750 mvme2100 mvme2307 mvme3100"
93               all_bsps="${all_bsps} mpc8260ads ss555 mvme5500 ep1a"
94               all_bsps="${all_bsps} pm520_cr825 pm520_ze30"
95               all_bsps="${all_bsps} mbx821_001 mbx821_002 mbx821_002b"
96               all_bsps="${all_bsps} mbx860_1b mbx860_001b mbx860_002"
97               all_bsps="${all_bsps} mbx860_005b mtx603e brs5l icecube"
98               all_bsps="${all_bsps} virtex mpc8349eamds hsc_cm01 haleakala"
99               all_bsps="${all_bsps} mpc8313erdb mpc5566evb"
100               all_bsps="${all_bsps} pghplus tqm8xx_stk8xx" ;;
101      sh)      all_bsps="gensh1 gensh2 gensh4"
102               all_bsps="${all_bsps} simsh1 simsh2 simsh4" ;;
103      sparc)   all_bsps="sis erc32 leon2 leon3" ;;
104      sparc64) all_bsps="usiii niagara" ;;
105      tic4x)   all_bsps="c3xsim c4xsim" ;;
106      unix)    all_bsps="posix"
107
108        supported=no
109        # check to see if this host has a simulator port
110        case `${RTEMS}/config.guess` in
111          i[3456]86-pc-linux*)  supported=yes ;;
112          sparc-sun-solaris*)   supported=yes ;;
113          i[3456]86-*freebsd2*) supported=yes ;;
114          *hpux*)
115             echo "You are on a platform which needs to be tested".
116             echo "HPUX has not been tested with the autoconf configuration."
117             exit 0
118             ;;
119        esac
120        ;;
121      *)
122        echo "UNKNOWN CPU ${CPU} -- add to bit_all"
123        ;;
124    esac
125
126    ALL_BSPS=
127    for b in ${all_bsps}
128    do
129      if [ -r ${RTEMS}/make/custom/${b}.cfg ] ; then
130        ALL_BSPS="${ALL_BSPS} ${b}"
131      else
132        rm -f log/${CPU}-${b}.log
133      fi
134    done
135  fi
136}
137
138
139# Now cycle through all the CPUs selected
140for CPU in ${CPUS}
141do
142
143
144  #
145  #  Decide to cycle over all the BSPs
146  #
147  if [ ${BSP} = "all" ] ; then
148    get_bsps
149    BSPS_TO_TEST="${ALL_BSPS}"
150  else
151    BSPS_TO_TEST="${BSP}"
152  fi
153
154  if [ "X${BSPS_TO_TEST}" != "X" ] ; then
155    for BSP_TO_TEST in ${BSPS_TO_TEST}
156    do
157      echo "Building RTEMS targetting ${CPU} for the ${BSP_TO_TEST} board"
158      logfile=log/${CPU}-${BSP_TO_TEST}.log
159      if [ ${verbose} = yes ] ; then
160         echo "./bit_rtems $CPU $BSP_TO_TEST >${logfile} 2>&1"
161      fi
162      if [ ${testing} = no ] ; then
163        BUILDDIR=build-${CPU}-${BSP_TO_TEST}-rtems
164        ./bit_rtems $CPU $BSP_TO_TEST >${logfile} 2>&1
165        mv ${BUILDDIR}/${BSP_TO_TEST}/test*/*.log log 2>/dev/null
166        du -s -k ${BUILDDIR}
167        rm -rf ${BUILDDIR}
168      fi
169    done
170  fi
171
172done
173
174# Now we are done
175
176stop=`date`
177
178echo
179echo "Started:  " $start
180echo "Finished: " $stop
181exit 0
Note: See TracBrowser for help on using the repository browser.