#!/bin/sh . ./.vars VERSION=4.16.2 KERNEL_TAR_PKG="${build_dir}/linux-$VERSION/linux-$VERSION-x86.tar" cd $build_dir if ! [ -d "${build_dir}/linux-$VERSION" ] ; then xz -dc < "${dist_dir}/linux-$VERSION.tar.xz" | tar -xvf - fi cd "linux-$VERSION" if ! [ -e ./.config ] ; then cp "${base_dir}/kernel-config" ./.config fi if ! [ -f "$KERNEL_TAR_PKG" ] ; then make olddefconfig make -j8 bzImage modules make tar-pkg fi cd "$prefix" tar -xvf - < "$KERNEL_TAR_PKG"