2005-09-20 06:22:07

by Gireesh Kumar

[permalink] [raw]
Subject: regarding kernel compilation

Hi,
I'd like to compile 2.4.20-6 kernel while running in 2.6 kernel. I tried
to do so but there are redeclaration errors with /kernel/sched.c and
/include/linux/sched.h. One it is FASTCALL and the other it is not.
Can anyone help me to fix this?
Thankyou,
Gireesh.


2005-09-20 07:11:17

by Fawad Lateef

[permalink] [raw]
Subject: Re: regarding kernel compilation

On 9/20/05, Gireesh Kumar <[email protected]> wrote:
> Hi,
> I'd like to compile 2.4.20-6 kernel while running in 2.6 kernel. I tried
> to do so but there are redeclaration errors with /kernel/sched.c and
> /include/linux/sched.h. One it is FASTCALL and the other it is not.
> Can anyone help me to fix this?

I don't think you will be able to compile 2.4 kernel on to the 2.6
kernel based distro .... as in 2.6 based distro, mod-utils and other
packages are updated and will only support 2.6 based kernel .... So
its better to get 2.4 kernel based distribution .... (and can keep/run
both 2.6 and 2.4 based distributions simultanously on the same system,
so that you can boot in any of them as per your requirement of 2.4 or
2.6 kernel)

--
Fawad Lateef

2005-09-20 08:13:08

by Denis Vlasenko

[permalink] [raw]
Subject: Re: regarding kernel compilation

On Tuesday 20 September 2005 10:11, Fawad Lateef wrote:
> On 9/20/05, Gireesh Kumar <[email protected]> wrote:
> > Hi,
> > I'd like to compile 2.4.20-6 kernel while running in 2.6 kernel. I tried
> > to do so but there are redeclaration errors with /kernel/sched.c and
> > /include/linux/sched.h. One it is FASTCALL and the other it is not.
> > Can anyone help me to fix this?

Kernel conpile should never use system includes, let alone
includes from _another_ kernel tree. (Using stdarg.h from gcc is ok)

> I don't think you will be able to compile 2.4 kernel on to the 2.6
> kernel based distro .... as in 2.6 based distro, mod-utils and other

2.6 modutils (module-init-tools to be exact) fall back to <toolname>.old
(by just exec'ing it) if those exist.

> packages are updated and will only support 2.6 based kernel .... So

Not true. I compiled 2.4 kernels on 2.6 machine without any problems.

> its better to get 2.4 kernel based distribution .... (and can keep/run
> both 2.6 and 2.4 based distributions simultanously on the same system,
> so that you can boot in any of them as per your requirement of 2.4 or
> 2.6 kernel)
--
vda

2005-09-20 08:37:51

by Fawad Lateef

[permalink] [raw]
Subject: Re: regarding kernel compilation

On 9/20/05, Denis Vlasenko <[email protected]> wrote:
> On Tuesday 20 September 2005 10:11, Fawad Lateef wrote:
> > I don't think you will be able to compile 2.4 kernel on to the 2.6
> > kernel based distro .... as in 2.6 based distro, mod-utils and other
>
> 2.6 modutils (module-init-tools to be exact) fall back to <toolname>.old
> (by just exec'ing it) if those exist.
>

you are right, but if they exists .... but what IIRC I havn't found
them on FC4/RH EL4 distributions .....

> > packages are updated and will only support 2.6 based kernel .... So
>
> Not true. I compiled 2.4 kernels on 2.6 machine without any problems.
>
On which distribution 2.6 based you compiled and succesfully run 2.4
kernel ??? b/c its not working on FC3/FC4/AS4 .........

--
Fawad Lateef

2005-09-20 08:57:49

by Denis Vlasenko

[permalink] [raw]
Subject: Re: regarding kernel compilation

> you are right, but if they exists .... but what IIRC I havn't found
> them on FC4/RH EL4 distributions .....

Then build them from source. Big deal.

> > > packages are updated and will only support 2.6 based kernel .... So
> >
> > Not true. I compiled 2.4 kernels on 2.6 machine without any problems.
> >
> On which distribution 2.6 based you compiled and succesfully run 2.4
> kernel ??? b/c its not working on FC3/FC4/AS4 .........

I used distro for installing my Linux box exactly once in my life when
I installed Slackware (IIRC it was Slack 7). It got heavily modified
over time...
--
vda

2005-09-20 09:38:54

by Mikael Pettersson

[permalink] [raw]
Subject: Re: regarding kernel compilation

Gireesh Kumar writes:
> Hi,
> I'd like to compile 2.4.20-6 kernel while running in 2.6 kernel. I tried
> to do so but there are redeclaration errors with /kernel/sched.c and
> /include/linux/sched.h. One it is FASTCALL and the other it is not.
> Can anyone help me to fix this?

Looks like you're trying to compile an ancient 2.4 kernel with gcc-3.4
or newer. That has zero chance of working.

Since that looks like a RH 2.4.20 kernel, you should probably use
gcc-3.2.3 to compile it. Alternatively you can use gcc-3.4 with the
current 2.4.31 kernel.

Some 2.6-based distributions do have problems running 2.4 kernels:
FC3 needs some minor tweaks (replace udev and module-init-tools with
dev and modutils from FC2) but FC4 is a lost cause due to NPTL.

2005-09-20 12:27:59

by Jesper Juhl

[permalink] [raw]
Subject: Re: regarding kernel compilation

On 9/20/05, Fawad Lateef <[email protected]> wrote:
> On 9/20/05, Denis Vlasenko <[email protected]> wrote:
> > On Tuesday 20 September 2005 10:11, Fawad Lateef wrote:
> > > I don't think you will be able to compile 2.4 kernel on to the 2.6
> > > kernel based distro .... as in 2.6 based distro, mod-utils and other
> >
> > 2.6 modutils (module-init-tools to be exact) fall back to <toolname>.old
> > (by just exec'ing it) if those exist.
> >
>
> you are right, but if they exists .... but what IIRC I havn't found
> them on FC4/RH EL4 distributions .....
>
Slackware 10.0, 10.1 and 10.2 run just fine with 2.4.x and 2.6.x
kernels and you can build, install and run both just fine - no
problems at all there (even Slackware 9.1 will work with a few small
changes).

> > > packages are updated and will only support 2.6 based kernel .... So
> >
> > Not true. I compiled 2.4 kernels on 2.6 machine without any problems.
> >
> On which distribution 2.6 based you compiled and succesfully run 2.4
> kernel ??? b/c its not working on FC3/FC4/AS4 .........
>
Those are just a small subset of available distributions. Just because
it won't work there doesn't mean much.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2005-09-21 00:10:40

by Robert Hancock

[permalink] [raw]
Subject: Re: regarding kernel compilation

Gireesh Kumar wrote:
> Hi,
> I'd like to compile 2.4.20-6 kernel while running in 2.6 kernel. I tried
> to do so but there are redeclaration errors with /kernel/sched.c and
> /include/linux/sched.h. One it is FASTCALL and the other it is not.
> Can anyone help me to fix this?
> Thankyou,
> Gireesh.

What compiler? You probably need an older version of gcc to compile that
kernel. gcc4 definitely will not work, 3.4 may have issues as well.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/