diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-21 08:09:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-24 06:12:35 -0400 |
commit | 44b10006a97ec50874634ba5325a6499ead7db66 (patch) | |
tree | 695cabe8d992568db34ced5c5bc5f613f4e5e8a5 | |
parent | afeb000e1a0596e89174a85c96e890f4f0e802e0 (diff) |
README: convert it to ReST markup
Adjust the readme file for it to use the ReST markup:
- add chapter/section markups;
- use ``foo`` for commands;
- use :: for verbatim and script blocks;
- replace unsupported markup _foo_ by **foo**;
- add cross-references to other ReST files;
- use lower case on the section titles, to match other ReST files.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | README | 105 |
1 files changed, 58 insertions, 47 deletions
@@ -1,10 +1,12 @@ | |||
1 | Linux kernel release 4.x <http://kernel.org/> | 1 | Linux kernel release 4.x <http://kernel.org/> |
2 | ============================================= | ||
2 | 3 | ||
3 | These are the release notes for Linux version 4. Read them carefully, | 4 | These are the release notes for Linux version 4. Read them carefully, |
4 | as they tell you what this is all about, explain how to install the | 5 | as they tell you what this is all about, explain how to install the |
5 | kernel, and what to do if something goes wrong. | 6 | kernel, and what to do if something goes wrong. |
6 | 7 | ||
7 | WHAT IS LINUX? | 8 | What is Linux? |
9 | -------------- | ||
8 | 10 | ||
9 | Linux is a clone of the operating system Unix, written from scratch by | 11 | Linux is a clone of the operating system Unix, written from scratch by |
10 | Linus Torvalds with assistance from a loosely-knit team of hackers across | 12 | Linus Torvalds with assistance from a loosely-knit team of hackers across |
@@ -18,7 +20,8 @@ WHAT IS LINUX? | |||
18 | It is distributed under the GNU General Public License - see the | 20 | It is distributed under the GNU General Public License - see the |
19 | accompanying COPYING file for more details. | 21 | accompanying COPYING file for more details. |
20 | 22 | ||
21 | ON WHAT HARDWARE DOES IT RUN? | 23 | On what hardware does it run? |
24 | ----------------------------- | ||
22 | 25 | ||
23 | Although originally developed first for 32-bit x86-based PCs (386 or higher), | 26 | Although originally developed first for 32-bit x86-based PCs (386 or higher), |
24 | today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and | 27 | today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and |
@@ -34,7 +37,8 @@ ON WHAT HARDWARE DOES IT RUN? | |||
34 | Linux has also been ported to itself. You can now run the kernel as a | 37 | Linux has also been ported to itself. You can now run the kernel as a |
35 | userspace application - this is called UserMode Linux (UML). | 38 | userspace application - this is called UserMode Linux (UML). |
36 | 39 | ||
37 | DOCUMENTATION: | 40 | Documentation |
41 | ------------- | ||
38 | 42 | ||
39 | - There is a lot of documentation available both in electronic form on | 43 | - There is a lot of documentation available both in electronic form on |
40 | the Internet and in books, both Linux-specific and pertaining to | 44 | the Internet and in books, both Linux-specific and pertaining to |
@@ -53,14 +57,15 @@ DOCUMENTATION: | |||
53 | - The Documentation/DocBook/ subdirectory contains several guides for | 57 | - The Documentation/DocBook/ subdirectory contains several guides for |
54 | kernel developers and users. These guides can be rendered in a | 58 | kernel developers and users. These guides can be rendered in a |
55 | number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others. | 59 | number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others. |
56 | After installation, "make psdocs", "make pdfdocs", "make htmldocs", | 60 | After installation, ``make psdocs``, ``make pdfdocs``, ``make htmldocs``, |
57 | or "make mandocs" will render the documentation in the requested format. | 61 | or ``make mandocs`` will render the documentation in the requested format. |
58 | 62 | ||
59 | INSTALLING the kernel source: | 63 | Installing the kernel source |
64 | ---------------------------- | ||
60 | 65 | ||
61 | - If you install the full sources, put the kernel tarball in a | 66 | - If you install the full sources, put the kernel tarball in a |
62 | directory where you have permissions (e.g. your home directory) and | 67 | directory where you have permissions (e.g. your home directory) and |
63 | unpack it: | 68 | unpack it:: |
64 | 69 | ||
65 | xz -cd linux-4.X.tar.xz | tar xvf - | 70 | xz -cd linux-4.X.tar.xz | tar xvf - |
66 | 71 | ||
@@ -74,12 +79,12 @@ INSTALLING the kernel source: | |||
74 | - You can also upgrade between 4.x releases by patching. Patches are | 79 | - You can also upgrade between 4.x releases by patching. Patches are |
75 | distributed in the xz format. To install by patching, get all the | 80 | distributed in the xz format. To install by patching, get all the |
76 | newer patch files, enter the top level directory of the kernel source | 81 | newer patch files, enter the top level directory of the kernel source |
77 | (linux-4.X) and execute: | 82 | (linux-4.X) and execute:: |
78 | 83 | ||
79 | xz -cd ../patch-4.x.xz | patch -p1 | 84 | xz -cd ../patch-4.x.xz | patch -p1 |
80 | 85 | ||
81 | Replace "x" for all versions bigger than the version "X" of your current | 86 | Replace "x" for all versions bigger than the version "X" of your current |
82 | source tree, _in_order_, and you should be ok. You may want to remove | 87 | source tree, **in_order**, and you should be ok. You may want to remove |
83 | the backup files (some-file-name~ or some-file-name.orig), and make sure | 88 | the backup files (some-file-name~ or some-file-name.orig), and make sure |
84 | that there are no failed patches (some-file-name# or some-file-name.rej). | 89 | that there are no failed patches (some-file-name# or some-file-name.rej). |
85 | If there are, either you or I have made a mistake. | 90 | If there are, either you or I have made a mistake. |
@@ -90,12 +95,12 @@ INSTALLING the kernel source: | |||
90 | and you want to apply the 4.0.3 patch, you must not first apply the 4.0.1 | 95 | and you want to apply the 4.0.3 patch, you must not first apply the 4.0.1 |
91 | and 4.0.2 patches. Similarly, if you are running kernel version 4.0.2 and | 96 | and 4.0.2 patches. Similarly, if you are running kernel version 4.0.2 and |
92 | want to jump to 4.0.3, you must first reverse the 4.0.2 patch (that is, | 97 | want to jump to 4.0.3, you must first reverse the 4.0.2 patch (that is, |
93 | patch -R) _before_ applying the 4.0.3 patch. You can read more on this in | 98 | patch -R) **before** applying the 4.0.3 patch. You can read more on this in |
94 | Documentation/applying-patches.txt | 99 | :ref:`Documentation/applying-patches.txt <applying_patches>`. |
95 | 100 | ||
96 | Alternatively, the script patch-kernel can be used to automate this | 101 | Alternatively, the script patch-kernel can be used to automate this |
97 | process. It determines the current kernel version and applies any | 102 | process. It determines the current kernel version and applies any |
98 | patches found. | 103 | patches found:: |
99 | 104 | ||
100 | linux/scripts/patch-kernel linux | 105 | linux/scripts/patch-kernel linux |
101 | 106 | ||
@@ -103,55 +108,58 @@ INSTALLING the kernel source: | |||
103 | kernel source. Patches are applied from the current directory, but | 108 | kernel source. Patches are applied from the current directory, but |
104 | an alternative directory can be specified as the second argument. | 109 | an alternative directory can be specified as the second argument. |
105 | 110 | ||
106 | - Make sure you have no stale .o files and dependencies lying around: | 111 | - Make sure you have no stale .o files and dependencies lying around:: |
107 | 112 | ||
108 | cd linux | 113 | cd linux |
109 | make mrproper | 114 | make mrproper |
110 | 115 | ||
111 | You should now have the sources correctly installed. | 116 | You should now have the sources correctly installed. |
112 | 117 | ||
113 | SOFTWARE REQUIREMENTS | 118 | Software requirements |
119 | --------------------- | ||
114 | 120 | ||
115 | Compiling and running the 4.x kernels requires up-to-date | 121 | Compiling and running the 4.x kernels requires up-to-date |
116 | versions of various software packages. Consult | 122 | versions of various software packages. Consult |
117 | Documentation/Changes for the minimum version numbers required | 123 | :ref:`Documentation/Changes <changes>` for the minimum version numbers |
118 | and how to get updates for these packages. Beware that using | 124 | required and how to get updates for these packages. Beware that using |
119 | excessively old versions of these packages can cause indirect | 125 | excessively old versions of these packages can cause indirect |
120 | errors that are very difficult to track down, so don't assume that | 126 | errors that are very difficult to track down, so don't assume that |
121 | you can just update packages when obvious problems arise during | 127 | you can just update packages when obvious problems arise during |
122 | build or operation. | 128 | build or operation. |
123 | 129 | ||
124 | BUILD directory for the kernel: | 130 | Build directory for the kernel |
131 | ------------------------------ | ||
125 | 132 | ||
126 | When compiling the kernel, all output files will per default be | 133 | When compiling the kernel, all output files will per default be |
127 | stored together with the kernel source code. | 134 | stored together with the kernel source code. |
128 | Using the option "make O=output/dir" allows you to specify an alternate | 135 | Using the option ``make O=output/dir`` allows you to specify an alternate |
129 | place for the output files (including .config). | 136 | place for the output files (including .config). |
130 | Example: | 137 | Example:: |
131 | 138 | ||
132 | kernel source code: /usr/src/linux-4.X | 139 | kernel source code: /usr/src/linux-4.X |
133 | build directory: /home/name/build/kernel | 140 | build directory: /home/name/build/kernel |
134 | 141 | ||
135 | To configure and build the kernel, use: | 142 | To configure and build the kernel, use:: |
136 | 143 | ||
137 | cd /usr/src/linux-4.X | 144 | cd /usr/src/linux-4.X |
138 | make O=/home/name/build/kernel menuconfig | 145 | make O=/home/name/build/kernel menuconfig |
139 | make O=/home/name/build/kernel | 146 | make O=/home/name/build/kernel |
140 | sudo make O=/home/name/build/kernel modules_install install | 147 | sudo make O=/home/name/build/kernel modules_install install |
141 | 148 | ||
142 | Please note: If the 'O=output/dir' option is used, then it must be | 149 | Please note: If the ``O=output/dir`` option is used, then it must be |
143 | used for all invocations of make. | 150 | used for all invocations of make. |
144 | 151 | ||
145 | CONFIGURING the kernel: | 152 | Configuring the kernel |
153 | ---------------------- | ||
146 | 154 | ||
147 | Do not skip this step even if you are only upgrading one minor | 155 | Do not skip this step even if you are only upgrading one minor |
148 | version. New configuration options are added in each release, and | 156 | version. New configuration options are added in each release, and |
149 | odd problems will turn up if the configuration files are not set up | 157 | odd problems will turn up if the configuration files are not set up |
150 | as expected. If you want to carry your existing configuration to a | 158 | as expected. If you want to carry your existing configuration to a |
151 | new version with minimal work, use "make oldconfig", which will | 159 | new version with minimal work, use ``make oldconfig``, which will |
152 | only ask you for the answers to new questions. | 160 | only ask you for the answers to new questions. |
153 | 161 | ||
154 | - Alternative configuration commands are: | 162 | - Alternative configuration commands are:: |
155 | 163 | ||
156 | "make config" Plain text interface. | 164 | "make config" Plain text interface. |
157 | 165 | ||
@@ -223,7 +231,7 @@ CONFIGURING the kernel: | |||
223 | You can find more information on using the Linux kernel config tools | 231 | You can find more information on using the Linux kernel config tools |
224 | in Documentation/kbuild/kconfig.txt. | 232 | in Documentation/kbuild/kconfig.txt. |
225 | 233 | ||
226 | - NOTES on "make config": | 234 | - NOTES on ``make config``: |
227 | 235 | ||
228 | - Having unnecessary drivers will make the kernel bigger, and can | 236 | - Having unnecessary drivers will make the kernel bigger, and can |
229 | under some circumstances lead to problems: probing for a | 237 | under some circumstances lead to problems: probing for a |
@@ -242,22 +250,23 @@ CONFIGURING the kernel: | |||
242 | should probably answer 'n' to the questions for "development", | 250 | should probably answer 'n' to the questions for "development", |
243 | "experimental", or "debugging" features. | 251 | "experimental", or "debugging" features. |
244 | 252 | ||
245 | COMPILING the kernel: | 253 | Compiling the kernel |
254 | -------------------- | ||
246 | 255 | ||
247 | - Make sure you have at least gcc 3.2 available. | 256 | - Make sure you have at least gcc 3.2 available. |
248 | For more information, refer to Documentation/Changes. | 257 | For more information, refer to :ref:`Documentation/Changes <changes>`. |
249 | 258 | ||
250 | Please note that you can still run a.out user programs with this kernel. | 259 | Please note that you can still run a.out user programs with this kernel. |
251 | 260 | ||
252 | - Do a "make" to create a compressed kernel image. It is also | 261 | - Do a ``make`` to create a compressed kernel image. It is also |
253 | possible to do "make install" if you have lilo installed to suit the | 262 | possible to do ``make install`` if you have lilo installed to suit the |
254 | kernel makefiles, but you may want to check your particular lilo setup first. | 263 | kernel makefiles, but you may want to check your particular lilo setup first. |
255 | 264 | ||
256 | To do the actual install, you have to be root, but none of the normal | 265 | To do the actual install, you have to be root, but none of the normal |
257 | build should require that. Don't take the name of root in vain. | 266 | build should require that. Don't take the name of root in vain. |
258 | 267 | ||
259 | - If you configured any of the parts of the kernel as `modules', you | 268 | - If you configured any of the parts of the kernel as ``modules``, you |
260 | will also have to do "make modules_install". | 269 | will also have to do ``make modules_install``. |
261 | 270 | ||
262 | - Verbose kernel compile/build output: | 271 | - Verbose kernel compile/build output: |
263 | 272 | ||
@@ -265,12 +274,12 @@ COMPILING the kernel: | |||
265 | totally silent). However, sometimes you or other kernel developers need | 274 | totally silent). However, sometimes you or other kernel developers need |
266 | to see compile, link, or other commands exactly as they are executed. | 275 | to see compile, link, or other commands exactly as they are executed. |
267 | For this, use "verbose" build mode. This is done by passing | 276 | For this, use "verbose" build mode. This is done by passing |
268 | "V=1" to the "make" command, e.g. | 277 | ``V=1`` to the ``make`` command, e.g.:: |
269 | 278 | ||
270 | make V=1 all | 279 | make V=1 all |
271 | 280 | ||
272 | To have the build system also tell the reason for the rebuild of each | 281 | To have the build system also tell the reason for the rebuild of each |
273 | target, use "V=2". The default is "V=0". | 282 | target, use ``V=2``. The default is ``V=0``. |
274 | 283 | ||
275 | - Keep a backup kernel handy in case something goes wrong. This is | 284 | - Keep a backup kernel handy in case something goes wrong. This is |
276 | especially true for the development releases, since each new release | 285 | especially true for the development releases, since each new release |
@@ -278,7 +287,7 @@ COMPILING the kernel: | |||
278 | backup of the modules corresponding to that kernel, as well. If you | 287 | backup of the modules corresponding to that kernel, as well. If you |
279 | are installing a new kernel with the same version number as your | 288 | are installing a new kernel with the same version number as your |
280 | working kernel, make a backup of your modules directory before you | 289 | working kernel, make a backup of your modules directory before you |
281 | do a "make modules_install". | 290 | do a ``make modules_install``. |
282 | 291 | ||
283 | Alternatively, before compiling, use the kernel config option | 292 | Alternatively, before compiling, use the kernel config option |
284 | "LOCALVERSION" to append a unique suffix to the regular kernel version. | 293 | "LOCALVERSION" to append a unique suffix to the regular kernel version. |
@@ -308,13 +317,14 @@ COMPILING the kernel: | |||
308 | reboot, and enjoy! | 317 | reboot, and enjoy! |
309 | 318 | ||
310 | If you ever need to change the default root device, video mode, | 319 | If you ever need to change the default root device, video mode, |
311 | ramdisk size, etc. in the kernel image, use the 'rdev' program (or | 320 | ramdisk size, etc. in the kernel image, use the ``rdev`` program (or |
312 | alternatively the LILO boot options when appropriate). No need to | 321 | alternatively the LILO boot options when appropriate). No need to |
313 | recompile the kernel to change these parameters. | 322 | recompile the kernel to change these parameters. |
314 | 323 | ||
315 | - Reboot with the new kernel and enjoy. | 324 | - Reboot with the new kernel and enjoy. |
316 | 325 | ||
317 | IF SOMETHING GOES WRONG: | 326 | If something goes wrong |
327 | ----------------------- | ||
318 | 328 | ||
319 | - If you have problems that seem to be due to kernel bugs, please check | 329 | - If you have problems that seem to be due to kernel bugs, please check |
320 | the file MAINTAINERS to see if there is a particular person associated | 330 | the file MAINTAINERS to see if there is a particular person associated |
@@ -328,7 +338,7 @@ IF SOMETHING GOES WRONG: | |||
328 | sense). If the problem is new, tell me so, and if the problem is | 338 | sense). If the problem is new, tell me so, and if the problem is |
329 | old, please try to tell me when you first noticed it. | 339 | old, please try to tell me when you first noticed it. |
330 | 340 | ||
331 | - If the bug results in a message like | 341 | - If the bug results in a message like:: |
332 | 342 | ||
333 | unable to handle kernel paging request at address C0000010 | 343 | unable to handle kernel paging request at address C0000010 |
334 | Oops: 0002 | 344 | Oops: 0002 |
@@ -348,7 +358,7 @@ IF SOMETHING GOES WRONG: | |||
348 | on making sense of the dump is in Documentation/oops-tracing.txt | 358 | on making sense of the dump is in Documentation/oops-tracing.txt |
349 | 359 | ||
350 | - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump | 360 | - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump |
351 | as is, otherwise you will have to use the "ksymoops" program to make | 361 | as is, otherwise you will have to use the ``ksymoops`` program to make |
352 | sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred). | 362 | sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred). |
353 | This utility can be downloaded from | 363 | This utility can be downloaded from |
354 | ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ . | 364 | ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ . |
@@ -358,13 +368,13 @@ IF SOMETHING GOES WRONG: | |||
358 | look up what the EIP value means. The hex value as such doesn't help | 368 | look up what the EIP value means. The hex value as such doesn't help |
359 | me or anybody else very much: it will depend on your particular | 369 | me or anybody else very much: it will depend on your particular |
360 | kernel setup. What you should do is take the hex value from the EIP | 370 | kernel setup. What you should do is take the hex value from the EIP |
361 | line (ignore the "0010:"), and look it up in the kernel namelist to | 371 | line (ignore the ``0010:``), and look it up in the kernel namelist to |
362 | see which kernel function contains the offending address. | 372 | see which kernel function contains the offending address. |
363 | 373 | ||
364 | To find out the kernel function name, you'll need to find the system | 374 | To find out the kernel function name, you'll need to find the system |
365 | binary associated with the kernel that exhibited the symptom. This is | 375 | binary associated with the kernel that exhibited the symptom. This is |
366 | the file 'linux/vmlinux'. To extract the namelist and match it against | 376 | the file 'linux/vmlinux'. To extract the namelist and match it against |
367 | the EIP from the kernel crash, do: | 377 | the EIP from the kernel crash, do:: |
368 | 378 | ||
369 | nm vmlinux | sort | less | 379 | nm vmlinux | sort | less |
370 | 380 | ||
@@ -383,18 +393,19 @@ IF SOMETHING GOES WRONG: | |||
383 | 393 | ||
384 | If you for some reason cannot do the above (you have a pre-compiled | 394 | If you for some reason cannot do the above (you have a pre-compiled |
385 | kernel image or similar), telling me as much about your setup as | 395 | kernel image or similar), telling me as much about your setup as |
386 | possible will help. Please read the REPORTING-BUGS document for details. | 396 | possible will help. Please read the :ref:`REPORTING-BUGS <reportingbugs>` |
397 | document for details. | ||
387 | 398 | ||
388 | - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you | 399 | - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you |
389 | cannot change values or set break points.) To do this, first compile the | 400 | cannot change values or set break points.) To do this, first compile the |
390 | kernel with -g; edit arch/x86/Makefile appropriately, then do a "make | 401 | kernel with -g; edit arch/x86/Makefile appropriately, then do a ``make |
391 | clean". You'll also need to enable CONFIG_PROC_FS (via "make config"). | 402 | clean``. You'll also need to enable CONFIG_PROC_FS (via ``make config``). |
392 | 403 | ||
393 | After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore". | 404 | After you've rebooted with the new kernel, do ``gdb vmlinux /proc/kcore``. |
394 | You can now use all the usual gdb commands. The command to look up the | 405 | You can now use all the usual gdb commands. The command to look up the |
395 | point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes | 406 | point where your system crashed is ``l *0xXXXXXXXX``. (Replace the XXXes |
396 | with the EIP value.) | 407 | with the EIP value.) |
397 | 408 | ||
398 | gdb'ing a non-running kernel currently fails because gdb (wrongly) | 409 | gdb'ing a non-running kernel currently fails because ``gdb`` (wrongly) |
399 | disregards the starting offset for which the kernel is compiled. | 410 | disregards the starting offset for which the kernel is compiled. |
400 | 411 | ||