Re: [PATCH] Fix corruption of CONFIG_X86_32 in 'make oldconfig'

From: David Woodhouse
Date: Mon May 30 2011 - 06:06:52 EST


On Mon, 2011-05-30 at 11:53 +0200, Ingo Molnar wrote:
> * David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
> > Good point. But shouldn't "make i386_defconfig" and "make
> > x86_64_defconfig" do that?
>
> Yeah, we could certainly fix (or extend?) kconfig to allow those
> forms too, if you would like to use them.

Those always worked. I actually *broke* it in my previous patch. Before
that, the 'i386_defconfig' never actually needed to *specify* that it
wanted CONFIG_64BIT=n, because that would never have been the default.
Adding '# CONFIG_64BIT is not set' to arch/x86/configs/i386_defconfig
fixes it.

> I personally prefer 'make ARCH=i386 defconfig' and 'make ARCH=x86_64
> defconfig' because it's a nice conceptual equivalent to:
>
> make ARCH=arm defconfig
> make ARCH=mips defconfig

No, ARCH= is just for cross-compiling. If you're *on* an ARM or MIPS
box, you don't need the ARCH= bit.

And it *doesn't* follow the pattern you seem to be looking for, because
it's *not* setting 32-bit or 64-bit compilation. ARM doesn't even *have*
64-bit support, but let's look at MIPS:

If you want a 64-bit MIPS kernel, you do something like
make bigsur_defconfig

If you want a 32-bit MIPS kernel, you do something like
make ar7_defconfig

You *don't* set 'ARCH=mips32' or 'ARCH=mips64'; CONFIG_64BIT is just a
config option.

Of course, MIPS makes it more "interesting" because it doesn't do a
"generic" kernel that boots on more than one machine. PowerPC is
probably the better analogy. There, it's:

make ppc_defconfig
and make ppc64_defconfig

And still no 'ARCH=ppc' or 'ARCH=ppc64'. Those got killed off a long
time ago, when we merged the 32-bit and 64-bit code into arch/powerpc.

And, as before, you don't need the ARCH=powerpc if you are already on a
PowerPC box. That's just for cross-compilation.

--
dwmw2

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