public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: "Jörg Dohle" <j.d.-linux-kernel@arcor.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How can I build a 2.4 kernel on a 2.6 System
Date: Sun, 26 Oct 2008 11:41:04 +0100	[thread overview]
Message-ID: <20081026104103.GW24654@1wt.eu> (raw)
In-Reply-To: <20CDA8F07DE345B8AA01B3C43EE8A6F7@pc686xpp>

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


      reply	other threads:[~2008-10-26 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081026104103.GW24654@1wt.eu \
    --to=w@1wt.eu \
    --cc=j.d.-linux-kernel@arcor.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox