..rpm"
These commands will install your kernel in /boot, create a new initramfs to bootstrap your kernel, and automatically add your new kernel to your grub bootloader "menu.lst". At this point, you can reboot to give control to your new kernel.
Building Only Kernel Modules (Out Of Tree Modules)
This section needs to be updated and fleshed out
This section is for users who are only interested in working on a kernel module, and who do not wish to build an entire custom kernel. It is not necessary to download and rebuild the entire kernel in order to build a module. To build a module for the currently running kernel, only the matching kernel-devel package is required. Run the following command to install the kernel-devel package using yum.
>>>> su -c 'yum install kernel-devel'
You may need to install 'kernel-PAE-devel' if you are using the PAE kernel
You can build against any kernel version, as long as you have kernel and kernel-devel packages installed for that version. The rest of this section assumes we're building for the running kernel; if not, replace `uname -r` with the desired version number.
The kernel-doc package contains official Kbuild documentation - see files under Documentation/kbuild, in particular the modules.txt file.
As a simple example, to build the foo.ko module from foo.c, create the following Makefile in the directory containing the foo.c file:
>>>> obj-m := foo.o
>>>>
>>>> KDIR := /lib/modules/$(shell uname -r)/build
>>>> PWD := $(shell pwd)
>>>>
>>>> default:
>>>> [TAB]$(MAKE) -C $(KDIR) M=$(PWD) modules
[TAB] Denotes a tab character which must come first for makefile lines containing commands.
Then, issue the make command to build the foo.ko module.
The above is a helpful local Makefile wrapper invoking kbuild; in general you can simply do things like
>>>> # make -C /lib/modules/`uname -r`/build M=`pwd` modules
>>>> # make -C /lib/modules/`uname -r`/build M=`pwd` clean
>>>> # make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
etc to build those targets.