LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Simple compiling question??? (http://www.linuxquestions.org/questions/linux-general-1/simple-compiling-question-13938/)

cameronknives 02-09-2002 11:28 PM

Simple compiling question???
 
Hello -
I've been having some trouble recompiling the new Mandrake cooker kernel 2.4.17 I downloaded both the kernel rpm and the source rpm's and type in rpm -i to install both packages.when done I reboot and my new kernel is installed and lilo is automatically setup. But how do I recompile this new kernel so that I can select my special hardware during xconfig? When I drop into /usr/src there is no linux directory for the new kernel only the old stock 2.4.8 kernel. What am I doing wrong and how do I REcompile this new kernel?
Thanks -
Scott

Pertinet info if it help solve my problem -
Mandrake 8.1
updated all libraries and compiler to kernel recommended versions
newest version of Lilo installed
iptables updated
checked rpm files against md5sum - complete and current
AMD Athlon XP 1600+
Via KT266A chipset motherboard
384mb PC2100 DDR memory
64mb Geforce GTS 2 DDR
Soundblaster Audigy Gamer+
Adaptec Ultra 160 SCSI card
Seagate Cheetah 10,000rpm 9.1 gig drive for O.S.'s
Maxtor 7200rpm IDE drive for programs and storage:) :)

cameronknives 02-10-2002 12:05 AM

rebuild rpms
 
Someone just told me that the kernel*.src.rpm file is an rpm package with source files in it that have not been compiled into a binary rpm package. Could this possibly be right. Is it the kernel.src.rpm file that creates theLinux and linux-2.4.17 directory in /usr/src during a kernel install? I'm still lost!!! :)
Thanks -
Scott

finegan 02-10-2002 06:58 AM

Hmm...

It seems like you only downloaded the running compiled version of 2.4.17 from Mandrake and all of its associated modules. Mandrake likes this rather bloated, so it was probably somewhere in the ballpark of 30+ megs.

The Kernel source for 2.4.17, unpacked, will be in excess of 130+megs.

If you want to compile a kernel, never, ever use the deranged excuse of a source package the distros give you. Get the tarball from www.kernel.org (or preferably, a mirror site) and read through the kernel-how-to. The process may seem daunting and letting Mandrake do it auto-magically may seem much less of a hastle, but it really isn't. Just remember that as long as you leave in the lilo entry for your old kernel and the copy of it still there... you've always got something to fall back on.

Cheers,

Finegan

cameronknives 02-10-2002 10:25 AM

that is right
 
Yes, it was 28 megs in size. I have now run into the problem of mandrake insisting that the old kernel-source and header files be uninstalled before installing the new kernel and sources. When I go to software/package manager to uninstall the kernel-source.rpm and the kernel-headers.rpm from the stock kernel, it says that it must also uninstall gcc and glibc-devel. Aren't those two needed to recompile and install the new kernel?
The reason why I have chosen the new Mandrake cooker kernel is the fact they incuded all the Alan Cox patches and other stuff in it. Installing the plain 2.4.17.tar.gz kernel is no problem and works fine but I haven't downloaded all the patches I want because there are so many. They must be applied sucessively I was told. That's a lot of patches!!!
If you know what two do about the old kernel-sources and headers I would appreciate it.
Thanks -
Scott

llama_meme 02-10-2002 10:45 AM

There's no need to remove the source for the old kernel. /usr/src/linux should be a symlink pointing to the latest kernel version's directory (e.g. /usr/src/linux-2.4.17). But it's fine to have older versions nestling in there as well, so long as you make sure they're in their own directories (e.g. /usr/src/linux-2.4.8).

Do you really need those kernel patches, btw?

Not sure how much I'm answering your question, but I hope it's useful.

cameronknives 02-10-2002 10:58 AM

thanks
 
thanks for the reply. According to the Mandrake docs on kernel compiling it says, Quote 'keep in mind that if you have kernel-source/headers or whatever installed, you have to upgrade these packages along with the kernel-rpm or uninstall them before upgrading the kernel-rpm' and again on page two it says 'Notice that you can't have two different versions of the packages 'kernel-source' and 'kernel-headers' installed. How do I upgrade or uninstall these older sources and header files? Or should I just ignore that and install the kernel-source file and kernel.rpm file?
There are a few patches I need that are already in the Mandrake cooker kernel and it has fixes for some bugs I'm having and unsupported hardware.. Thats why I wanted to install that kernel over the standard kernel-2.4.17.tar.gz kernel. I also run Mandrake on my system so it just seemed natural to upgrade to their newest kernel versus a generic one or the non-optimized Linus-kernel series. I know there is hardly any performance difference but that is the one I chose.
Thanks -
Scott


All times are GMT -5. The time now is 09:05 PM.