Re: [PATCH] Fix corruption of CONFIG_X86_32 in 'make oldconfig'
From: Ingo Molnar
Date: Mon May 30 2011 - 06:25:17 EST
* David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
> 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. [...]
Oh, that needs fixing then.
> [...] Before that, the 'i386_defconfig' never actually needed to
> *specify* that it wanted CONFIG_64BIT=n, [...]
Also arguably 'make i386_defconfig' has 'i386' implicit in its name,
so from a human workflow logic POV it would be rather silly to
require it.
> [...] 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.
Still note that 'make ARCH=arm defconfig' will just work fine even
without cross-building, so i often use just that if i want to see
what default core kernel options ARM (or MIPS) has enabled these
days.
> And it *doesn't* follow the pattern you seem to be looking for,
> because it's *not* setting 32-bit or 64-bit compilation. [...]
Sure it is setting it implicitly: it is defaulting to some of the
options, lacking any more specific input from the user.
Just like 'ARCH=x86 defconfig' defaults to the i386_defconfig.
> [...] 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
And if i just want a MIPS defconfig i type 'make ARCH=mips defconfig'
and get one.
ARCH=i386 and ARCH=x86_64 are two legacy architecture abbreviations
that are well established, so it makes quite a bit of sense to keep
those in addition to ARCH=x86. They also happen to work rather
intuitively both with defconfig and with randconfig.
And note that while i already mentioned how 'randconfig' and
'defconfig' works with ARCH=i386 and ARCH=x86_64 specifiers,
'oldconfig' works consistently as well. For example i often switch
over a 64-bit .config to 32-bit by doing this:
make ARCH=i386 oldconfig
that's a lot easier to do than to edit the .config. Similarly, i use
this:
make ARCH=x86_64 oldconfig
to switch a .config over from 32-bit to 64-bit. Please make sure this
still works with your patch applied.
Thanks,
Ingo
--
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/