LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9 (https://www.linuxquestions.org/questions/red-hat-31/red-hat-custom-kernel-compilation-mini-how-to-for-red-hat-8-9-a-91503/)

Thetargos 01-29-2004 03:00 AM

Just an update, I have edited the main guide so that now includes some vital information regarding file systems and the 2.6.x kernels, including grub.conf needed changes.

dleidlein 02-03-2004 07:45 PM

WOW! Been looking for something like this for days. It's been said already but I had to say it myself: EXCELLENT POST AND THANK YOU!

Butterbroetchen 02-04-2004 03:41 AM

Compile Problems
 
Hi,

When I make bzImage I get the following error and thats it. What is wrong.?

I am using the standard redhat Sources and some how I cannot compile the Kernel. :(

I am going mad here... I have read everything I could find and have not been able to get a simple compile to work. Please help.

Thanks

make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.22-1.2149.nptl'
make: *** [vmlinux] Error 2

Thetargos 02-04-2004 10:44 AM

I had some of those problems myself with the latest 2.6 kernel I was trying to compile, but the install process turned out to say that I had no loopback devices... In any case while using RH 9 I had a similar problem also, though in the kernel I was trying to compile the problem turned out to be related to the crypto APIs. If you use Fedora Core, you should edit the top level makefile and substitute any "gcc" occurance with [b]gcc32[b], that'll cause to use the gcc version 3.2 instead of the standard (gcc) 3.3. that comes with Fedora.

MOCKBA 02-05-2004 05:06 PM

kernel 2.6.2
 
Can somebody point me on step by step instruction for upgrading rh9 kernel to 2.6.2? It should be newbie level, starting from URL to download the kernel source. Thanks,

Thetargos 02-05-2004 05:19 PM

In the first page of this tutorial you'll find the page, just not to make you go all the way back, here it is www.kernel.org

If you follow the steps in the first page, you'll have no problems. Just make sure you have modutils-2.4.25-13 installed (you may find the package by looking in rpmfind.net Other than that, it's all there.

I'm assuming you know how to check what packages you have installed, I also assume you know how to upgrade or install new packages for your distribution. If you do not know these things, I'd suggest you to read a little more on RPM before attempting to upgrade your kernel from source.

ekoome 02-09-2004 05:20 AM

Vinceb,
How did you resolve your 'depmod:Unresolved symbols......' Errors?
I am encountering the same problems. i have done everything but still getting the same errors.

Please assist.

Eric

Thetargos 02-09-2004 12:29 PM

Where/when exactly are you having these problems? Unresolved Symbols (AFAIK) are most commonly due to a mismatch regarding the compiler used to build the kernel and the one used for the modules, you may want to check that out (In Fedora this is quite evident!) or because you are loading a module which need another loaded first.

pirkaso 02-09-2004 05:03 PM

gee now i feel better...hehehe...blew my head off...now i am more confused than ever....lol....

Thetargos 02-09-2004 06:12 PM

Sorry, that was not my intention... Basically you have to use the same compiler for both the modules and the kernel, this should be taken care off by the Makefile. If you are using Fedora Core, edit the Makefile and change all instances of gcc to gcc32 (for that to work you should install the kernel sources using the program redhat-config-packages, if you did not install it at install time). Hope this clarifies a little bit more: Fedora comes with gcc 3.3 which has problems with kernel compilations/modules, etc. As a work-around the Fedora guys compiled the kernel using the RH 9 compiler (gcc 3.2, hence gcc32 command), and supplied that gcc as a dependency to the kernel sources. However if you're not using Fedora, its a little bit difficult to assist you as I don't know at what stage this problem arises. In this case, please post back more information.

ekoome 02-10-2004 01:42 AM

'depmod:Unresolved symbols......' Errors?
 
I have GCC- 2.96 on RH7.3. I compiled a 2.4.24 kernel with this 2.96 and everything went well. I wanted then to upgrade to 2.6.1 but i had problems with 2.96. I upgraded to gcc -3.3.2 and glibc-2.3.2 but keeping my GCC-2.96.

I uninstalled the 2.4.24 in readiness to compile my 2.6.1 Kernel. To my shock i got the "Unresolved symbols problems whether i use GCC-2.96 or GCC-3.3.2. It fails when i try to install Modules.

I tried to revert to my original 2.4.24 Kernel and also could not get it to install the modules.

I am lost as to what got messed up.

Please assist.

Eric

Thetargos 02-10-2004 02:20 AM

You most likely messed your system with the GCC and glibc upgrade (don't get me wrong, I also did that to my 7.3 install, it survived quite a while until I wanted to install X 4.3 from XF86's binary distribution, then it almost died :D).

So if I understand correctly when you
Code:

# make modules_install
Is when it complaints about unresolved symbols, or when you actually boot the system and the modules get loaded?

How do you differenciate between the two compilers? Maybe they're bein addressed in different ways during the different stages of the compilation process?

I'll do some research on the matter.

ekoome 02-10-2004 02:31 AM

depmod: *** Unresolved symbols..
 
I get the errors when i do Make modules_install. I have tried to edit the top level makefile and changing gcc to gcc3.3.2 and vice-versa to no avail.

Currently gcc points to gcc-2.96 and gcc3.3.2 was installed under /usr/local/bin. Glibc-2.3.2 was installed under /tools.

Eric

Thetargos 02-10-2004 02:39 AM

Ok, which compiler does the gcc command calls? (you say 2.96), are you sure there's no conflict?

So basically you can actually build the modules, but not install them? As in
Code:

# make clean
# make dep
# make modules
# make modules_install
# make install

The procedure I usually follow (as the guide says) is to supply all in one command line, however, the order above is the one I've always used (even before I knew I could use a single command line).

ekoome 02-10-2004 03:02 AM

yes, I follow the procedure in the HOWTO. I can compile the Kernel but when i reach Make modules_Install i get the Depmod errors when it is updating the System map.

I am sure there is no confilct in gcc and gcc3.3.2. When i run gcc --version it gives me 2.96.

Eric


All times are GMT -5. The time now is 05:12 AM.