summaryrefslogtreecommitdiff
path: root/util/kbuildall
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2009-09-16 20:18:03 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-09-16 20:18:03 +0000
commit8e9910e5c9e9100ddeb8d90fb3ddb5a57a68771f (patch)
tree438a289016eb154e3e0a0b9514ccd32857ee9ce9 /util/kbuildall
parentab13458c34961cd709604c68059a9b209607e0b9 (diff)
kbuildall is a utility that generates default configs for all
boards, builds them, and keeps the config and build logs around and creates a roster of all boards and their build status. abuild does this for the newconfig based buildsystem, kbuildall does this for kconfig/kbuild. It's supposed to be put in the tree as util/kbuildall/kbuildall, and called like that (ie. from the top level directory). The results can be found in kbuildall.results/ in the toplevel directory, the roster is called _overview.txt ("_" to make sure it's sorted before or after all the board files) Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4638 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/kbuildall')
-rwxr-xr-xutil/kbuildall/kbuildall57
1 files changed, 57 insertions, 0 deletions
diff --git a/util/kbuildall/kbuildall b/util/kbuildall/kbuildall
new file mode 100755
index 0000000000..8495cd35f1
--- /dev/null
+++ b/util/kbuildall/kbuildall
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# coreboot autobuilder for kconfig
+#
+# This script builds coreboot images for all available targets.
+#
+# (C) 2009 coresystems GmbH
+# written by Patrick Georgi <patrick.georgi@coresystems.de>
+#
+# This file is subject to the terms and conditions of the GNU General
+# Public License, version 2. See the file COPYING in the main directory
+# of this archive for more details.
+
+TARGETDIR=kbuildall.results
+
+if [ ! -f util/kbuildall/kbuildall ]; then
+ echo "This application must be run from the"
+ echo "toplevel directory of a coreboot checkout."
+ exit 1
+fi
+
+for make in make gmake gnumake; do
+ if [ "`$make --version 2>/dev/null | grep -c GNU`" -gt 0 ]; then
+ MAKE=$make
+ break
+ fi
+done
+
+builddefconfig() {
+# $1: mainboarddir
+ $MAKE distclean
+ grep "depends[\t ]on[\t ]*VENDOR" src/mainboard/$1/../Kconfig | sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > .config
+ grep "config[\t ]*BOARD" src/mainboard/$1/Kconfig | sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
+ grep "select[\t ]*ARCH" src/mainboard/$1/Kconfig | sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
+ echo "CONFIG_MAINBOARD_DIR=$1" >> .config
+ yes "" | $MAKE oldconfig
+}
+
+rm -rf $TARGETDIR
+mkdir -p $TARGETDIR
+ALLTARGETS=`(cd src/mainboard; ls */*/Config.lb | sed s,/Config.lb,,)`
+TARGETCOUNT=`echo $ALLTARGETS | wc -w`
+CURRENTARGET=0
+for dir in $ALLTARGETS; do
+ i=`expr $i + 1`
+ if [ ! -f src/mainboard/$dir/Kconfig ]; then
+ echo "[$i/$TARGETCOUNT] ($dir) no Kconfig"
+ echo "$dir nokconfig" >> $TARGETDIR/_overview.txt
+ continue
+ fi
+ name=`echo $dir | sed s,/,_,g`
+ printf "[$i/$TARGETCOUNT] $dir "
+ builddefconfig $dir > $TARGETDIR/$name.buildconfig.log 2>&1
+ result=`$MAKE > $TARGETDIR/$name.buildcoreboot.log 2>&1 && echo ok || echo fail`
+ echo "$result."
+ echo "$dir $result" >> $TARGETDIR/_overview.txt
+done