Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
software:linux:realtime:preempt_rt:build_kernel [2019-02-13 15:54] mgehrig2software:linux:realtime:preempt_rt:build_kernel [2023-04-11 10:56] (aktuell) – gelöscht Urs Graf
Zeile 1: Zeile 1:
-====== Building a preemt-rt kernel ====== 
-===== Introduction ===== 
-The kernel can be easily installed on a running system. During the boot process, the kernel is started with the latest version number by default. If you want to return to an old version, you can select the desired kernel version in the grub menu "Advanced options for Linux Mint". 
- 
-===== Preparation ===== 
-==== Installing the toolchain ==== 
-<code>sudo apt install libncurses5-dev build-essential libssl-dev</code> 
- 
-==== Get the preemt-rt patch ==== 
-Check [[https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/|here]] whether a patch is available for your currently installed kernel. 
-If not, choose the next newer version and download the patch. 
- 
-For example:\\ 
-If you are running a 4.4.165 kernel choose the following patch:\\ 
-[[https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.4/patch-4.4.148-rt166-rc1.patch.gz|patch-4.4.148-rt166-rc1.patch.gz]] 
- 
-If you want to use a kernel version that is not already installed, please install the generic kernel with the correct version with [[software:linux:linux_os:install_old_kernel|this guide]] first. 
- 
-==== Get the Linux sources ==== 
-  * Clone the kernel <code>git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git</code> 
-  * Check out the same version as choosen for the patch <code>git checkout -b RTPatch tags/v4.4.148</code> 
- 
-==== Install the compatible generic kernel ==== 
-For RT-patch v4.4.148-rt166-rc1 install generic kernel 4.4.0 
- 
-[[software:linux:linux_os:install_old_kernel|Instructions]] 
- 
- 
-===== Build the kernel ===== 
-==== Patch the kernel sources ==== 
-  * Go into the kenrel source directory 
-  * Applay the patch<code>cd <pathToKernelSrc> 
-patch -p1 < <pathToPatch>/patch-4.4.148-rt166-rc1.patch</code> 
- 
-==== Choose the build variant ==== 
-This selection will affect, how many modules will be built. 
-The sizef and the range of functions of the monolitic kernel will not be changed. 
-Additional modules can be built and installed after the kernel is installed. 
- 
- 
-  * **a.) Full module support** **(recommended)** A normal Linux distribution, like Ubuntu, will install a kernel and most of the available kernel modules. Many of them are never used, because they are drivers for hardware, wich is not installed on the PC. This variant contains the same modules like a full Ubuntu kernel. 
-  * **b.) Minimal**: This will only build modules which are essential. Some basic function like Wifi drivers may be missing. Some basic Ethernet drive are in the monolitic part of the kernel and will still work. You can add all modules you need manually. 
- 
-==== Configure the kernel ==== 
-=== Full module support === 
-  - Copy the kernel configuration from the generic kernel. 
-    * Make sure you copy the correct config-file with the correct version (i.e. ''config-4.4.0-040400-generic'')<code>cd <pathToKernelSrc> 
-cp /boot/<yourDistributionConfig> 
-make oldconfig</code> 
-