Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- KEEP=0
- NOOBJDIR=0
- TC=0
- MACHINE=omap3_beagle
- LOG=/dev/stdout
- # Find our arguments
- while test $# -ne 0; do
- if [ "$1" == "--keep" ]; then
- KEEP=1
- shift
- elif [ "$1" == "--no-objdir" ]; then
- NOOBJDIR=1
- shift
- elif [ "$1" == "--angstrom" ]; then
- TC=1
- if [ -z $SOC ]; then
- source /usr/local/angstrom-eglibc-x86_64-armv5te/environment-setup-armv5te-angstrom-linux-gnueabi
- export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
- elif [ "$MACHINE" == "x86" ]; then
- source /usr/local/angstrom-eglibc-x86_64-i586/environment-setup-i586-angstrom-linux
- export CROSS_COMPILE=i586-angstrom-linux-
- fi
- shift
- elif [ "$1" == "--eldk-42" ]; then
- TC=1
- export CROSS_COMPILE=/opt/eldk-4.2/arm/usr/bin/arm-linux-gnueabi-
- shift
- elif [ "$1" == "--eldk-521" ]; then
- TC=1
- if [ -z "$SOC" -o "$MACHINE" == "arm" ]; then
- source /opt/eldk-5.2.1/armv7a/environment-setup-armv7a-vfp-neon-linux-gnueabi
- export CROSS_COMPILE=arm-linux-gnueabi-
- elif [ "$MACHINE" == "mips" ]; then
- source /opt/eldk-5.2.1/mips/environment-setup-mips32-linux
- export CROSS_COMPILE=mips-linux-
- elif [ "$MACHINE" == "powerpc" ]; then
- source /opt/eldk-5.2.1/powerpc/environment-setup-powerpc-linux
- export CROSS_COMPILE=powerpc-linux-
- fi
- shift
- elif [ "$1" == "--linaro" ]; then
- TC=1
- export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
- shift
- elif [ "$1" == "--log" ]; then
- LOG=$2
- shift 2
- elif [ "$1" == "--soc" ]; then
- MACHINE="$2"
- SOC="-s"
- shift 2
- elif [ "$1" == "--arch" ]; then
- MACHINE="$2"
- SOC="-a"
- if [ "$MACHINE" == "m68k" ]; then
- export CROSS_COMPILE=/usr/local/bin/m68k-uclinux-
- TC=1
- fi
- shift 2
- elif [ "$1" == "--cpu" ]; then
- MACHINE="$2"
- SOC="-c"
- shift 2
- else
- MACHINE=$1
- if [ "$MACHINE" == "sandbox" ]; then
- TC=1
- fi
- shift
- fi
- done
- if [ $TC -eq 0 ]; then
- source /opt/eldk-5.2.1/armv7a/environment-setup-armv7a-vfp-neon-linux-gnueabi
- export CROSS_COMPILE=arm-linux-gnueabi-
- fi
- if [ $NOOBJDIR -eq 0 ]; then
- export BUILD_DIR=${MACHINE}
- export MAKEALL_LOGDIR=${MACHINE}
- fi
- echo -n "Testing $MACHINE"
- if [ -x ./tools/setlocalversion ]; then
- echo -n " on "
- ./tools/setlocalversion
- else
- echo
- fi
- TIMEFILE=`mktemp testersh.XXXXXX`
- if [ $KEEP -eq 0 ]; then
- if [ $NOOBJDIR -eq 1 ]; then
- make distclean >/dev/null 2>&1
- else
- rm -rf ${BUILD_DIR}
- fi
- fi
- date
- if [ ! -z $SOC ]; then
- export BUILD_NCPUS=1
- export BUILD_NBUILDS=`grep -c processor /proc/cpuinfo`
- fi
- /usr/bin/time -o $TIMEFILE -f %e ./MAKEALL $SOC $MACHINE > $LOG 2>&1
- RC=$?
- if [ $RC -eq 0 ]; then
- echo -n "OK in "
- else
- echo -n "Failed in "
- fi
- cat $TIMEFILE
- rm $TIMEFILE
- exit $RC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement