Debian-kernel: Difference between revisions

From Bashlinux
Jump to navigationJump to search
Content deleted Content added
Manpaz (talk | contribs)
No edit summary
Manpaz (talk | contribs)
Redirected page to Debian Kernel setup
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
#REDIRECT [[Debian Kernel setup]]
__NOTOC__
= Real-Time Vanilla Kernel =

== Get sources and setup environment ==
# Create `vanilla` folder in `/usr/src` and change directory to such location
<pre><nowiki>
mkdir -p /usr/src/vanilla
cd !$
</nowiki></pre>

# Download the latest rt patch
http://www.kernel.org/pub/linux/kernel/projects/rt/
# Download the matched kernel for the proper patch downloaded in previous step
http://www.kernel.org/pub/linux/kernel/v2.6/
# Decompress both, the linux kernel sources and the patch
<pre><nowiki>
tar jxvf *.bz2
</nowiki></pre>

# Patch the kernel
<pre><nowiki>
cd linux-2.6.AA.BB
patch -p1 <../patch-2.6.AA.BB-rtNN
</nowiki></pre>

# Create a link `linux` which points to the linux kernel sources
<pre><nowiki>
ln -s /usr/src/vanilla/linux-2.6.AA.BB /usr/src/linux
</nowiki></pre>


== Build Kernel ==
# Go to the linux source folder
# Configure the kernel, if necessary `make menuconfig`
## Backup the old config file
<pre><nowiki>
cd /usr/src/linux
cp .config config.yy-mm-dd
</nowiki></pre>

# When finish save your changes
# Build the bzImage
<pre><nowiki>
cd /usr/src/linux
make
</nowiki></pre>

# If only modules are needed, then use `make modules`
# Install the modules
<pre><nowiki>
make modules_install
</nowiki></pre>

# Install the kernel, usually locate on `arch/MY_ARCH/boot` in kernel sources
<pre><nowiki>
cp arch/MY_ARCH/boot/bzImage /boot/vmlinuz-2.6.AA.BB-rtNN
</nowiki></pre>

# Create initial root filesystem
<pre><nowiki>
cd /usr/src/linux
update-inintramfs -c -k 2.6.AA-BB-rtNN
</nowiki></pre>

# Add the proper entry to grub in `/boot/grub/menu.lst`
<pre><nowiki>
title RT kernel 2.6.AA.BB-rtNN
root (hd0,0)
kernel /boot/vmlinuz-2.6.AA.BB-rtNN root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.AA.BB-rtNN
</nowiki></pre>

* '''TIP:''' if `default` parameter is set to `0` at the beginning of the `menu.lst` file, then try to put this entry at the top of the entries list.

Latest revision as of 05:45, 12 June 2015