lkml.org 
[lkml]   [2022]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/config: Make the x86 defconfigs a bit more usable
On Sun, Mar 27, 2022 at 09:03:14PM +0200, Ingo Molnar wrote:
> Yeah, good catch! ...
>
> I use defconfigs by explicitly adding in the architecture:
>
> kepler:~/tip> make ARCH=i386 defconfig
>
> kepler:~/tip> kconfig-arch
> i386
>
> ... so never I noticed this bug.

Ah, good point!

> I fixed this in the latest version (attached).
>
> Arguably 'make ARCH=i386 savedefconfig' should preserve this, so that
> refreshing defconfigs on bi-arch architectures is idempotent, but that's no
> excuse to regress the existing defconfig behavior.

Hmmm, I thought that it would, but I think the behavior of savedefconfig
is actually correct with regards to how it handles CONFIG_64BIT in the
presence of an explicit ARCH value, based on how CONFIG_64BIT is
defined:

config 64BIT
bool "64-bit kernel" if "$(ARCH)" = "x86"
default "$(ARCH)" != "i386"
help
Say yes to build a 64-bit kernel - formerly known as x86_64
Say no to build a 32-bit kernel - formerly known as i386

As the default is no when ARCH == i386 and there is no prompt in that
situation, "# CONFIG_64BIT is not set" gets dropped, as that is the
default. Using savedefconfig without the ARCH variable would do the
right thing.

I tried playing around with these Kconfig symbols to see if I could get
something that would work for savedefconfig with or without ARCH, but I
could not really come up with anything. I did not try super hard though,
it might still be possible.

Cheers,
Nathan

\
 
 \ /
  Last update: 2022-03-28 17:42    [W:0.195 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site