#!/bin/bash ROOT_DIR=$(readlink -f $(dirname $(readlink -f $0))/..) . $ROOT_DIR/config/setup.conf cd $ROOT_DIR/build if [ ! -f linux-${kernel_version}.tar.bz2 ]; then echo -e "[setup-kernel]\t\t Download Kernel ($kernel_version)." wget -q -c "$kernel_url" else echo -e "[setup-kernel]\t\t Found Kernel package - skip download." fi if [ ! -d linux-${kernel_version} ]; then echo -e "[setup-kernel]\t\t Unpack Kernel." tar xjf linux-${kernel_version}.tar.bz2 else echo -e "[setup-kernel]\t\t Found unpacked kernel - continue." fi echo -e "[setup-kernel]\t\t Update Kernel config." cd linux-${kernel_version} cp ${ROOT_DIR}/config/kernel.config ./.config mkdir -p $ROOT_DIR/build/log yes "" | linux32 make oldconfig > $ROOT_DIR/build/log/kernel-oldconfig.log 2>&1 echo -e "[setup-kernel]\t\t Details can be found in the log file: $ROOT_DIR/build/log/kernel-oldconfig.log" cd - >/dev/null 2>&1