* How can I build a 2.4 kernel on a 2.6 System
@ 2008-10-24 12:16 j.d.-linux-kernel
2008-10-24 20:29 ` Willy Tarreau
0 siblings, 1 reply; 4+ messages in thread
From: j.d.-linux-kernel @ 2008-10-24 12:16 UTC (permalink / raw)
To: linux-kernel
Hello list
I will build some 2.4 kernel modules on a system with a running 2.6 kernel.
Is it possible and how can I do this?
Thanks for reply
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How can I build a 2.4 kernel on a 2.6 System
2008-10-24 12:16 How can I build a 2.4 kernel on a 2.6 System j.d.-linux-kernel
@ 2008-10-24 20:29 ` Willy Tarreau
2008-10-26 10:32 ` Jörg Dohle
0 siblings, 1 reply; 4+ messages in thread
From: Willy Tarreau @ 2008-10-24 20:29 UTC (permalink / raw)
To: j.d.-linux-kernel; +Cc: linux-kernel
Hi,
On Fri, Oct 24, 2008 at 02:16:40PM +0200, j.d.-linux-kernel@arcor.de wrote:
> Hello list
>
> I will build some 2.4 kernel modules on a system with a running 2.6 kernel.
>
> Is it possible and how can I do this?
Not sure what you really mean. If you mean build 2.4 modules for 2.4 on
a machine running 2.6, that's OK as there's no dependency between the
running kernel and the one you're building. However, you should be
careful about two things :
- gcc: it tends to be too recent for 2.4. gcc 4.1 is the highest version
supported.
- modutils: most recent distros only ship module-init-tools without the
old depmod. If you intend to "make modules_install INSTALL_MOD_PATH=..."
then get prepared to see some errors from depmod at the end. The easiest
solution consists in getting a depmod from an old machine an installing
it in /tmp for instance.
Hoping this helps,
Willy
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: How can I build a 2.4 kernel on a 2.6 System
2008-10-24 20:29 ` Willy Tarreau
@ 2008-10-26 10:32 ` Jörg Dohle
2008-10-26 10:41 ` Willy Tarreau
0 siblings, 1 reply; 4+ messages in thread
From: Jörg Dohle @ 2008-10-26 10:32 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel
Hello Willy
Thanks for answering, but I have a problem with the compiling.
When I try to compile the 2.4 kernel with the following commands:
# make clean && make mrproper
then I restore the .config file
# make oldconfig
# make dep && make bzImage respectively make modules
I get the following error message:
make[1]: Leaving directory
`/fileserver/99_Frei/kernel-build-tree/linux-2.4.21-57.EL'
gcc -D__KERNEL__ -I/fileserver/99_Frei/kernel-build-tree/linux-2.4.21-57.EL/include
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -march=i386 -DKBUILD_BASENAME=main
-c -o init/main.o init/main.c
init/main.c:1: Fehler: Die ausgewählte CPU unterstützt nicht den x86-64
Befehlssatz
English translation (by google)
init / main.c: 1: Error: The selected CPU does not support x86-64
instruction
I use a x86_64 system with a 2.6.16.60-0.31-smp kernel for compiling 2.4
kernel modules.
I think some compiler information are missing for make.
Could you help me?
----- Original Message -----
From: "Willy Tarreau" <w@1wt.eu>
To: <j.d.-linux-kernel@arcor.de>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, October 24, 2008 9:29 PM
Subject: Re: How can I build a 2.4 kernel on a 2.6 System
> Hi,
>
> On Fri, Oct 24, 2008 at 02:16:40PM +0200, j.d.-linux-kernel@arcor.de
> wrote:
>> Hello list
>>
>> I will build some 2.4 kernel modules on a system with a running 2.6
>> kernel.
>>
>> Is it possible and how can I do this?
>
> Not sure what you really mean. If you mean build 2.4 modules for 2.4 on
> a machine running 2.6, that's OK as there's no dependency between the
> running kernel and the one you're building. However, you should be
> careful about two things :
> - gcc: it tends to be too recent for 2.4. gcc 4.1 is the highest version
> supported.
> - modutils: most recent distros only ship module-init-tools without the
> old depmod. If you intend to "make modules_install
> INSTALL_MOD_PATH=..."
> then get prepared to see some errors from depmod at the end. The
> easiest
> solution consists in getting a depmod from an old machine an installing
> it in /tmp for instance.
>
> Hoping this helps,
> Willy
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How can I build a 2.4 kernel on a 2.6 System
2008-10-26 10:32 ` Jörg Dohle
@ 2008-10-26 10:41 ` Willy Tarreau
0 siblings, 0 replies; 4+ messages in thread
From: Willy Tarreau @ 2008-10-26 10:41 UTC (permalink / raw)
To: Jörg Dohle; +Cc: linux-kernel
On Sun, Oct 26, 2008 at 11:32:17AM +0100, Jörg Dohle wrote:
> Hello Willy
>
> Thanks for answering, but I have a problem with the compiling.
> When I try to compile the 2.4 kernel with the following commands:
>
> # make clean && make mrproper
> then I restore the .config file
> # make oldconfig
> # make dep && make bzImage respectively make modules
>
>
> I get the following error message:
>
> make[1]: Leaving directory
> `/fileserver/99_Frei/kernel-build-tree/linux-2.4.21-57.EL'
OK, first it's an RHEL3 kernel, not a mainline one. The difference can
sometimes be important.
> gcc -D__KERNEL__
> -I/fileserver/99_Frei/kernel-build-tree/linux-2.4.21-57.EL/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -march=i386
> -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
> init/main.c:1: Fehler: Die ausgewählte CPU unterstützt nicht den x86-64
> Befehlssatz
>
> English translation (by google)
> init / main.c: 1: Error: The selected CPU does not support x86-64
> instruction
You might get native error messages by doing "export LANG=C" before
building. I think that the problem you're encountering is simply
because by default you're trying to build for a different architecture.
You should try appending "ARCH=i386" to all your make commands :
# make oldconfig ARCH=i386
# make dep ARCH=i386 && make bzImage ARCH=i386
# make modules ARCH=i386
It should theorically work, but since this is not used very often, it is
possible that you still get minor trouble.
Regards,
Willy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-26 10:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24 12:16 How can I build a 2.4 kernel on a 2.6 System j.d.-linux-kernel
2008-10-24 20:29 ` Willy Tarreau
2008-10-26 10:32 ` Jörg Dohle
2008-10-26 10:41 ` Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox