LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-16-2003, 11:48 PM   #1
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Rep: Reputation: 15
How to recompile the linux kernel source code in RH Linux 8?


hi,
I'm running a RH Linux 8 on a P4 desktop.
Under usr/src there is no linux directory, only linux 2.4.18-14 and Red Hat
Where can I find the linux kernel source code?
If the source code is not there, where can I down load it?

Last edited by sceadu; 03-17-2003 at 11:54 PM.
 
Old 03-17-2003, 12:13 AM   #2
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
linux 2.4.18-14 is the linux source code folder. it tells u that kernel version is 2.4.18
 
Old 03-17-2003, 02:55 AM   #3
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
nomally u would want to have /usr/src/linux as a symlink to the actual source directory

do
ln -s /usr/src/linux-2.4.18 /usr/src/linux

when u install new kernel
rm /usr/src/linux
and make symlink to the new kernel directory
 
Old 03-17-2003, 08:41 PM   #4
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Ok, thks pal.
I want to recompile the kernel to include linux frame buffer device.
I have recompile the kernel and move it to boot and rename as linux.vesafb
I have also edit my grub to run this new kernel but I keep getting a file not found. I found that there is a vmlinxz-2.4.18-14 executable file and another vmlinux-2.4.18-14 unknown file but there is no linux.vesafb executable file, only a linux.vesafb unknown file.
Please advise.
 
Old 03-17-2003, 11:59 PM   #5
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Original Poster
Rep: Reputation: 15
This is what I did:
1)make menuconfig
I slect the options to enable frame buffer
2)make dep
3)make bzImage
4)cp arch/i386/boot/bzImage /boot/linux.vesafb
5)Then I edit the grub.config with kwrite:
default=1
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,1)
kernel /linux.vesafb ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.img
title DOS
rootnoverify (hd0,0)
chainloader +1
6) Reboot, select red hat linux, but got tons of errors and failure to start linux

Where did I go wrong?
 
Old 03-18-2003, 12:36 AM   #6
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
what about modules ???. did u copied them also as the kernel readme says..
 
Old 03-18-2003, 01:35 AM   #7
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Original Poster
Rep: Reputation: 15
What modules?
 
Old 03-18-2003, 03:27 AM   #8
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
my advice read the documentation which comes with linux source and you will know the exact process of installing a kernel
 
Old 03-19-2003, 09:44 PM   #9
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
in your grub config
kernel /linux.vesafb

and you have
/boot/linux.vesafb

make them consistant..

and u have to do
make modules
make modules_install
 
Old 03-19-2003, 11:30 PM   #10
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Do I

cd /boot
make modules
make modules_install

?
 
Old 03-20-2003, 01:31 AM   #11
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
no do it in the source directory itself and dont forget to read the README file there
 
Old 03-20-2003, 01:37 AM   #12
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
after step 3 do the commands
 
Old 03-20-2003, 02:36 AM   #13
sceadu
Member
 
Registered: Jan 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Hi MayanKjohri,
Thanks for the pointers, but I'm a bit lost.
This is what I think of the steps to recompile the linux kernel:
1)cd /usr/src/linux
2)make menuconfig
3)make dep
4)make bzImage
5)make modules
6)make modules_install
7)cp arch/i386/boot/bzImage /boot/linux.vesafb
8) reconfig grub to:
kernel /linux.vesafb

What does make modules and make modules_install do? Do I need to copy any files to /boot?
 
Old 03-20-2003, 02:48 AM   #14
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
If u read the README file its there in the installing kernel section. I also dont have the file with me presently. I can tell u tomorrow. But most of the steps are now in right order. try with them and we will see.
But read the README file which comes with source
 
Old 03-20-2003, 03:29 AM   #15
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
sceadu
you don't have to repeat the make xconfig, bzImage and etc
just cd /usr/src/linux
make modules && make modules_install

7)cp arch/i386/boot/bzImage /boot/linux.vesafb
8) reconfig grub to:
kernel /linux.vesafb

this is wrong
either cp your bzImage to /linux.vesafb
or configure grub to: kernel /boot/linux.vesafb

what distro r u using by the way?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Different source code (linux kernel) in Win & linux isilinux Linux - General 3 11-01-2007 05:15 PM
How do I install the Linux kernel source code?? thearchitect Linux - Newbie 3 08-13-2005 12:07 AM
source code for the latest linux kernel k1ll3r_x General 5 03-02-2005 10:49 PM
linux kernel source code legolas_t Programming 1 09-17-2004 06:13 AM
Where can I find the Linux Ping source code? johnsont Programming 1 09-08-2003 02:44 PM


All times are GMT -5. The time now is 03:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration