minimal/src/2_build_kernel.sh
Ivan Davidov aee022b07a • The download URL for the kernel now points to stable version "3.16".
• Minor formatting changes - the scripts should be more readable this way.
• Minor comment updates.
2014-08-08 02:30:28 +03:00

23 lines
596 B
Bash

#!/bin/sh
cd work/kernel
# 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 ../../..