Whamcloud - gitweb
b=21889 Rename lustre-resync-test
[fs/lustre-release.git] / build / README.kernel-source
1 Lustre can currently build against Red Hat 2.4 and SuSE 2.6
2 kernel-source RPMs.  All other kernel-source RPMs are *unsupported* at
3 this time.
4
5 Note that a Lustre-patched kernel is required for building Lustre; in
6 most cases a kernel-source RPM from your Linux vendor will not contain
7 the necessary patches.
8
9 ##
10 ## Instructions for Red Hat 2.4.x kernel-source RPMs
11 ##
12
13 1.  kernel.h
14
15 Building against a kernel-source RPM requires a special header.  On
16 Red Hat systems, this file should be automatically created at boot
17 time, and saved in /boot/kernel.h.
18
19  *** If you are not running Red Hat Linux, or are not booted into the
20  *** kernel you are trying to build against, you need to create this
21  *** file manually.
22
23  *** If you do not, the Lustre build may fail, or may fail to build
24  *** modules that work with your kernel.
25
26 Here is an example /boot/kernel.h file.  If you are building on
27 x86_64, the first defines should be __MODULE_KERNEL_x86_64, etc.  The
28 other defines should be simple to figure out.
29
30 /* This file is automatically generated at boot time. */
31 #ifndef __BOOT_KERNEL_H_
32 #define __BOOT_KERNEL_H_
33
34 /* Kernel type i686-smp */
35
36 #ifndef __MODULE_KERNEL_i686
37 #define __MODULE_KERNEL_i686 1
38 #endif
39
40 #ifndef __BOOT_KERNEL_ENTERPRISE
41 #define __BOOT_KERNEL_ENTERPRISE 0
42 #endif
43
44 #ifndef __BOOT_KERNEL_BIGMEM
45 #define __BOOT_KERNEL_BIGMEM 0
46 #endif
47
48 #ifndef __BOOT_KERNEL_HUGEMEM
49 #define __BOOT_KERNEL_HUGEMEM 0
50 #endif
51
52 #ifndef __BOOT_KERNEL_SMP
53 #define __BOOT_KERNEL_SMP 1
54 #endif
55
56 #ifndef __BOOT_KERNEL_UP
57 #define __BOOT_KERNEL_UP 0
58 #endif
59
60 #endif
61
62 You should save this somewhere, and pass the location of this file to
63 ./configure using the --with-kernel-source-header option.
64
65 2.  .config
66
67 You will also need to tell Lustre about the .config file for your
68 kernel.  The two likely locations of this file are
69 /boot/config-$(uname -r), and /usr/src/linux-2.4/configs/.  You should
70 pass the location of this file to Lustre using the --with-linux-config
71 option.
72
73 3.  An Example
74
75 Here is an example for configuring Lustre:
76
77 ./configure --with-linux=/usr/src/linux-2.4.20-28.9_lustre.1.0.3 \
78 --with-kernel-source-header=/boot/kernel.h \
79 --with-linux-config=/boot/config-2.4.20-28.9_lustre.1.0.3smp
80
81 ##
82 ## Instructions for SuSE 2.6.x kernel-source RPMs
83 ##
84
85 1.  kernel-syms
86
87 In addition to the kernel-source rpm, you may need to install a
88 kernel-syms rpm.  This should be included where you got your kernel
89 rpm.
90
91 2.  linux-obj
92
93 You will need to choose the correct linux-obj directory for your
94 machine.  They will be located in /usr/src/linux-$(uname
95 -r)-obj/$ARCH/$FLAVOR.  Lustre should be configured with the
96 --with-linux-obj option.
97
98 3.  Example
99
100 Here is an example for configuring Lustre:
101
102 ./configure --with-linux=/usr/src/linux-2.6.5-7.97 \
103 --with-linux-obj=/usr/src/linux-2.6.5-7.97-obj/ppc64/pseries64