2009-03-31 06:50:06

by Peter Teoh

[permalink] [raw]
Subject: "make oldconfig" problem

When I do "make oldconfig" on the latest linus git tree, I got:

make oldconfig
scripts/kconfig/conf -o arch/x86/Kconfig
usr/Kconfig:145:warning: defaults for choice values not supported
#
# configuration written to .config
#

But checking usr/Kconfig:145:

if INITRAMFS_SOURCE=""
# The builtin initramfs is so small so we don't want to bug the user...

config INITRAMFS_COMPRESSION_NONE
bool
default y

endif

I cannot understand the source of errors as well? Frederic, any ideas?

--
Regards,
Peter Teoh


2009-03-31 08:47:30

by Jike Song

[permalink] [raw]
Subject: Re: "make oldconfig" problem

On Tue, Mar 31, 2009 at 2:49 PM, Peter Teoh <[email protected]> wrote:
> When I do "make oldconfig" on the latest linus git tree, I got:
>
> make oldconfig
> scripts/kconfig/conf -o arch/x86/Kconfig
> usr/Kconfig:145:warning: defaults for choice values not supported
> #
> # configuration written to .config
> #
>
> But checking usr/Kconfig:145:
>
> if INITRAMFS_SOURCE=""
> # The builtin initramfs is so small so we don't want to bug the user...
>
> config INITRAMFS_COMPRESSION_NONE
>        bool
>        default y
>
> endif
>
> I cannot understand the source of errors as well?   Frederic, any ideas?
>
> --
> Regards,
> Peter Teoh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

