Whamcloud - gitweb
Move these macros to lustre-portals.m4 and lustre-core.m4 where they really belong
[fs/lustre-release.git] / lustre / README.kernel-source
1 Lustre can currently build against Red Hat 2.4-style kernel-source
2 RPMs.  All other kernel-source RPMs are *unsupported* at this time.
3
4 Note that a Lustre-patched kernel is required for building Lustre; in
5 most cases a kernel-source RPM from your Linux vendor will not contain
6 the necessary patches.
7
8 1.  kernel.h
9
10 Building against a kernel-source RPM requires a special header.  On
11 Red Hat systems, this file should be automatically created at boot
12 time, and saved in /boot/kernel.h.
13
14  *** If you are not running Red Hat Linux, or are not booted into the
15  *** kernel you are trying to build against, you need to create this
16  *** file manually.
17
18  *** If you do not, the Lustre build may fail, or may fail to build
19  *** modules that work with your kernel.
20
21 Here is an example /boot/kernel.h file.  If you are building on
22 x86_64, the first defines should be __MODULE_KERNEL_x86_64, etc.  The
23 other defines should be simple to figure out.
24
25 /* This file is automatically generated at boot time. */
26 #ifndef __BOOT_KERNEL_H_
27 #define __BOOT_KERNEL_H_
28
29 /* Kernel type i686-smp */
30
31 #ifndef __MODULE_KERNEL_i686
32 #define __MODULE_KERNEL_i686 1
33 #endif
34
35 #ifndef __BOOT_KERNEL_ENTERPRISE
36 #define __BOOT_KERNEL_ENTERPRISE 0
37 #endif
38
39 #ifndef __BOOT_KERNEL_BIGMEM
40 #define __BOOT_KERNEL_BIGMEM 0
41 #endif
42
43 #ifndef __BOOT_KERNEL_HUGEMEM
44 #define __BOOT_KERNEL_HUGEMEM 0
45 #endif
46
47 #ifndef __BOOT_KERNEL_SMP
48 #define __BOOT_KERNEL_SMP 1
49 #endif
50
51 #ifndef __BOOT_KERNEL_UP
52 #define __BOOT_KERNEL_UP 0
53 #endif
54
55 #endif
56
57 You should save this somewhere, and pass the location of this file to
58 ./configure using the --with-kernel-source-header option.
59
60 2.  .config
61
62 You will also need to tell Lustre about the .config file for your
63 kernel.  The two likely locations of this file are
64 /boot/config-$(uname -r), and /usr/src/linux-2.4/configs/.  You should
65 pass the location of this file to Lustre using the --with-linux-config
66 option.
67
68 3.  An Example
69
70 Here is an example for configuring Lustre:
71
72 ./configure --with-linux=/usr/src/linux-2.4.20-28.9_lustre.1.0.3 \
73 --with-kernel-source-header=/boot/kernel.h \
74 --with-linux-config=/boot/config-2.4.20-28.9_lustre.1.0.3smp