- build_kernel
- else
- # can't build a kernel if we have no series for it (i.e. patchless)
- # but we still need the headers
- use_unpacked_source=false
- if $use_unpacked_source; then
- unpack_linux
- LINUX=$(pwd)/linux
- pushd $LINUX && {
- # need a .config -- like a user would do
- BOOTCONFIG="/boot/config-${lnxmaj}-${lnxrel}smp"
- if [ -f $BOOTCONFIG ]; then
- cp $BOOTCONFIG .config
- else
- fatal 1 "$BOOTCONFIG doesn't exist! Help!"
- fi
- # vendors like to taint the EXTRAVERSION in their kernel-source
- # to differentiate a user-built kernel from their own
- ed << EOF Makefile
-/^EXTRAVERSION =/d
-wq
-EOF
- make oldconfig
- make include/asm
- make include/linux/version.h
- make SUBDIRS=scripts
- }
- popd
- else
- LINUX=/lib/modules/${lnxmaj}-${lnxrel}smp/build
- if [ ! -e $LINUX ]; then
- fatal 1 "$LINUX does not exist! Install a kernel-devel package!"
- fi
- fi
- CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-server"
- build_lustre
- fi