Compiling Linux Kernel 2.4.x
Home Page
After you will compile kernel for tenths time you will become expert :)
(This information can be used for any other kernel from
2.2.x to 2.4.x)
02/ Download conf2432 file
for Kernel 2.4.32 here
03/ Open some terminal window in KDE environment and switch to root prompt
04/ Put both downloaded files to /usr/src
directory
05/ Decompress downloaded file linux-2.4.32.tar.bz2 with
tar xvjf linux-2.4.32.tar.bz2
06/ Decompress downloaded file conf2432.tar.gz with
tar xvzf conf2432.tar.gz
07/ Copy decompressed config file conf2432
to created subdirectory
/usr/src/linux-2.4.32
08/ Enter to created subdirectory /usr/src/linux-2.4.32
09/ Run command make xconfig
in KDE terminal window as root
10/ There will apear window Linux Kernel Configuration with many buttons.
Click on button Load Configuration from File
11/ Put into row after "Enter filename:" conf2432
and then OK
12/ Click on button Network device support
then click on button
Ethernet (10 or 100 Mbit) then find your
own ethernet card you use for connecting to outside internet
and mark it as "m"
For examaple you are using Realtek 8139 card so find the row:
RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)
and click on the left side on "m" (to make it as modul).
Also for next row
RealTek RTL-8139 PCI Fast Ethernet Adaper support
click on "m".
13/Click down on button OK
and on next subwindow on button Main Menu
14/Click on button Sound
and find your own sound card for exmaple
S3 SonicVibes and click on "m" on the left side.
If you find your card which is already marked as "m" then do not change it.
15/ Click on Main Menu
then click on button Save and Exit.
There will appear window with text
End of Linux kernel configuration. Check the
top-level MakeFile for additional configuration. Next you must run 'make dep'
16/ Click OK
This is the end of the first part of compilation.
REMARK
Depending to computer architecture and kernel version it can be usefull
to pass all buttons in the Kernel Configuration and make modules "m" or
put in the new kernel directly with "y" your computer components and processes.
Most of these points it is recommendable to make as modules "m".
If you put them direct to kernel with "y" the new compiled kernel will be
very large and will slow running the system.
But for the beginners do not do this operation at fist time.
Next second part are 2 steps of the own compilation with following commands
(we stay in terminal window as root # and directory /usr/src/linux-2.4.32):
Each step below can last upto hours depending how fast processor
you have and how many modules you marked to be made.
17/ make dep clean bzImage
18/ make modules modules_install
This is the end of the second part of compilation
Next third part is to install proper compiled files into the system
19/ From present directory /usr/src/linux-2.4.32 copy file
System.map as
System.map-2.4.32 to directory /boot
cp System.map /boot/System.map-2.4.32
20/ Change to subdirectory
/usr/src/linux-2.4.32/arch/i386/boot
and copy file bzImage
as vmlinuz-2.4.32
to directory /boot
cp bzImage /boot/vmlinuz-2.4.32
21/ Change to directory /boot and check if there are those 2 copied
files
/boot/vmlinuz-2.4.32
/boot/System.map-2.4.32
22/ Add with your favorite editor (maybe editor "mc") to file
/etc/lilo.conf
folowing basic rows (could be at the end of text):
image=/boot/vmlinuz-2.4.32
label="linux2432"
root=/dev/hda? (?=the number of your linux hda)
read-only
23/ Run command lilo from the root prompt
24/ Restart your Linux and in the starting lilo table choose
linux2432.
It will start with your new compiled kernel 2.4.32.
This is end of compilation process. If there will be any problems during
the compilation, you look what kind of error is declared and repeat
to make kernel configuration to correct proper parameters. If there are
any questions,
please send me email showing:
1/ your linux distribution name
2/ original kernel version
3/ computer processor speed
4/ RAM memory size
5/ exact error text declaration showed during the compilation process
6/ at which step the error occured
73
Libor