--- /dev/null
+Lustre can currently build against Red Hat 2.4-style kernel-source
+RPMs. All other kernel-source RPMs are *unsupported* at this time.
+
+Note that a Lustre-patched kernel is required for building Lustre; in
+most cases a kernel-source RPM from your Linux vendor will not contain
+the necessary patches.
+
+1. kernel.h
+
+Building against a kernel-source RPM requires a special header. On
+Red Hat systems, this file should be automatically created at boot
+time, and saved in /boot/kernel.h.
+
+ *** If you are not running Red Hat Linux, or are not booted into the
+ *** kernel you are trying to build against, you need to create this
+ *** file manually.
+
+ *** If you do not, the Lustre build may fail, or may fail to build
+ *** modules that work with your kernel.
+
+Here is an example /boot/kernel.h file. If you are building on
+x86_64, the first defines should be __MODULE_KERNEL_x86_64, etc. The
+other defines should be simple to figure out.
+
+/* This file is automatically generated at boot time. */
+#ifndef __BOOT_KERNEL_H_
+#define __BOOT_KERNEL_H_
+
+/* Kernel type i686-smp */
+
+#ifndef __MODULE_KERNEL_i686
+#define __MODULE_KERNEL_i686 1
+#endif
+
+#ifndef __BOOT_KERNEL_ENTERPRISE
+#define __BOOT_KERNEL_ENTERPRISE 0
+#endif
+
+#ifndef __BOOT_KERNEL_BIGMEM
+#define __BOOT_KERNEL_BIGMEM 0
+#endif
+
+#ifndef __BOOT_KERNEL_HUGEMEM
+#define __BOOT_KERNEL_HUGEMEM 0
+#endif
+
+#ifndef __BOOT_KERNEL_SMP
+#define __BOOT_KERNEL_SMP 1
+#endif
+
+#ifndef __BOOT_KERNEL_UP
+#define __BOOT_KERNEL_UP 0
+#endif
+
+#endif
+
+You should save this somewhere, and pass the location of this file to
+./configure using the --with-kernel-source-header option.
+
+2. .config
+
+You will also need to tell Lustre about the .config file for your
+kernel. The two likely locations of this file are
+/boot/config-$(uname -r), and /usr/src/linux-2.4/configs/. You should
+pass the location of this file to Lustre using the --with-linux-config
+option.
+
+3. An Example
+
+Here is an example for configuring Lustre:
+
+./configure --with-linux=/usr/src/linux-2.4.20-28.9_lustre.1.0.3 \
+--with-kernel-source-header=/boot/kernel.h \
+--with-linux-config=/boot/config-2.4.20-28.9_lustre.1.0.3smp
AC_ARG_WITH([kernel-source-header],
AC_HELP_STRING([--with-kernel-source-header=path],
- [Use a different kernel version header. Consult README.kernel-source for details.]),
+ [Use a different kernel version header. Consult build/README.kernel-source for details.]),
[KERNEL_SOURCE_HEADER=$with_kernel_source_header])
# ------------ .config exists ----------------
AC_CHECK_FILE([$LINUX_CONFIG],[],
- [AC_MSG_ERROR([Kernel config could not be found. If you are building from a kernel-source rpm consult README.kernel-source])])
+ [AC_MSG_ERROR([Kernel config could not be found. If you are building from a kernel-source rpm consult build/README.kernel-source])])
# ----------- make dep run? ------------------
AC_CHECK_FILES([$LINUX_OBJ/include/linux/autoconf.h
[if test $KERNEL_SOURCE_HEADER = '/boot/kernel.h' ; then
AC_MSG_WARN([Using /boot/kernel.h from RUNNING kernel.])
AC_MSG_WARN([If this is not what you want, use --with-kernel-source-header.])
- AC_MSG_WARN([Consult README.kernel-source for details.])
+ AC_MSG_WARN([Consult build/README.kernel-source for details.])
fi],
- [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found. Consult README.kernel-source for details.])])
+ [AC_MSG_ERROR([$KERNEL_SOURCE_HEADER not found. Consult build/README.kernel-source for details.])])
EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
fi
],[
AC_MSG_RESULT([no])
AC_MSG_WARN([Consult config.log for details.])
- AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult README.kernel-source])
+ AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult build/README.kernel-source])
AC_MSG_ERROR([Kernel modules could not be built.])
])