LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-11-2008, 10:12 AM   #1
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 32
Compiling Kernel?


If I compiled kernel 2.6.24.5 on a machine with GCC - 3.4.6 to use in a machine which has got GCC - 4.2.3 would it cause any issues?

The reason being the machine with GCC-4.2.3 only runs at 600MHz (the test machine,with slack 12.1) while the other which has GCC 3.4.6 (slack 11) runs at 1.8GHz, so compiling it on the latter would be faster.

Thanks
 
Old 05-11-2008, 10:50 AM   #2
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
i just built 2.6.24.7 on slackware-12.1 with the GCC that came with the distro, it runs great for me, i would suggest sticking with what Pat V. included with slackware-12.1 (the safer choice)...
 
Old 05-12-2008, 04:54 PM   #3
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
Well the machine 12.1 is installed on only runs at 600MHz and takes quite long to compile the kernel and the modules, but there is another system that runs at 1.8GHz that has got Slackware 11 on with with GCC-3.4.6, so the question is if you compile the kernel on a system that has got GCC 4.2.3 will it run on a system without issues that has got GCC 3.4.6?
 
Old 05-12-2008, 06:06 PM   #4
Sorrofix
LQ Newbie
 
Registered: Apr 2008
Location: Canada
Posts: 6

Rep: Reputation: 0
Considering a Linux system doesn't even require a compiler in order to run, it's highly unlikely that the version of gcc that you have installed will have any effect on the operation of the system. Just don't forget to copy all your kernel files (initrd/initramfs if present, and kernel modules).

Last edited by Sorrofix; 05-12-2008 at 06:10 PM.
 
Old 05-12-2008, 08:37 PM   #5
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
You can probably compile the kernel on the faster box using `make bzImage modules`, and then copy the entire source directory over to the new box (using `cp -a`). You would then run `make modules_install` in the source directory and copy ./arch/i386/boot/bzImage and ./System.map to /boot (and rename them to vmlinuz-2.6.24.5 and System.map-2.6.24.5, respectively -- /boot/System.map should be a symlink to /boot/System.map-2.6.24.5). Then add the required entry to LILO and you should be all set (don't forget to run /sbin/lilo after editing it). Remember to create an initrd as well if you need to.
 
Old 05-12-2008, 09:41 PM   #6
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
There are things to consider when you mix gccs with your kernels. If you try to compile a new module for it (say for a graphics driver, vmware, etc) you will run into problems saying that your installed gcc isn't the same as the one your kernel was compiled with. Perhaps if you compiled all things like that on the same machine and then copied them over it would be fine.
 
Old 05-13-2008, 08:08 AM   #7
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by shadowsnipes View Post
If you try to compile a new module for it (say for a graphics driver, vmware, etc) you will run into problems saying that your installed gcc isn't the same as the one your kernel was compiled with.
Bingo! that is exactly why i suggested "the safer choice" in my first comment...
 
Old 05-14-2008, 02:00 PM   #8
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by shadowsnipes View Post
There are things to consider when you mix gccs with your kernels. If you try to compile a new module for it (say for a graphics driver, vmware, etc) you will run into problems saying that your installed gcc isn't the same as the one your kernel was compiled with. Perhaps if you compiled all things like that on the same machine and then copied them over it would be fine.
Yeah thats what I was worried about, once the kernel has been installed and while it runs you realize that certain modules need to be compiled or certain functions of the kernel be compiled in, would it cause issues.

Out of interest, once it is in binary form why should the gcc version which it was compiled in be an issue unless the module was being built it in to the kernel?
 
Old 05-14-2008, 03:06 PM   #9
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by marsques View Post
Out of interest, once it is in binary form why should the gcc version which it was compiled in be an issue unless the module was being built it in to the kernel?
I don't think you can load a kernel module (say an Nvidia driver module or ndiswrapper module) that was compiled with a different gcc than than the one you compiled the kernel. You computer will complain.

Really 600MHz is not that slow and compiling on it should not take forever. I still do it with my 400Mhz PII.
 
Old 05-14-2008, 03:09 PM   #10
digger95
Member
 
Registered: Oct 2007
Location: Indiana, PA
Distribution: Slackware 14
Posts: 330

Rep: Reputation: 46
I think you'll spend more time trying to figure this out than you would if you just went ahead and compiled it on the slower box.
 
Old 05-14-2008, 03:24 PM   #11
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by digger95 View Post
I think you'll spend more time trying to figure this out than you would if you just went ahead and compiled it on the slower box.
Exactly. Especially since if you are really worried about the time it takes you can just start it before going to bed- done in the morning!
 
Old 05-14-2008, 04:11 PM   #12
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Compiling a kernel even on an old 333 MHz box isn't TOO bad (I wouldn't compile the kernel while I was trying to get something done, but it's not like it takes 5 hours or anything), and 600 MHz should be much better. Unless this is an ARM processor (in which case kernel compilation would be very difficult in the first place and would take forever), you should be fine. (No, don't go to check if you have an ARM processor -- it was a joke. Unless you're compiling this for a PDA, in which case I pity you)
 
Old 05-14-2008, 04:35 PM   #13
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
Well I've compiled it on the 600MHz, which takes a bit more than an hour for the whole thing, with compiling the modules take nearly forty minutes.

So its a load off my mind. Thanks guys for the assurance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Góes Slackware - Installation 2 04-15-2007 08:42 PM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 02:29 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration