[PlanetCCRMA] custom kernel compilation problems

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Thu Dec 2 15:05:01 2004


On Thu, 2004-12-02 at 14:52, William M. Quarles wrote:
> Fernando Lopez-Lezcano wrote:
> > On Wed, 2004-12-01 at 21:14, William M. Quarles wrote:
> > 
> >>This question is probably more relevant to the Fedora users' list, but 
> >>unfortunately my access to that list as a newsgroup on Gmane has gone 
> >>berzerk, and I'm waiting for them to do something with my report.
> >>
> >>I tried compiling a kernel from the latest Fedora Core 1 kernel-source 
> >>package.  I ended up with a problem after I rebooted into the new 
> >>kernel.  Every time that I tried to open a terminal window in Gnome, any 
> >>user other than root could not get a shell prompt to appear.  Does 
> >>anybody know of a kernel option that would have something to do with this?
> > 
> > 
> > No idea.
> > 
> > The kernel-source-...-.i386.rpm is _not_ the proper source to recreate a
> > kernel from scratch. It was meant, I think, to include the stuff needed
> > to build external kernel modules that need access to the kernel headers.
> > That no longer happens in 2.6.x (there is no kernel-source, headers are
> > included in the kernel package itself). 
> > 
> > Just like all other packages, kernels in RedHat/Fedora are just that,
> > packages, and are created by building them from a source package
> > (.src.rpm). 
> > 
> > -- Fernando
> 
> rpm -qi kernel-source gives:
> 
> Description :
> The kernel-source package contains the source code files for the Linux
> kernel. These source files are needed to build most C programs, since
> they depend on the constants defined in the source code. The source
> files can also be used to build a custom kernel that is better tuned
> to your particular hardware.
> 
> So it looks like I *am* using it for one of its intended purposes. 

Yes, I understand. You should not believe all you read :-)

I have not used kernel-source for this purpose ever so I can't really
comment, but from what I have read, in practice it does not work very
well. 

If you want a patched kernel source tree that corresponds to the kernel
rpm, you should download the kernel-xxx.src.rpm, install it (rpm -Uvh
kernel-xxx.src.rpm), "cd /usr/src/redhat/SPECS", "rpmbuild -bp
kernel-xxx.spec" and at the end "cd
/usr/src/redhat/BUILD/kernel-xxx/linux-xxx".

That's the base of the kernel source tree used to generate the binary
packages. At that point the various configuration files that are used to
build the different architectures are in the subdirectory "configs/".

> Compiling an official Linux kernel on a Red Hat distribution can cause a 
> lot of problems.  I've usually had pretty good luck with this approach.

-- Fernando