GithubHelp home page GithubHelp logo

build-linux-rt-kernel's Introduction

Build-Linux-Rt-Kernel

This tutorial is shows how to build a Preempt_RT Linux Kernel

1. Get Dependencies!

$ sudo apt-get build-dep linux (you should enable dependency repositories)
$ sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf fakeroot

2. Download Rt Patch and Kernel

IMPORTANT NOTE!
The Rt Patch and Kernel must be same version!
Also (for this tutorial) you must download higher version kernel than yours. So check it by write on terminal :
$ uname -a
For Rt Patch :
http://cdn.kernel.org/pub/linux/kernel/projects/rt/
For Kernel :
http://cdn.kernel.org/pub/linux/kernel/
For this tutorial version;
File type must be "tar.xz" for both of them.

3. Preparing for build

After download you have 2 tar.xz files like this:
Uppercase X's are must be numbers.
[1]) linux-X.X.X.tar.xz
[2]) patch-X.X.X-rtX.patch.xz or patch-X.X.X-rtX-rcX.patch.xz.

  • Take this files into same folder.
  • You must be sure that you have enough space on disk(around 35-40gb but may change between versions).
  • Open terminal inside this folder.
  • Extract kernel :
    $ tar -xf [kernel package filename]
  • Go to extracted kernel folder :
    $ cd [kernel package foldername]
  • Extract RT patch and patch to kernel :
    $ xzcat ../[rt patch filename] | patch -p1
  • Copy your systems config to extracted kernel folder :
    $ cp /boot/config[kernel name] .config
    (Important note: You must copy config that lower version than downloaded new kernel!)
  • Prepare config for new kernel :
    make oldconfig
    After writing this you should see question with choices and choose Fully Preemptible Kernel(Should be 4th option but not sure.)
    Then press enter for all or if you know anything about asking thing you can answer it but i'm not responsible for that.

4. Build

  • Disable old config keys for new build :
    scripts/config --disable SYSTEM_REVOCATION_KEYS
    scripts/config --disable SYSTEM_TRUSTED_KEYS
    scripts/config --disable CONFIG_DEBUG_INFO_BTF
  • Finally build it!
    make -j[core count] deb-pkg (You should write your cpu's core count after -j option ex; make -j8 deb-pkg).

Note: Build process taking so much time. Please be patient.
You should know that, if you build it on your first try you're so lucky person!

build-linux-rt-kernel's People

Contributors

advancel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.