| .. | .. |
|---|
| 1 | 1 | .. _readme: |
|---|
| 2 | 2 | |
|---|
| 3 | | -Linux kernel release 4.x <http://kernel.org/> |
|---|
| 3 | +Linux kernel release 5.x <http://kernel.org/> |
|---|
| 4 | 4 | ============================================= |
|---|
| 5 | 5 | |
|---|
| 6 | | -These are the release notes for Linux version 4. Read them carefully, |
|---|
| 6 | +These are the release notes for Linux version 5. Read them carefully, |
|---|
| 7 | 7 | as they tell you what this is all about, explain how to install the |
|---|
| 8 | 8 | kernel, and what to do if something goes wrong. |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | - There are various README files in the Documentation/ subdirectory: |
|---|
| 53 | 53 | these typically contain kernel-specific installation notes for some |
|---|
| 54 | | - drivers for example. See Documentation/00-INDEX for a list of what |
|---|
| 55 | | - is contained in each file. Please read the |
|---|
| 54 | + drivers for example. Please read the |
|---|
| 56 | 55 | :ref:`Documentation/process/changes.rst <changes>` file, as it |
|---|
| 57 | 56 | contains information about the problems, which may result by upgrading |
|---|
| 58 | 57 | your kernel. |
|---|
| .. | .. |
|---|
| 64 | 63 | directory where you have permissions (e.g. your home directory) and |
|---|
| 65 | 64 | unpack it:: |
|---|
| 66 | 65 | |
|---|
| 67 | | - xz -cd linux-4.X.tar.xz | tar xvf - |
|---|
| 66 | + xz -cd linux-5.x.tar.xz | tar xvf - |
|---|
| 68 | 67 | |
|---|
| 69 | 68 | Replace "X" with the version number of the latest kernel. |
|---|
| 70 | 69 | |
|---|
| .. | .. |
|---|
| 73 | 72 | files. They should match the library, and not get messed up by |
|---|
| 74 | 73 | whatever the kernel-du-jour happens to be. |
|---|
| 75 | 74 | |
|---|
| 76 | | - - You can also upgrade between 4.x releases by patching. Patches are |
|---|
| 75 | + - You can also upgrade between 5.x releases by patching. Patches are |
|---|
| 77 | 76 | distributed in the xz format. To install by patching, get all the |
|---|
| 78 | 77 | newer patch files, enter the top level directory of the kernel source |
|---|
| 79 | | - (linux-4.X) and execute:: |
|---|
| 78 | + (linux-5.x) and execute:: |
|---|
| 80 | 79 | |
|---|
| 81 | | - xz -cd ../patch-4.x.xz | patch -p1 |
|---|
| 80 | + xz -cd ../patch-5.x.xz | patch -p1 |
|---|
| 82 | 81 | |
|---|
| 83 | | - Replace "x" for all versions bigger than the version "X" of your current |
|---|
| 82 | + Replace "x" for all versions bigger than the version "x" of your current |
|---|
| 84 | 83 | source tree, **in_order**, and you should be ok. You may want to remove |
|---|
| 85 | 84 | the backup files (some-file-name~ or some-file-name.orig), and make sure |
|---|
| 86 | 85 | that there are no failed patches (some-file-name# or some-file-name.rej). |
|---|
| 87 | 86 | If there are, either you or I have made a mistake. |
|---|
| 88 | 87 | |
|---|
| 89 | | - Unlike patches for the 4.x kernels, patches for the 4.x.y kernels |
|---|
| 88 | + Unlike patches for the 5.x kernels, patches for the 5.x.y kernels |
|---|
| 90 | 89 | (also known as the -stable kernels) are not incremental but instead apply |
|---|
| 91 | | - directly to the base 4.x kernel. For example, if your base kernel is 4.0 |
|---|
| 92 | | - and you want to apply the 4.0.3 patch, you must not first apply the 4.0.1 |
|---|
| 93 | | - and 4.0.2 patches. Similarly, if you are running kernel version 4.0.2 and |
|---|
| 94 | | - want to jump to 4.0.3, you must first reverse the 4.0.2 patch (that is, |
|---|
| 95 | | - patch -R) **before** applying the 4.0.3 patch. You can read more on this in |
|---|
| 90 | + directly to the base 5.x kernel. For example, if your base kernel is 5.0 |
|---|
| 91 | + and you want to apply the 5.0.3 patch, you must not first apply the 5.0.1 |
|---|
| 92 | + and 5.0.2 patches. Similarly, if you are running kernel version 5.0.2 and |
|---|
| 93 | + want to jump to 5.0.3, you must first reverse the 5.0.2 patch (that is, |
|---|
| 94 | + patch -R) **before** applying the 5.0.3 patch. You can read more on this in |
|---|
| 96 | 95 | :ref:`Documentation/process/applying-patches.rst <applying_patches>`. |
|---|
| 97 | 96 | |
|---|
| 98 | 97 | Alternatively, the script patch-kernel can be used to automate this |
|---|
| .. | .. |
|---|
| 115 | 114 | Software requirements |
|---|
| 116 | 115 | --------------------- |
|---|
| 117 | 116 | |
|---|
| 118 | | - Compiling and running the 4.x kernels requires up-to-date |
|---|
| 117 | + Compiling and running the 5.x kernels requires up-to-date |
|---|
| 119 | 118 | versions of various software packages. Consult |
|---|
| 120 | 119 | :ref:`Documentation/process/changes.rst <changes>` for the minimum version numbers |
|---|
| 121 | 120 | required and how to get updates for these packages. Beware that using |
|---|
| .. | .. |
|---|
| 133 | 132 | place for the output files (including .config). |
|---|
| 134 | 133 | Example:: |
|---|
| 135 | 134 | |
|---|
| 136 | | - kernel source code: /usr/src/linux-4.X |
|---|
| 135 | + kernel source code: /usr/src/linux-5.x |
|---|
| 137 | 136 | build directory: /home/name/build/kernel |
|---|
| 138 | 137 | |
|---|
| 139 | 138 | To configure and build the kernel, use:: |
|---|
| 140 | 139 | |
|---|
| 141 | | - cd /usr/src/linux-4.X |
|---|
| 140 | + cd /usr/src/linux-5.x |
|---|
| 142 | 141 | make O=/home/name/build/kernel menuconfig |
|---|
| 143 | 142 | make O=/home/name/build/kernel |
|---|
| 144 | 143 | sudo make O=/home/name/build/kernel modules_install install |
|---|
| .. | .. |
|---|
| 210 | 209 | store the lsmod of that machine into a file |
|---|
| 211 | 210 | and pass it in as a LSMOD parameter. |
|---|
| 212 | 211 | |
|---|
| 212 | + Also, you can preserve modules in certain folders |
|---|
| 213 | + or kconfig files by specifying their paths in |
|---|
| 214 | + parameter LMC_KEEP. |
|---|
| 215 | + |
|---|
| 213 | 216 | target$ lsmod > /tmp/mylsmod |
|---|
| 214 | 217 | target$ scp /tmp/mylsmod host:/tmp |
|---|
| 215 | 218 | |
|---|
| 216 | | - host$ make LSMOD=/tmp/mylsmod localmodconfig |
|---|
| 219 | + host$ make LSMOD=/tmp/mylsmod \ |
|---|
| 220 | + LMC_KEEP="drivers/usb:drivers/gpu:fs" \ |
|---|
| 221 | + localmodconfig |
|---|
| 217 | 222 | |
|---|
| 218 | 223 | The above also works when cross compiling. |
|---|
| 219 | 224 | |
|---|
| 220 | 225 | "make localyesconfig" Similar to localmodconfig, except it will convert |
|---|
| 221 | | - all module options to built in (=y) options. |
|---|
| 226 | + all module options to built in (=y) options. You can |
|---|
| 227 | + also preserve modules by LMC_KEEP. |
|---|
| 222 | 228 | |
|---|
| 223 | 229 | "make kvmconfig" Enable additional options for kvm guest kernel support. |
|---|
| 224 | 230 | |
|---|
| .. | .. |
|---|
| 228 | 234 | "make tinyconfig" Configure the tiniest possible kernel. |
|---|
| 229 | 235 | |
|---|
| 230 | 236 | You can find more information on using the Linux kernel config tools |
|---|
| 231 | | - in Documentation/kbuild/kconfig.txt. |
|---|
| 237 | + in Documentation/kbuild/kconfig.rst. |
|---|
| 232 | 238 | |
|---|
| 233 | 239 | - NOTES on ``make config``: |
|---|
| 234 | 240 | |
|---|
| .. | .. |
|---|
| 252 | 258 | Compiling the kernel |
|---|
| 253 | 259 | -------------------- |
|---|
| 254 | 260 | |
|---|
| 255 | | - - Make sure you have at least gcc 3.2 available. |
|---|
| 261 | + - Make sure you have at least gcc 4.9 available. |
|---|
| 256 | 262 | For more information, refer to :ref:`Documentation/process/changes.rst <changes>`. |
|---|
| 257 | 263 | |
|---|
| 258 | 264 | Please note that you can still run a.out user programs with this kernel. |
|---|
| .. | .. |
|---|
| 316 | 322 | reboot, and enjoy! |
|---|
| 317 | 323 | |
|---|
| 318 | 324 | If you ever need to change the default root device, video mode, |
|---|
| 319 | | - ramdisk size, etc. in the kernel image, use the ``rdev`` program (or |
|---|
| 320 | | - alternatively the LILO boot options when appropriate). No need to |
|---|
| 321 | | - recompile the kernel to change these parameters. |
|---|
| 325 | + etc. in the kernel image, use your bootloader's boot options |
|---|
| 326 | + where appropriate. No need to recompile the kernel to change |
|---|
| 327 | + these parameters. |
|---|
| 322 | 328 | |
|---|
| 323 | 329 | - Reboot with the new kernel and enjoy. |
|---|
| 324 | 330 | |
|---|