kernel-build: Do the non-debug build first

When we do the debug build, stderr and stdout are redirected to the
sparse log. But if the build fails here then we get no useful output
in the build log.

Instead do the normal, non-debug build first, so that we see the
errors in the build log.

Change-Id: I706c3a1cec4666787297e86ab794497a18a61a9b
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/kernel-build.sh b/kernel-build.sh
index d074297..4b69270 100755
--- a/kernel-build.sh
+++ b/kernel-build.sh
@@ -78,6 +78,10 @@
 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make clean
 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make mrproper
 
+# Build kernel
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -s pseries_le_defconfig
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -s -j$(nproc)
+
 # Build kernel with debug
 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -s pseries_le_defconfig
 echo "CONFIG_DEBUG_INFO=y" >> .config
@@ -85,10 +89,6 @@
 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -j$(nproc) -s C=2 CF=-D__CHECK_ENDIAN__ 2>&1 | gzip > sparse.log.gz
 pahole vmlinux 2>&1 | gzip > structs.dump.gz
 
-# Build kernel
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -s pseries_le_defconfig
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -s -j$(nproc)
-
 EOF_SCRIPT
 
 chmod a+x ${WORKSPACE}/build.sh