Seems to be caused by
40297927575a50b1d0d308d735c445924d33fba6("bzip2/lzma: don't ask for
compression mode for the default initramfs").

I get no errors with that commit reverted.


--
Thanks,
Jike

2009-03-31 08:51:36

by Peter Teoh

[permalink] [raw]
Subject: Re: "make oldconfig" problem

On Tue, Mar 31, 2009 at 4:47 PM, Jike Song <[email protected]> wrote:
> On Tue, Mar 31, 2009 at 2:49 PM, Peter Teoh <[email protected]> wrote:
>> When I do "make oldconfig" on the latest linus git tree, I got:
>>
>> make oldconfig
>> scripts/kconfig/conf -o arch/x86/Kconfig
>> usr/Kconfig:145:warning: defaults for choice values not supported
>> #
>> # configuration written to .config
>> #
>>
>> But checking usr/Kconfig:145:
>>
>> if INITRAMFS_SOURCE=""
>> # The builtin initramfs is so small so we don't want to bug the user...
>>
>> config INITRAMFS_COMPRESSION_NONE
>> ? ? ? ?bool
>> ? ? ? ?default y
>>
>> endif
>>
>> I cannot understand the source of errors as well? ? Frederic, any ideas?
>>
>> --
>> Regards,
>> Peter Teoh
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to [email protected]
>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at ?http://www.tux.org/lkml/
>>
>
> Seems to be caused by
> 40297927575a50b1d0d308d735c445924d33fba6("bzip2/lzma: don't ask for
> compression mode for the default initramfs").
>
> I get no errors with that commit reverted.
>

Thank you, will try that.


--
Regards,
Peter Teoh

2009-03-31 19:35:38

by H. Peter Anvin

[permalink] [raw]
Subject: Re: "make oldconfig" problem

Peter Teoh wrote:
>>>
>> Seems to be caused by
>> 40297927575a50b1d0d308d735c445924d33fba6("bzip2/lzma: don't ask for
>> compression mode for the default initramfs").
>>
>> I get no errors with that commit reverted.
>
> Thank you, will try that.
>

Linus complained about a choice that didn't make sense for most users.
Unfortunately Kconfig doesn't seem to have a sane block to deal with
having alternatives to conditionalized choice blocks.

Fortunately, CONFIG_INITRAMFS_COMPRESSION_NONE doesn't actually *do*
anything, so this is probably the preferred hack.

Could you try this out? If it works as expected for you as well as me,
I'll push it to Linus.

-hpa


Attachments:
0001-bzip2-lzma-quiet-Kconfig-warning-for-INITRAMFS_COMP.patch (1.78 kB)

2009-04-01 06:35:46

by Peter Teoh

[permalink] [raw]
Subject: Re: "make oldconfig" problem

On Wed, Apr 1, 2009 at 3:35 AM, H. Peter Anvin <[email protected]> wrote:
> Peter Teoh wrote:
>>>>
>>> Seems to be caused by
>>> 40297927575a50b1d0d308d735c445924d33fba6("bzip2/lzma: don't ask for
>>> compression mode for the default initramfs").
>>>
>>> I get no errors with that commit reverted.
>>
>> Thank you, will try that.
>>
>
> Linus complained about a choice that didn't make sense for most users.
> Unfortunately Kconfig doesn't seem to have a sane block to deal with having
> alternatives to conditionalized choice blocks.
>
> Fortunately, CONFIG_INITRAMFS_COMPRESSION_NONE doesn't actually *do*
> anything, so this is probably the preferred hack.
>
> Could you try this out? ?If it works as expected for you as well as me, I'll
> push it to Linus.
>
> ? ? ? ?-hpa
>
>

Yes, it worked for me, compiled fine and well. Thanks.


--
Regards,
Peter Teoh

2009-04-01 07:10:20

by H. Peter Anvin

[permalink] [raw]
Subject: [GIT PULL] bzip2/lzma Kconfig warning fix

Hi Linus,

This patch should take care of the annoying Kconfig warning from the
bzip2/lzma code.

The following changes since commit 15f7176eb1cccec0a332541285ee752b935c1c85:
Linus Torvalds (1):
Merge git://git.kernel.org/.../davem/net-2.6

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git bzip2-lzma-for-linus

H. Peter Anvin (1):
bzip2/lzma: quiet Kconfig warning for INITRAMFS_COMPRESSION_NONE

usr/Kconfig | 15 +--------------
usr/Makefile | 3 ---
2 files changed, 1 insertions(+), 17 deletions(-)

commit 1359096eacb1971be67eead8bf9b582864d92a30
Author: H. Peter Anvin <[email protected]>
Date: Tue Mar 31 12:24:17 2009 -0700

bzip2/lzma: quiet Kconfig warning for INITRAMFS_COMPRESSION_NONE

Impact: quiet Kconfig warning

It appears that Kconfig simply has no way to provide defaults for
entries that exist inside a conditionalized choice block.
Fortunately, it turns out we don't actually ever use
CONFIG_INITRAMFS_COMPRESSION_NONE, so we can just drop it for
everything outside the choice block.

Signed-off-by: H. Peter Anvin <[email protected]>

diff --git a/usr/Kconfig b/usr/Kconfig
index 588c588..1c3039f 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -72,10 +72,8 @@ config RD_LZMA
Support loading of a LZMA encoded initial ramdisk or cpio buffer
If unsure, say N.

-if INITRAMFS_SOURCE!=""
-
choice
- prompt "Built-in initramfs compression mode"
+ prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!=""
help
This option decides by which algorithm the builtin initramfs
will be compressed. Several compression algorithms are
@@ -134,14 +132,3 @@ config INITRAMFS_COMPRESSION_LZMA
smaller with LZMA in comparison to gzip.

endchoice
-
-endif
-
-if INITRAMFS_SOURCE=""
-# The builtin initramfs is so small so we don't want to bug the user...
-
-config INITRAMFS_COMPRESSION_NONE
- bool
- default y
-
-endif
diff --git a/usr/Makefile b/usr/Makefile
index b84894b..245145a 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -6,9 +6,6 @@ klibcdirs:;
PHONY += klibcdirs


-# No compression
-suffix_$(CONFIG_INITRAMFS_COMPRESSION_NONE) =
-
# Gzip, but no bzip2
suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz

2009-04-01 08:03:38

by Torsten Schmidt

[permalink] [raw]
Subject: Re: "make oldconfig" problem

Hi,

fixes also my problem, reported some days ago:
http://lkml.org/lkml/2009/3/30/384

Thx, Torsten