From d8954a701c36c0c14ea7b31bbbbebde78f066ae0 Mon Sep 17 00:00:00 2001
From: BeresfordHare <BeresfordHare@users.noreply.github.com>
Date: Thu, 7 Aug 2014 14:36:10 +1200
Subject: [PATCH] Changed to make bzImage, and make mrproper.

---
 src/2_build_kernel.sh | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/2_build_kernel.sh b/src/2_build_kernel.sh
index c903d6f95..2533dcc50 100644
--- a/src/2_build_kernel.sh
+++ b/src/2_build_kernel.sh
@@ -1,10 +1,21 @@
-#/bin/sh
+#!/bin/sh
 
 cd work/kernel
-cd $(ls -d *)
-make clean
-make defconfig
-sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal-linux-live\"/" .config
-make vmlinux
-cd ../../..
 
+# Change to the first directory ls finds, e.g. linux-3.16
+cd $(ls -d *)
+
+# Cleans up the kernel sources, including configuration files
+make mrproper
+
+# Create a default configuration file for the kernel
+make defconfig
+
+# Changes the name of the system
+sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal-linux-live\"/" .config
+
+# Compile the kernel
+# Good explanation of the different kernels
+# http://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vmlinux
+make bzImage
+cd ../../..