LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-17-2007, 11:29 PM   #1
Falcon006
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware
Posts: 8

Rep: Reputation: 0
Errors compiling 2.4 kernel on slackware 11 for openmosix


So basically I want to be able to compile the 2.4.26 kernel on my laptop to connect to a cluster. My laptop is running Slackware 11. Hereís the story...

The cluster is good to go, it is using Slackware 10.2 which has gcc 3.3.6. I tried to compile the 2.4 kernel on my Slackware 11 and it wouldnít get very far. It complains about a _exit(). I did a little research and found that the newer GCC 4.x cant compile the older 2.4.x. So I looked into compiling the older GCC (3.3.6). That compiles fine. I installed it into a separate location so it wonít screw with my current compiler. I used export to set CC.

Code:
export CC=/opt/gcc-3.3.6/bin/gcc
This didnít seem to change anything when I tried to compile 2.4 kernel. I then change the current gcc symbolic link to the gcc 3.3.6 location.

This works a little differently. I now get a message like this:

Code:
{standard input}:1797 Error: suffix or operands invalid for `mov`
I think this is the AS (portable GNU assembler) or is it still the compiler?

I moved on to a different approach, maybe I can just copy the precompiled kernel from the 10.2 machine. This will boot, but it stops right at the Freeing unused kernel memory. No errors or warning. I then tried passing in a parameter to the kernel
Code:
         init = /bin/bash
Right after the Freeing unused memory it will give a error: Kernel too old!


I understand that there is some kind of dependencies between libc and the kernel, but Iím kind of confused on how this works. I know the easiest way is to go back to the old 10.2 Slackware, but I would like to keep Slackware 11 if it is at all possible. You guys have any ideas on how I should go about this? Thanks

-Nick
 
Old 11-18-2007, 02:58 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
I did a little research and found that the newer GCC 4.x cant compile the older 2.4.x.
Doesn't seem to apply to 2.4.34 or later though.

Usually, configure has options which allow you to modify the compile for things like different compilers.

But, basically, we need the command you issues as well as the exact error message.
Here's commentary on the last message you supplied:
http://kerneltrap.org/node/5785

Kernel too old?
http://osdir.com/ml/bbc.general/2003-03/msg00015.html
... like that?

Do your headers match the kernel?
 
Old 11-19-2007, 03:14 PM   #3
Falcon006
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: 0
I'm trying to compile the 2.4.26 kernel so i used the following commands to compile it.

Code:
Make mrproper
Make menuconfig
make dep
make bzimage
make modules
make modules_install
make bzImage is as far as i can get. The error looks like this.
Code:
{standard input}: Assembler messages:
{standard input}:843: Error: suffix or operands invalid for `mov'
{standard input}:844: Error: suffix or operands invalid for `mov'
{standard input}:938: Error: suffix or operands invalid for `mov'
{standard input}:939: Error: suffix or operands invalid for `mov'
{standard input}:989: Error: suffix or operands invalid for `mov'
{standard input}:990: Error: suffix or operands invalid for `mov'
{standard input}:992: Error: suffix or operands invalid for `mov'
{standard input}:1004: Error: suffix or operands invalid for `mov'
make[1]: *** [process.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.26/arch/i386/kernel'
make: *** [_dir_arch/i386/kernel] Error 2

I looked at your link and it seems like AS (assembler) handles that code execution. I'm going to try patching it. Hopefully it wont take to much modifying.
 
Old 11-19-2007, 03:38 PM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Why can't you go up to 2.4.34. It's better than patching.
 
Old 11-19-2007, 10:05 PM   #5
Falcon006
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: 0
Yeah, I agree. unfortunately there is no support for that kernel. The openMosix team disbanded. They have a 2.6 version, but it is a beta.
 
Old 11-20-2007, 02:20 AM   #6
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
http://linuxfromscratch.org/pipermai...er/002444.html
... binutils?
 
Old 11-20-2007, 03:32 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,768

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
If you are using Slack-11.0, then you should be able to run the standard gcc-3.4.6 compiler to compile the older. Also instead of doing this:

export CC=/opt/gcc-3.3.6/bin/gcckernel

do this:

export PATH=/opt/gcc-3.3.6/bin/gcckernel:$PATH
 
Old 11-21-2007, 02:13 AM   #8
Falcon006
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: 0
I got it to compile! But when i boot off the newly builded kernel it just stops right after "freed memory".

I installed a older binutil and linked AS to where I installed it. I also got a older depmod. After running install_modules it would complain about depmod not being old enough.

I'm kind of at a lost. Is GCC version the same as a kernel header? The kernel was builded with GCC 3.4 and everything else was built with GCC 4.X. Is this not allowed?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Compiling Errors!! - Slackware 11.0 - Kdevelop leokalf Linux - Newbie 7 05-17-2007 09:38 AM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 12:15 AM
xawtv on Slackware: compiling errors jaakkop Linux - Software 3 11-24-2005 04:35 AM
Errors Compiling the 2.6.12.4 kernel zeroslack Linux - General 2 08-10-2005 09:02 AM
Errors Compiling Kernel naesyllek Linux - General 2 07-26-2003 07:06 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration