LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where to find the linux kernel source code in RH Linux 8? (https://www.linuxquestions.org/questions/linux-newbie-8/where-to-find-the-linux-kernel-source-code-in-rh-linux-8-a-50209/)

sceadu 03-16-2003 11:48 PM

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?

mayankjohri 03-17-2003 12:13 AM

linux 2.4.18-14 is the linux source code folder. it tells u that kernel version is 2.4.18

doublefailure 03-17-2003 02:55 AM

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

sceadu 03-17-2003 08:41 PM

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.

sceadu 03-17-2003 11:59 PM

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?

mayankjohri 03-18-2003 12:36 AM

what about modules ???. did u copied them also as the kernel readme says..

sceadu 03-18-2003 01:35 AM

What modules?:Pengy:

mayankjohri 03-18-2003 03:27 AM

my advice read the documentation which comes with linux source and you will know the exact process of installing a kernel

doublefailure 03-19-2003 09:44 PM

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

sceadu 03-19-2003 11:30 PM

Do I

cd /boot
make modules
make modules_install

?:study:

mayankjohri 03-20-2003 01:31 AM

no do it in the source directory itself and dont forget to read the README file there

mayankjohri 03-20-2003 01:37 AM

after step 3 do the commands

sceadu 03-20-2003 02:36 AM

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?

mayankjohri 03-20-2003 02:48 AM

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

doublefailure 03-20-2003 03:29 AM

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?


All times are GMT -5. The time now is 06:37 PM.