Difference between revisions of "Debian-kernel"
From Bashlinux
Line 37: | Line 37: | ||
# Go to the linux source folder |
# Go to the linux source folder |
||
# Configure the kernel, if necessary `make menuconfig` |
# Configure the kernel, if necessary `make menuconfig` |
||
− | # |
+ | #* Backup the old config file |
<pre><nowiki> |
<pre><nowiki> |
||
Line 44: | Line 44: | ||
</nowiki></pre> |
</nowiki></pre> |
||
− | + | * When finish save your changes |
|
− | + | * Build the bzImage |
|
<pre><nowiki> |
<pre><nowiki> |
||
Line 52: | Line 52: | ||
</nowiki></pre> |
</nowiki></pre> |
||
− | + | * If only modules are needed, then use `make modules` |
|
− | + | * Install the modules |
|
<pre><nowiki> |
<pre><nowiki> |
Revision as of 03:47, 17 October 2010
Real-Time Vanilla Kernel
Get sources and setup environment
- Create `vanilla` folder in `/usr/src` and change directory to such location
mkdir -p /usr/src/vanilla cd !$
- 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
tar jxvf *.bz2
- Patch the kernel
cd linux-2.6.AA.BB patch -p1 <../patch-2.6.AA.BB-rtNN
- Create a link `linux` which points to the linux kernel sources
ln -s /usr/src/vanilla/linux-2.6.AA.BB /usr/src/linux
Build Kernel
- Go to the linux source folder
- Configure the kernel, if necessary `make menuconfig`
- Backup the old config file
cd /usr/src/linux cp .config config.yy-mm-dd
- When finish save your changes
- Build the bzImage
cd /usr/src/linux make
- If only modules are needed, then use `make modules`
- Install the modules
make modules_install
- Install the kernel, usually locate on `arch/MY_ARCH/boot` in kernel sources
cp arch/MY_ARCH/boot/bzImage /boot/vmlinuz-2.6.AA.BB-rtNN
- Create initial root filesystem
cd /usr/src/linux update-inintramfs -c -k 2.6.AA-BB-rtNN
- Add the proper entry to grub in `/boot/grub/menu.lst`
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
- 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.