Title: Compiling a Linux Kernel with Support for CTI Products
Keywords: Linux, Kernel
Date: September 26, 2007
This document will guide you through a step by step process of compiling a Linux 2.4 or Linux 2.6 kernel with support for CTI products.
NOTE: This guide assumes the following:
- You are using a Linux 2.4 or Linux 2.6 kernel.
- You have the full kernel source on your system, that you have either got from a source RPM or a kernel.org tar.gz package.
- You have development tools installed on your system and are able to compile source code
- You are using the GRUB boot loader
- Any time you see a # in this guide what follows it, is a command that needs to be entered into the terminal
- Go into the source directory which you wish to compile, usually in /usr/src/linux-KERNELVERSION (ie. /usr/src/linux-2.6.30)
# make mrproper
# make menuconfig
- Enable the following:
(Bus Options → PCI Support)
(Device Drivers → Character Devices → Serial drivers → 8250/16550 and compatible serial support)
(Device Drivers → Character Devices → Serial drivers → Extended 8250/16550 serial driver options)
(Device Drivers → Character Devices → Serial drivers → Support more than 4 legacy serial ports)
(Device Drivers → Character Devices → Serial drivers → Support for sharing serial interrupts)
(Device Drivers → Character Devices → Serial drivers → Maximum number of 8250/16550 serial ports to a high number (ex. 64) )
(Device Drivers → Character Devices → Serial drivers → Number of 8250/16550 serial ports to register at run-time to a high number (ex. 64)
# make dep
# make clean
# patch –p1 < /PATCHLOCATION/CTI-PATCHFILE (Optional step: only needed if specified by install guide or readme)
# vi Makefile (Edit The Extra Version Line to be specific for your application ie. -CTI)
# make bzImage
# make modules
# make modules_install
# cp .config /boot/config-MODULENAME
# cp arch/i386/boot/bzImage /boot/vmlinuz-MODULENAME (MODULENAME will need to be the linux kernel version plus the extra version line [ie. 2.6.30-CTI])
# cp System.map /boot/System.map-MODULENAME
# mkinitrd -f /boot/initrd-MODULENAME.img MODULENAME
# vi /boot/grub/grub.conf OR # vi /boot/grub/menu.lst
- Now edit your boot config file to have the newly recompiled kernel listed as an option in it. The easiest way to do this is to copy a previous entry and paste it and make the appropriate changes to the kernel image and ram disk.
- Save your boot config file, reboot your system and select the new kernel from the boot menu.
- Now your finished you should be booted into your new kernel
- If your new kernel is missing some of the modules that were installed in your old kernel, be sure to check the .config of your old kernel in the /boot directory or in the /usr/src/linux-oldkernel
- If you are getting a kernel panic due to root pointing to LABEL=/ or LABEL=/1 try changing that to your specific partition where your kernel image is stored like in /dev/hda3, etc.
- If you to set your number of 8250/16550 serial ports to register at run-time to a number that was not high enough in order for all of your serial ports to be registered, instead of recompiling the kernel you can simple add a boot command parameter to your kernel line in your grub.conf or menu.lst file. Add the following:
Where # is the number of uarts you would like to register, ie. 64.
End of KDB-307