1753789 Members
7618 Online
108799 Solutions
New Discussion юеВ

Re: kernel recompilation

 
Claudio Cilloni
Honored Contributor

kernel recompilation

hello everybody.

did you ever recompiled the redhat 9 kernel (2.4.20-8)? I get
a compilation error when running 'make modules' about a 'printk' function... now i cannot copy here the error message 'cause I'm recompiling kernel for my home machine (I'm at work now :-)

It is possible that a newly installed redhat 9 can't recompile it's own kernel source using it's default unchanged configuration (found in configs/ dir in kernel source home dir)? It's my fault or Red Hat is going crazy? :-)

thanks,
Claudio
10 REPLIES 10
Jarle Bjorgeengen
Trusted Contributor

Re: kernel recompilation

You have installed the kernel-headers rpm that match the kernel source you are trying to compile , right ?

Rgds Jarle
Claudio Cilloni
Honored Contributor

Re: kernel recompilation

ummmmmh... I didn't think about this... maybe you're right. I'm going to verify this evening.
See ya tomorrow :-)

tx

Claudio
Claudio Cilloni
Honored Contributor

Re: kernel recompilation

the kernel headers are installed (glibc-kernheaders package).

any ideas?

tx
Jarle Bjorgeengen
Trusted Contributor

Re: kernel recompilation

Hmm I don't understand . On RH 8.0 , the kernel-headers, and the glibc were different packages. I was thinking only of the kernel-headers package, and that the version number of the kernel header package match the kerne-source version you are trying to compile.

If you install a newer kernel-source rpm than what RH 9 was shipped with, you need to upgrade kernel-headers package, to match the newer kernel-source.

I definately think this should work straight out of the box. If it don't there is definately an errata posted on RedHat's web site.

Rgds Jarle
Manuel Wolfshant
Trusted Contributor

Re: kernel recompilation

Please try the command
make distclean
or even
make mrproper (after saving the file .config)
afterwards retry compiling
Claudio Cilloni
Honored Contributor

Re: kernel recompilation

Jarle, I remember something about a 'kernel-headers' package, but maybe is was used in an old version of redhat. looking in redhat 7.3 CDs (my desktop machine at work) there are no 'kernel-headers .rpm' file but there's a 'glibc-kernheaders-2.4-7.14.i386.rpm'
like in redhat 9.

could you tell me the right steps to compile a kernel?
I follow these:

1. make menuconfig
2. load configuration from the configs/ directory
3. exit from menuconfig (saving configuration)
4. make dep
5. make bzImage
6. make modules - here I get the error above.

tx
Claudio
Jarle Bjorgeengen
Trusted Contributor

Re: kernel recompilation

Hi Claudio,

I'm not talking about .rpm files hanging around in your filesystem, but installed packages .

if you do an
#rpm -qa
you will get a listing of all installed rpms.
#rpm -qa|grep kernel
will list all packages containing "kernel" in their names.

Check that your kerne-source package has exactly the same version and relase number as the kernel-headers on your system. If not, update your kernel-headers package.

#make mrproper before the make menuconfig is probably wise too to clear up after the failed compilations.

Rgds Jarle
Claudio Cilloni
Honored Contributor

Re: kernel recompilation

the 'kernel-headers' package isn't installed, and it doesn't exists in RH73 and later distributions; it exists in RH72.
It is replaced by (I think) glibc-kernheaders.

Could you give an url where I can get the redhat official source packages of an updated kernel for RH9? Maybe this is a known problem and it is fixed in new a version of the kernel...

tx
Claudio
Paddy_1
Valued Contributor

Re: kernel recompilation

This may not solve your problem but after you are sorted with the headers thing do this.
I am not sure if you really want the headers as /usr/src/linux should have all the source necessary to compile the kernel.
try this after make menuconfig.

make dep && make clean && make bzImage && make modules && make modules_install

When this finishes you have a compressed compiled kernel and you have the modules installed where they belong. You will now need to install the kernel.


The sufficiency of my merit is to know that my merit is NOT sufficient