aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README222
1 files changed, 118 insertions, 104 deletions
diff --git a/README b/README
index 0d5a7ddbe3ee..9beaed0ed620 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1 Linux kernel release 3.x <http://kernel.org/> 1 Linux kernel release 3.x <http://kernel.org/>
2 2
3These are the release notes for Linux version 3. Read them carefully, 3These are the release notes for Linux version 3. Read them carefully,
4as they tell you what this is all about, explain how to install the 4as they tell you what this is all about, explain how to install the
@@ -62,13 +62,13 @@ INSTALLING the kernel source:
62 directory where you have permissions (eg. your home directory) and 62 directory where you have permissions (eg. your home directory) and
63 unpack it: 63 unpack it:
64 64
65 gzip -cd linux-3.X.tar.gz | tar xvf - 65 gzip -cd linux-3.X.tar.gz | tar xvf -
66 66
67 or 67 or
68 bzip2 -dc linux-3.X.tar.bz2 | tar xvf -
69 68
69 bzip2 -dc linux-3.X.tar.bz2 | tar xvf -
70 70
71 Replace "XX" with the version number of the latest kernel. 71 Replace "X" with the version number of the latest kernel.
72 72
73 Do NOT use the /usr/src/linux area! This area has a (usually 73 Do NOT use the /usr/src/linux area! This area has a (usually
74 incomplete) set of kernel headers that are used by the library header 74 incomplete) set of kernel headers that are used by the library header
@@ -78,49 +78,43 @@ INSTALLING the kernel source:
78 - You can also upgrade between 3.x releases by patching. Patches are 78 - You can also upgrade between 3.x releases by patching. Patches are
79 distributed in the traditional gzip and the newer bzip2 format. To 79 distributed in the traditional gzip and the newer bzip2 format. To
80 install by patching, get all the newer patch files, enter the 80 install by patching, get all the newer patch files, enter the
81 top level directory of the kernel source (linux-3.x) and execute: 81 top level directory of the kernel source (linux-3.X) and execute:
82 82
83 gzip -cd ../patch-3.x.gz | patch -p1 83 gzip -cd ../patch-3.x.gz | patch -p1
84 84
85 or 85 or
86 bzip2 -dc ../patch-3.x.bz2 | patch -p1
87 86
88 (repeat xx for all versions bigger than the version of your current 87 bzip2 -dc ../patch-3.x.bz2 | patch -p1
89 source tree, _in_order_) and you should be ok. You may want to remove 88
90 the backup files (xxx~ or xxx.orig), and make sure that there are no 89 Replace "x" for all versions bigger than the version "X" of your current
91 failed patches (xxx# or xxx.rej). If there are, either you or me has 90 source tree, _in_order_, and you should be ok. You may want to remove
92 made a mistake. 91 the backup files (some-file-name~ or some-file-name.orig), and make sure
92 that there are no failed patches (some-file-name# or some-file-name.rej).
93 If there are, either you or I have made a mistake.
93 94
94 Unlike patches for the 3.x kernels, patches for the 3.x.y kernels 95 Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
95 (also known as the -stable kernels) are not incremental but instead apply 96 (also known as the -stable kernels) are not incremental but instead apply
96 directly to the base 3.x kernel. Please read 97 directly to the base 3.x kernel. For example, if your base kernel is 3.0
97 Documentation/applying-patches.txt for more information. 98 and you want to apply the 3.0.3 patch, you must not first apply the 3.0.1
99 and 3.0.2 patches. Similarly, if you are running kernel version 3.0.2 and
100 want to jump to 3.0.3, you must first reverse the 3.0.2 patch (that is,
101 patch -R) _before_ applying the 3.0.3 patch. You can read more on this in
102 Documentation/applying-patches.txt
98 103
99 Alternatively, the script patch-kernel can be used to automate this 104 Alternatively, the script patch-kernel can be used to automate this
100 process. It determines the current kernel version and applies any 105 process. It determines the current kernel version and applies any
101 patches found. 106 patches found.
102 107
103 linux/scripts/patch-kernel linux 108 linux/scripts/patch-kernel linux
104 109
105 The first argument in the command above is the location of the 110 The first argument in the command above is the location of the
106 kernel source. Patches are applied from the current directory, but 111 kernel source. Patches are applied from the current directory, but
107 an alternative directory can be specified as the second argument. 112 an alternative directory can be specified as the second argument.
108 113
109 - If you are upgrading between releases using the stable series patches
110 (for example, patch-3.x.y), note that these "dot-releases" are
111 not incremental and must be applied to the 3.x base tree. For
112 example, if your base kernel is 3.0 and you want to apply the
113 3.0.3 patch, you do not and indeed must not first apply the
114 3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
115 version 3.0.2 and want to jump to 3.0.3, you must first
116 reverse the 3.0.2 patch (that is, patch -R) _before_ applying
117 the 3.0.3 patch.
118 You can read more on this in Documentation/applying-patches.txt
119
120 - Make sure you have no stale .o files and dependencies lying around: 114 - Make sure you have no stale .o files and dependencies lying around:
121 115
122 cd linux 116 cd linux
123 make mrproper 117 make mrproper
124 118
125 You should now have the sources correctly installed. 119 You should now have the sources correctly installed.
126 120
@@ -137,21 +131,23 @@ SOFTWARE REQUIREMENTS
137 131
138BUILD directory for the kernel: 132BUILD directory for the kernel:
139 133
140 When compiling the kernel all output files will per default be 134 When compiling the kernel, all output files will per default be
141 stored together with the kernel source code. 135 stored together with the kernel source code.
142 Using the option "make O=output/dir" allow you to specify an alternate 136 Using the option "make O=output/dir" allow you to specify an alternate
143 place for the output files (including .config). 137 place for the output files (including .config).
144 Example: 138 Example:
145 kernel source code: /usr/src/linux-3.N
146 build directory: /home/name/build/kernel
147 139
148 To configure and build the kernel use: 140 kernel source code: /usr/src/linux-3.X
149 cd /usr/src/linux-3.N 141 build directory: /home/name/build/kernel
150 make O=/home/name/build/kernel menuconfig 142
151 make O=/home/name/build/kernel 143 To configure and build the kernel, use:
152 sudo make O=/home/name/build/kernel modules_install install
153 144
154 Please note: If the 'O=output/dir' option is used then it must be 145 cd /usr/src/linux-3.X
146 make O=/home/name/build/kernel menuconfig
147 make O=/home/name/build/kernel
148 sudo make O=/home/name/build/kernel modules_install install
149
150 Please note: If the 'O=output/dir' option is used, then it must be
155 used for all invocations of make. 151 used for all invocations of make.
156 152
157CONFIGURING the kernel: 153CONFIGURING the kernel:
@@ -163,61 +159,78 @@ CONFIGURING the kernel:
163 new version with minimal work, use "make oldconfig", which will 159 new version with minimal work, use "make oldconfig", which will
164 only ask you for the answers to new questions. 160 only ask you for the answers to new questions.
165 161
166 - Alternate configuration commands are: 162 - Alternative configuration commands are:
167 "make config" Plain text interface. 163
168 "make menuconfig" Text based color menus, radiolists & dialogs. 164 "make config" Plain text interface.
169 "make nconfig" Enhanced text based color menus. 165
170 "make xconfig" X windows (Qt) based configuration tool. 166 "make menuconfig" Text based color menus, radiolists & dialogs.
171 "make gconfig" X windows (Gtk) based configuration tool. 167
172 "make oldconfig" Default all questions based on the contents of 168 "make nconfig" Enhanced text based color menus.
173 your existing ./.config file and asking about 169
174 new config symbols. 170 "make xconfig" X windows (Qt) based configuration tool.
175 "make silentoldconfig" 171
176 Like above, but avoids cluttering the screen 172 "make gconfig" X windows (Gtk) based configuration tool.
177 with questions already answered. 173
178 Additionally updates the dependencies. 174 "make oldconfig" Default all questions based on the contents of
179 "make defconfig" Create a ./.config file by using the default 175 your existing ./.config file and asking about
180 symbol values from either arch/$ARCH/defconfig 176 new config symbols.
181 or arch/$ARCH/configs/${PLATFORM}_defconfig, 177
182 depending on the architecture. 178 "make silentoldconfig"
183 "make ${PLATFORM}_defconfig" 179 Like above, but avoids cluttering the screen
184 Create a ./.config file by using the default 180 with questions already answered.
185 symbol values from 181 Additionally updates the dependencies.
186 arch/$ARCH/configs/${PLATFORM}_defconfig. 182
187 Use "make help" to get a list of all available 183 "make defconfig" Create a ./.config file by using the default
188 platforms of your architecture. 184 symbol values from either arch/$ARCH/defconfig
189 "make allyesconfig" 185 or arch/$ARCH/configs/${PLATFORM}_defconfig,
190 Create a ./.config file by setting symbol 186 depending on the architecture.
191 values to 'y' as much as possible. 187
192 "make allmodconfig" 188 "make ${PLATFORM}_defconfig"
193 Create a ./.config file by setting symbol 189 Create a ./.config file by using the default
194 values to 'm' as much as possible. 190 symbol values from
195 "make allnoconfig" Create a ./.config file by setting symbol 191 arch/$ARCH/configs/${PLATFORM}_defconfig.
196 values to 'n' as much as possible. 192 Use "make help" to get a list of all available
197 "make randconfig" Create a ./.config file by setting symbol 193 platforms of your architecture.
198 values to random values. 194
195 "make allyesconfig"
196 Create a ./.config file by setting symbol
197 values to 'y' as much as possible.
198
199 "make allmodconfig"
200 Create a ./.config file by setting symbol
201 values to 'm' as much as possible.
202
203 "make allnoconfig" Create a ./.config file by setting symbol
204 values to 'n' as much as possible.
205
206 "make randconfig" Create a ./.config file by setting symbol
207 values to random values.
199 208
200 You can find more information on using the Linux kernel config tools 209 You can find more information on using the Linux kernel config tools
201 in Documentation/kbuild/kconfig.txt. 210 in Documentation/kbuild/kconfig.txt.
202 211
203 NOTES on "make config": 212 - NOTES on "make config":
204 - having unnecessary drivers will make the kernel bigger, and can 213
205 under some circumstances lead to problems: probing for a 214 - Having unnecessary drivers will make the kernel bigger, and can
206 nonexistent controller card may confuse your other controllers 215 under some circumstances lead to problems: probing for a
207 - compiling the kernel with "Processor type" set higher than 386 216 nonexistent controller card may confuse your other controllers
208 will result in a kernel that does NOT work on a 386. The 217
209 kernel will detect this on bootup, and give up. 218 - Compiling the kernel with "Processor type" set higher than 386
210 - A kernel with math-emulation compiled in will still use the 219 will result in a kernel that does NOT work on a 386. The
211 coprocessor if one is present: the math emulation will just 220 kernel will detect this on bootup, and give up.
212 never get used in that case. The kernel will be slightly larger, 221
213 but will work on different machines regardless of whether they 222 - A kernel with math-emulation compiled in will still use the
214 have a math coprocessor or not. 223 coprocessor if one is present: the math emulation will just
215 - the "kernel hacking" configuration details usually result in a 224 never get used in that case. The kernel will be slightly larger,
216 bigger or slower kernel (or both), and can even make the kernel 225 but will work on different machines regardless of whether they
217 less stable by configuring some routines to actively try to 226 have a math coprocessor or not.
218 break bad code to find kernel problems (kmalloc()). Thus you 227
219 should probably answer 'n' to the questions for 228 - The "kernel hacking" configuration details usually result in a
220 "development", "experimental", or "debugging" features. 229 bigger or slower kernel (or both), and can even make the kernel
230 less stable by configuring some routines to actively try to
231 break bad code to find kernel problems (kmalloc()). Thus you
232 should probably answer 'n' to the questions for "development",
233 "experimental", or "debugging" features.
221 234
222COMPILING the kernel: 235COMPILING the kernel:
223 236
@@ -230,7 +243,7 @@ COMPILING the kernel:
230 possible to do "make install" if you have lilo installed to suit the 243 possible to do "make install" if you have lilo installed to suit the
231 kernel makefiles, but you may want to check your particular lilo setup first. 244 kernel makefiles, but you may want to check your particular lilo setup first.
232 245
233 To do the actual install you have to be root, but none of the normal 246 To do the actual install, you have to be root, but none of the normal
234 build should require that. Don't take the name of root in vain. 247 build should require that. Don't take the name of root in vain.
235 248
236 - If you configured any of the parts of the kernel as `modules', you 249 - If you configured any of the parts of the kernel as `modules', you
@@ -238,13 +251,13 @@ COMPILING the kernel:
238 251
239 - Verbose kernel compile/build output: 252 - Verbose kernel compile/build output:
240 253
241 Normally the kernel build system runs in a fairly quiet mode (but not 254 Normally, the kernel build system runs in a fairly quiet mode (but not
242 totally silent). However, sometimes you or other kernel developers need 255 totally silent). However, sometimes you or other kernel developers need
243 to see compile, link, or other commands exactly as they are executed. 256 to see compile, link, or other commands exactly as they are executed.
244 For this, use "verbose" build mode. This is done by inserting 257 For this, use "verbose" build mode. This is done by inserting
245 "V=1" in the "make" command. E.g.: 258 "V=1" in the "make" command. E.g.:
246 259
247 make V=1 all 260 make V=1 all
248 261
249 To have the build system also tell the reason for the rebuild of each 262 To have the build system also tell the reason for the rebuild of each
250 target, use "V=2". The default is "V=0". 263 target, use "V=2". The default is "V=0".
@@ -256,6 +269,7 @@ COMPILING the kernel:
256 are installing a new kernel with the same version number as your 269 are installing a new kernel with the same version number as your
257 working kernel, make a backup of your modules directory before you 270 working kernel, make a backup of your modules directory before you
258 do a "make modules_install". 271 do a "make modules_install".
272
259 Alternatively, before compiling, use the kernel config option 273 Alternatively, before compiling, use the kernel config option
260 "LOCALVERSION" to append a unique suffix to the regular kernel version. 274 "LOCALVERSION" to append a unique suffix to the regular kernel version.
261 LOCALVERSION can be set in the "General Setup" menu. 275 LOCALVERSION can be set in the "General Setup" menu.
@@ -267,7 +281,7 @@ COMPILING the kernel:
267 - Booting a kernel directly from a floppy without the assistance of a 281 - Booting a kernel directly from a floppy without the assistance of a
268 bootloader such as LILO, is no longer supported. 282 bootloader such as LILO, is no longer supported.
269 283
270 If you boot Linux from the hard drive, chances are you use LILO which 284 If you boot Linux from the hard drive, chances are you use LILO, which
271 uses the kernel image as specified in the file /etc/lilo.conf. The 285 uses the kernel image as specified in the file /etc/lilo.conf. The
272 kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or 286 kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
273 /boot/bzImage. To use the new kernel, save a copy of the old image 287 /boot/bzImage. To use the new kernel, save a copy of the old image
@@ -306,21 +320,21 @@ IF SOMETHING GOES WRONG:
306 320
307 - If the bug results in a message like 321 - If the bug results in a message like
308 322
309 unable to handle kernel paging request at address C0000010 323 unable to handle kernel paging request at address C0000010
310 Oops: 0002 324 Oops: 0002
311 EIP: 0010:XXXXXXXX 325 EIP: 0010:XXXXXXXX
312 eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx 326 eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx
313 esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx 327 esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx
314 ds: xxxx es: xxxx fs: xxxx gs: xxxx 328 ds: xxxx es: xxxx fs: xxxx gs: xxxx
315 Pid: xx, process nr: xx 329 Pid: xx, process nr: xx
316 xx xx xx xx xx xx xx xx xx xx 330 xx xx xx xx xx xx xx xx xx xx
317 331
318 or similar kernel debugging information on your screen or in your 332 or similar kernel debugging information on your screen or in your
319 system log, please duplicate it *exactly*. The dump may look 333 system log, please duplicate it *exactly*. The dump may look
320 incomprehensible to you, but it does contain information that may 334 incomprehensible to you, but it does contain information that may
321 help debugging the problem. The text above the dump is also 335 help debugging the problem. The text above the dump is also
322 important: it tells something about why the kernel dumped code (in 336 important: it tells something about why the kernel dumped code (in
323 the above example it's due to a bad kernel pointer). More information 337 the above example, it's due to a bad kernel pointer). More information
324 on making sense of the dump is in Documentation/oops-tracing.txt 338 on making sense of the dump is in Documentation/oops-tracing.txt
325 339
326 - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump 340 - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
@@ -328,7 +342,7 @@ IF SOMETHING GOES WRONG:
328 sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred). 342 sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
329 This utility can be downloaded from 343 This utility can be downloaded from
330 ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ . 344 ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
331 Alternately you can do the dump lookup by hand: 345 Alternatively, you can do the dump lookup by hand:
332 346
333 - In debugging dumps like the above, it helps enormously if you can 347 - In debugging dumps like the above, it helps enormously if you can
334 look up what the EIP value means. The hex value as such doesn't help 348 look up what the EIP value means. The hex value as such doesn't help
@@ -342,7 +356,7 @@ IF SOMETHING GOES WRONG:
342 the file 'linux/vmlinux'. To extract the namelist and match it against 356 the file 'linux/vmlinux'. To extract the namelist and match it against
343 the EIP from the kernel crash, do: 357 the EIP from the kernel crash, do:
344 358
345 nm vmlinux | sort | less 359 nm vmlinux | sort | less
346 360
347 This will give you a list of kernel addresses sorted in ascending 361 This will give you a list of kernel addresses sorted in ascending
348 order, from which it is simple to find the function that contains the 362 order, from which it is simple to find the function that contains the
@@ -361,7 +375,7 @@ IF SOMETHING GOES WRONG:
361 kernel image or similar), telling me as much about your setup as 375 kernel image or similar), telling me as much about your setup as
362 possible will help. Please read the REPORTING-BUGS document for details. 376 possible will help. Please read the REPORTING-BUGS document for details.
363 377
364 - Alternately, you can use gdb on a running kernel. (read-only; i.e. you 378 - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you
365 cannot change values or set break points.) To do this, first compile the 379 cannot change values or set break points.) To do this, first compile the
366 kernel with -g; edit arch/i386/Makefile appropriately, then do a "make 380 kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
367 clean". You'll also need to enable CONFIG_PROC_FS (via "make config"). 381 clean". You'll also need to enable CONFIG_PROC_FS (via "make config").