summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2004-11-05 11:47:41 +0000
committerStefan Reinauer <stepan@openbios.org>2004-11-05 11:47:41 +0000
commitd4c6846f4178cb0a74ae08b06d897ead512c08e1 (patch)
tree53d72cbe873b48cadacf2a0b5e787022e43798a8 /util
parent1a003244d623ba4854be37793cc51ff9d3185280 (diff)
downloadcoreboot-d4c6846f4178cb0a74ae08b06d897ead512c08e1.tar.xz
...
add option so it's possible to ignore broken builds git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1758 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/abuild/abuild.sh64
1 files changed, 46 insertions, 18 deletions
diff --git a/util/abuild/abuild.sh b/util/abuild/abuild.sh
index 1ade04118f..a8f39e46b5 100644
--- a/util/abuild/abuild.sh
+++ b/util/abuild/abuild.sh
@@ -178,6 +178,15 @@ function built_successfully
fi
[ "$buildall" != "true" -a "$status" == "ok" ]
}
+
+function build_broken
+{
+ CURR=`pwd`
+ status="yes"
+ [ -r "$LBROOT/src/mainboard/${VENDOR}/${MAINBOARD}/BROKEN" ] && status="no"
+ [ "$buildbroken" == "true" -o "$status" == "yes" ]
+}
+
function build_target
{
VENDOR=$1
@@ -220,29 +229,50 @@ function build_target
# Check result:
if [ $found_crosscompiler == "false" ]; then
echo " ($TARCH: skipped, we're $ARCH)"
+ echo
return 0
else
echo " ($TARCH: ok)"
fi
fi
- if ! built_successfully $VENDOR $MAINBOARD ; then
- create_buildenv $VENDOR $MAINBOARD
- if [ $? -eq 0 ]; then
- compile_target $VENDOR $MAINBOARD
- fi
- else
+ built_successfully $VENDOR $MAINBOARD && \
+ {
echo " ( mainboard/$VENDOR/$MAINBOARD previously ok )"
+ echo
+ return 0
+ }
+
+ build_broken $VENDOR $MAINBOARD || \
+ {
+ echo " ( broken mainboard/$VENDOR/$MAINBOARD skipped )"
+ echo
+ return 0
+ }
+
+ create_buildenv $VENDOR $MAINBOARD
+ if [ $? -eq 0 ]; then
+ compile_target $VENDOR $MAINBOARD
fi
- echo
}
+ echo
function myhelp
{
- echo "Usage: $0 [-v|--verbose] [-a|--all] [-t|--target vendor/board] [lbroot]"
+ echo "Usage: $0 [-v] [-a] [-b] [-t <vendor/board>] [lbroot]"
echo " $0 [-V|--version]"
echo " $0 [-h|--help]"
- exit 0
+ echo
+ echo "Options:"
+ echo " [-v|--verbose] print more messages"
+ echo " [-a|--all] build previously succeeded ports as well"
+ echo " [-b|--broken] attempt to build ports that are known broken"
+ echo " [-t|--target <vendor/board>] attempt to build target vendor/board only"
+ echo " [-V|--version] print version number and exit"
+ echo " [-h|--help] print this help and exit"
+ echo " [lbroot] absolute path to LinuxBIOS sources"
+ echo " (defaults to $LBROOT)"
+ echo
}
function myversion
@@ -258,15 +288,15 @@ warranty.
EOF
myhelp
- exit 0
}
# default options
target=""
buildall=false
+LBROOT=$( cd ../..; pwd )
# parse parameters
-args=`getopt -l version,verbose,help,all,target: Vvhat: -- "$@"`
+args=`getopt -l version,verbose,help,all,target:,broken Vvhat:b -- "$@"`
if [ $? != 0 ]; then
myhelp
@@ -278,20 +308,18 @@ while true ; do
case "$1" in
-t|--target) shift; target=$1; shift;;
-a|--all) shift; buildall=true;;
+ -b|--broken) shift; buildbroken=true;;
-v|--verbose) shift; verbose=true;;
- -V|--version) shift; myversion;;
- -h|--help) shift; myhelp;;
+ -V|--version) shift; myversion; exit 0;;
+ -h|--help) shift; myhelp; exit 0;;
--) shift; break;;
+ -*) echo -e "Invalid option\n"; myhelp; exit 1;;
*) break;;
esac
done
-LBROOT=$1
+test -z "$1" || LBROOT=$1
-# /path/to/freebios2/
-if [ -z "$LBROOT" ] ; then
- LBROOT=$( cd ../..; pwd )
-fi
echo "LBROOT=$LBROOT"
if [ "$target" != "" ]; then