lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 May 2010 20:46:53 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Jaswinder Singh Rajput <jaswinderlinux@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: config automatically switches from 32-bit to 64-bit for x86

On Thu, May 27, 2010 at 11:49:16AM -0400, 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.

The request when we did the merge of 32 and 64 bit was that we
should continue to build 64bit kernels on 64 bit machines.
And likewise for 32bit.
Because this was what the users where used to.

We could simplify metters by defining new rules.
As you suggest that uname on an intel box always resulted in ARCH=x86.
But then people would complain why a 32 bit kernel is default when
the box is 64 bit.

Something like this:
[The escape chars align nicely in the patched Makefile]

	Sam

diff --git a/Makefile b/Makefile
index ebc8225..e7f97a5 100644
--- a/Makefile
+++ b/Makefile
@@ -161,10 +161,11 @@ export srctree objtree VPATH
 # then ARCH is assigned, getting whatever value it gets normally, and 
 # SUBARCH is subsequently ignored.
 
-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-				  -e s/arm.*/arm/ -e s/sa110/arm/ \
+SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/        \
+				  -e s/sun4u/sparc64/                    \
+				  -e s/arm.*/arm/ -e s/sa110/arm/        \
 				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
-				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/  \
 				  -e s/sh[234].*/sh/ )
 
 # Cross compiling and selecting different set of gcc/bin-utils

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