1830160 Members
4236 Online
109999 Solutions
New Discussion

Re: kernel

 
SOLVED
Go to solution
Chapaya
Frequent Advisor

kernel

Hi ,
i installed RH AS4 kernel 2.6.9-34EL .
I want to compile my kernel ( for practice) ,
but /usr/sec is empty :
1. what rpm i should install ?
2. i cant run : make config , make menuconfig or make xconfig , why ?

Thanks
8 REPLIES 8
Steven E. Protter
Exalted Contributor
Solution

Re: kernel

Shalom eran,

You need to install the kernel source packages from the cd's.

They are named the same as the kernel on cd 2 and have the name source in them.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matti_Kurkela
Honored Contributor

Re: kernel

I assume you mean /usr/src, right?

1.) The package to install is kernel-devel-.rpm as appropriate to your kernel version. In your case, it would be something like: kernel-devel-2.6.9-34EL.rpm.
You probably also need kernel-.src.rpm.

2.) "make" is a general-purpose tool which gets its instructions from a specific file (usually named "Makefile" or "makefile") in the current directory. Linux kernel sources have a very complex Makefile which can start up various tools to display a graphic ("make xconfig") or text-based ("make menuconfig") view of kernel configuration settings, among other things.

Without kernel sources installed (or if you run the "make" command in a wrong directory), "make" is not going to find the instructions on how to "make config", "make menuconfig" or "make xconfig".
MK
Chapaya
Frequent Advisor

Re: kernel


Thanks Steven and Mati ,
i came from HP-UX world ,
What are the steps for compiling kernel ?


Eran
Ivan Ferreira
Honored Contributor

Re: kernel

After you have installed the kernel source tree (See Release Notes for information about how to do that)

cd /usr/src/linux
# Save your current kernel config file (default)
cp .config config.bak
make mrproper
#Restore the default configuration file
cp config.bak .config
# Configure the kernel options
make menuconfig
# Build the kernel and modules
make dep clean bzImage modules modules_install
# Install the kernel
make install
reboot
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Chapaya
Frequent Advisor

Re: kernel


Thank you all !!!
Chapaya
Frequent Advisor

Re: kernel


Hi,

I cant find kernel source in www.kernel.org
Steven E. Protter
Exalted Contributor

Re: kernel

Whoa!

You don't need to go to a website for the kernel source.

Once you install the rpm's I recommend you have the kernel source on your system.

If you installed RH, you have access to the rpms.

Best you use what came with the distribution.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor

Re: kernel

As Matti and Ivan mentioned, you should install kernel SRPM package in order to get kernel sources.
Here you can read in details about this [a little tricky] process:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/release-notes/as-x86/