Report build result from abuild (did all requested boards build?)
[coreboot.git] / util / abuild / abuild
index b44447bec41fb5c487a8467708b5985419c20756..24e5d638bdc2fee91075d4b3f60e49a913129f56 100755 (executable)
@@ -35,6 +35,9 @@ cpus=1
 # Configure-only mode
 configureonly=0
 
+# Did any board fail to build?
+failed=0
+
 # One might want to adjust these in case of cross compiling
 for i in make gmake gnumake nonexistant_make; do
        $i --version 2>/dev/null |grep "GNU Make" >/dev/null && break
@@ -161,7 +164,7 @@ function create_config
        if [ "$CONFIG" != "" ]; then
                printf "  Using existing configuration $CONFIG ... "
                xml "  <config>$CONFIG</config>"
-               cp $CONFIG ${build_dir}/config.build
+               cp src/mainboard/$VENDOR/$MAINBOARD/$CONFIG ${build_dir}/config.build
        else
                printf "  Creating config file... "
                xml "  <config>autogenerated</config>"
@@ -175,6 +178,7 @@ function create_config
                echo "CONFIG_CBFS_PREFIX=\"$cbfs_prefix\"" >> ${build_dir}/config.build
                if [ "$PAYLOAD" != "/dev/null" ]; then
                        echo "# CONFIG_PAYLOAD_NONE is not set" >> ${build_dir}/config.build
+                       echo "# CONFIG_PAYLOAD_SEABIOS is not set" >> ${build_dir}/config.build
                        echo "CONFIG_PAYLOAD_ELF=y" >> ${build_dir}/config.build
                        echo "CONFIG_PAYLOAD_FILE=\"$PAYLOAD\"" >> ${build_dir}/config.build
                fi
@@ -293,6 +297,7 @@ function compile_target
                printf "FAILED after ${duration}s!\nLog excerpt:\n"
                tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log
                cd $CURR
+               failed=1
                return 1
        fi
 }
@@ -621,3 +626,4 @@ else
 fi
 xml '</abuild>'
 
+exit $failed