From: Randy Dunlap on
On Thu, 27 May 2010 12:31:23 +0800 Am�rico Wang wrote:

> On Thu, May 27, 2010 at 09:39:51AM +0530, Jaswinder Singh Rajput wrote:
> >Hello Rafael,
> >
> >On Thu, May 27, 2010 at 5:43 AM, Rafael J. Wysocki <rjw(a)sisk.pl> wrote:
> >> On Thursday 27 May 2010, Jaswinder Singh Rajput wrote:
> >>> Hello,
> >>>
> >>> I am trying to build 32 bit kernel image on 64-bit machine but after
> >>> 'make menuconfig' it automatically switches 32-bit to 64-bit.
> >>
> >> Try 'linux32 make menuconfig' and 'linux32 make'.
> >>
> >
> >Yes, this works :-)
>
>
> I think 'make ARCH=i386 menuconfig' also works.

Yes, that's what I use. I wasn't familiar with the "linux32 make ..." usage.


> >But I wonder then what is the point/use of CONFIG_X86_32 if compiler
> >is not listening to it.
> >
> >Logically compiler should set appropriate flags based on .config settings.
> >
>
> It's not compiler, it's kbuild, kbuild tries to determine the arch
> by 'uname -m'.
> --


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Américo Wang on
On Thu, May 27, 2010 at 10:53:41AM +0530, Jaswinder Singh Rajput wrote:
>On Thu, May 27, 2010 at 10:01 AM, Américo Wang <xiyou.wangcong(a)gmail.com> wrote:
>> On Thu, May 27, 2010 at 09:39:51AM +0530, Jaswinder Singh Rajput wrote:
>>>
>>>But I wonder then what is the point/use of CONFIG_X86_32 if compiler
>>>is not listening to it.
>>>
>>>Logically compiler should set appropriate flags based on .config settings.
>>>
>>
>> It's not compiler, it's kbuild, kbuild tries to determine the arch
>> by 'uname -m'.
>>
>
>Ahh, then kbuild is buggy, kbuild should check .config instead of
>'uname -m' and verify from user if it mismatches.
>

Why? You didn't use 'make oldconfig', why shoud it check?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthias Schniedermeyer on
On 27.05.2010 02:13, Rafael J. Wysocki wrote:
> On Thursday 27 May 2010, Jaswinder Singh Rajput wrote:
> > Hello,
> >
> > I am trying to build 32 bit kernel image on 64-bit machine but after
> > 'make menuconfig' it automatically switches 32-bit to 64-bit.
>
> Try 'linux32 make menuconfig' and 'linux32 make'.

I personally use the third ARCH (i386 and x86_64 beeing the first two):
make ARCH=x86
that way the bitness isn't implied but an actual configuration-point.
CONFIG_64BIT (The very first menu-point with menuconfig)

And i'm still wondering what the hell the problem is with ARCH=x86 that
prevents it from beeing the default.



Bis denn

--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Christoph Hellwig on
On Thu, May 27, 2010 at 05:37:36AM +0530, Jaswinder Singh Rajput wrote:
> Hello,
>
> I am trying to build 32 bit kernel image on 64-bit machine but after
> 'make menuconfig' it automatically switches 32-bit to 64-bit.
>
> Is this a BUG or did intentionally.

I think it's intentional, but I'm really annoyed by this behaviour.
I really don't want my config to change from a normal make depending
on uname output. We do have a CONFIG_64BIT in .config which should
be respected. uname output is a good indicator for a previously
unconfigured kernel, but shouldn't change settings for a fully
congigured build. Forgetting the linux32 command happens at least two
dozen times to me everyday, leading to a few lost seconds that add
up in the end.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthias Schniedermeyer on
On 27.05.2010 11:49, Christoph Hellwig wrote:
> On Thu, May 27, 2010 at 05:37:36AM +0530, Jaswinder Singh Rajput wrote:
> > Hello,
> >
> > I am trying to build 32 bit kernel image on 64-bit machine but after
> > 'make menuconfig' it automatically switches 32-bit to 64-bit.
> >
> > Is this a BUG or did intentionally.
>
> I think it's intentional, but I'm really annoyed by this behaviour.
> I really don't want my config to change from a normal make depending
> on uname output. We do have a CONFIG_64BIT in .config which should
> be respected. uname output is a good indicator for a previously
> unconfigured kernel, but shouldn't change settings for a fully
> congigured build. Forgetting the linux32 command happens at least two
> dozen times to me everyday, leading to a few lost seconds that add
> up in the end.

Just use ARCH=x86. That ARCH respects CONFIG_64BIT from .config and
"CONFIG_64BIT" is a config-option (the very first in menuconfig)





Bis denn

--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/