Skip to contentSkip to conversation

"make oldconfig" problem

DISCUSSION Peter Teoh 3 participants 6 messages Mar 31, 2009 – Apr 1, 2009 Kbuild

lore
Share & tools
lore

Peter Teoh

author
#0 lore raw

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?

Signature · 2 lines
Regards,
Peter Teoh
#1 lore raw
Quoted 22 lines · Peter Teoh

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?

Quoted 9 lines

--
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.

Signature · 2 lines
Thanks,
Jike
author
#2 lore raw
Quoted 33 lines · Jike Song
Quoted 22 lines · Peter Teoh

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?

Quoted 9 lines

--
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/

Quoted 6 lines

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.

Signature · 2 lines
Regards,
Peter Teoh
#3 lore raw
Quoted 9 lines · Peter Teoh
Quoted 6 lines
Quoted 1 line

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

Quoted 1 line

From 758d6f7ba5a26b07ecd99ad7966b5ce3531b1f0a Mon Sep 17 00:00:00 2001

From: H. Peter Anvin <[email protected]>
Date: Tue, 31 Mar 2009 12:24:17 -0700
Subject: [PATCH] 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.

---
 usr/Kconfig  |   15 +--------------
 usr/Makefile |    3 ---
 2 files changed, 1 insertions(+), 17 deletions(-)
usr/Kconfig +1 -14
index 588c588..1c3039f 100644
@@ -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
usr/Makefile +0 -3
index b84894b..245145a 100644
@@ -6,9 +6,6 @@ klibcdirs:;
 PHONY += klibcdirs
 
 
-# No compression
-suffix_$(CONFIG_INITRAMFS_COMPRESSION_NONE)   =
-
 # Gzip, but no bzip2
 suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP)   = .gz
 
Signature · 1 line
1.6.0.6
author
#4 lore raw
Quoted 15 lines · H. Peter Anvin
Quoted 9 lines · Peter Teoh
Quoted 6 lines
Quoted 1 line

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.

Quoted 9 lines

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.

Signature · 2 lines
Regards,
Peter Teoh
#5 lore raw

[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.

usr/Kconfig +1 -14
index 588c588..1c3039f 100644
@@ -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
usr/Makefile +0 -3
index b84894b..245145a 100644
@@ -6,9 +6,6 @@ klibcdirs:;
 PHONY += klibcdirs
 
 
-# No compression
-suffix_$(CONFIG_INITRAMFS_COMPRESSION_NONE)   =
-
 # Gzip, but no bzip2
 suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP)   = .gz