Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
software:linux:realtime:preempt_rt:build_kernel [2019-02-13 15:55] – mgehrig2 | software:linux:realtime:preempt_rt:build_kernel [2019-02-15 10:52] – mgehrig2 | ||
---|---|---|---|
Zeile 19: | Zeile 19: | ||
==== Get the Linux sources ==== | ==== Get the Linux sources ==== | ||
* Clone the kernel < | * Clone the kernel < | ||
- | * Check out the same version as choosen | + | * Check out the same version as chosen |
==== Install the compatible generic kernel ==== | ==== Install the compatible generic kernel ==== | ||
Zeile 25: | Zeile 25: | ||
[[software: | [[software: | ||
+ | |||
===== Build the kernel ===== | ===== Build the kernel ===== | ||
==== Patch the kernel sources ==== | ==== Patch the kernel sources ==== | ||
- | * Go into the kenrel | + | * Go into the kernel |
- | * Applay | + | * Apply the patch< |
patch -p1 < < | patch -p1 < < | ||
Zeile 39: | Zeile 40: | ||
- | * **a.) Full module support** **(recommended)** A normal Linux distribution, | + | * **a.) Full module support** **(The easy way)** A normal Linux distribution, |
- | * **b.) Minimal**: This will only build modules which are essential. Some basic function | + | * **b.) Minimal**: |
==== Configure the kernel ==== | ==== Configure the kernel ==== | ||
- | === Full module support === | + | === a.) Full module support === |
- Copy the kernel configuration from the generic kernel. | - Copy the kernel configuration from the generic kernel. | ||
* Make sure you copy the correct config-file with the correct version (i.e. '' | * Make sure you copy the correct config-file with the correct version (i.e. '' | ||
- | cp / | + | cp / |
- Applay the configuration to the patched kernel sources.< | - Applay the configuration to the patched kernel sources.< | ||
- | | + | |
+ | |||
+ | |||
+ | === b.) Minimal === | ||
+ | You have three different options: | ||
+ | * **1.)** Configure the kernel to add only the bare minimum. Add all additional modules manually. | ||
+ | * **2.)** Configure the kernel to add all modules, which are currently loaded on the host pc. | ||
+ | * **3.)** Configure the kernel to add all modules, which are currently loaded on a different pc. | ||
+ | |||
+ | == 1.) Bare minimum == | ||
+ | - '' | ||
+ | - Depending on the CPU architecture: | ||
+ | - X86 - 64bit '' | ||
+ | - X86 - 32bit '' | ||
+ | - See ''< | ||
+ | - Open the configuration menu '' | ||
+ | - Add all modules and drivers you need. | ||
+ | |||
+ | == 2.) Copy module configuration from host == | ||
+ | - '' | ||
+ | - '' | ||
+ | - Open the configuration menu '' | ||
+ | - Add all additional modules and drivers you need. | ||
+ | |||
+ | **Note**: Most modules are only loaded when they are needed. | ||
+ | |||
+ | |||
+ | == 3.) Copy module configuration from a different machine == | ||
+ | On target machine (with generic kernel loaded): | ||
+ | - '' | ||
+ | |||
+ | On host: | ||
+ | - '' | ||
+ | - Copy the '// | ||
+ | - '' | ||
+ | - '' | ||
+ | - Open the configuration menu '' | ||
+ | - Add all additional modules and drivers you need. | ||
+ | |||
+ | === Additional configurations === | ||
+ | - Open the configuration menu < | ||
+ | - Enable the fully preemptible kernel (The path may be different depending on the kernel version) | ||
+ | * Processor type and features ---> Preemption | ||
+ | * or | ||
+ | * Kernel options | ||
+ | - Deactivate expert mode | ||
+ | - General setup ---> **[ ] Configure standard kernel features (expert users)** | ||
+ | - Save the configuration and exit the menu | ||
+ | |||
+ | |||
+ | |||
+ | ==== Make and install the kernel ==== | ||
+ | This will going to take about an hour. | ||
+ | |||
+ | - Compile kernel < | ||
+ | - Compile modules < | ||
+ | - Install kernel modules < | ||
+ | - Install kernel < | ||
+ | - Reboot | ||
+ | - Check with '' | ||