LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Kernel Compile (https://www.linuxquestions.org/questions/fedora-35/kernel-compile-559889/)

odaeng78 06-07-2007 07:45 AM

Kernel Compile
 
Dear all.

I'm trying to practice kernel compiling, but facing many obstacles.

1. Isn't the source supposed to be in /usr/src/?
because my /usr/src/ is empty, but kernel-2.6.18-1....rpm IS indeed installed.
Where can I find the source for the existing kernel on my system?
(I mean I know I can find it from www.kernel.org)

2.Is there any detailed URL or anything helpful so that I can follow step by step and get myself used to the compiling process by repeating it many times?

Thanks.

mjmwired 06-07-2007 08:21 AM

Are you sure you installed the kernel SRC rpm correctly?
http://www.mjmwired.net/resources/mj...html#kernelsrc

trashbird1240 06-07-2007 08:30 AM

Are you sure you actually have the source code?

(remember that you'll be hearing from people who've made the same mistakes you might be making ;))

Joel

weibullguy 06-07-2007 08:59 AM

As already asked, did you install the source rpm?

AFAIK, if you use yum it will be installed in the /usr/src hierarchy. Looking at the instructions that mjmwired posted, it appears that is the case. Of course, the problem with the source being there is you have to be 'root' to build a new kernel. There's no need to be root to compile a kernel; it's not some sort of super-special code that requires elevated permissions. Fortunately, the kernel source code doesn't have to be there. You can put the source in your home directory or anywhere else you want (and have permissions).

The process is not so involved or difficult that you would need to repeat it over and over to "get used to it."

odaeng78 06-07-2007 11:48 AM

Interesting.. and was a great help..
 
Before, I checked that kernel and kernel-headers were installed.

But I was missing kernel-devel which has no dependency with any other pkgs.
After I installed kernel-devel, I see /usr/src/kernels/2.6.18-1.2798.fc6-i686/ and bunch of stuff in that directory.

And mjmwired,
1. /usr/src/redhat/BUILD/kernel-2.6.18/ is the source dir? or is it something you get after doing rpmbuild?
cuz, I got directory named different like said above for the source.
2. and What do you mean by preparing the source? If it is not prepared, then I can't compile the kernel?
What does it preparing the source for?


All times are GMT -5. The time now is 03:07 PM.