Re: hidden string Kconfig ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/18 2:32 PM, Daniel Walker wrote:
> Hi,
> 
> 
> I'm trying to find out if it's possible to have a string in Kconfig which is
> hidden from the menu, but still exists in the .config? 
> 
> Like,
> 
> HIDDEN_STRING
> 	string
> 
> then in the config file there would be,
> CONFIG_HIDDEN_STRING="hidden"
> 
> and the config option wouldn't be used for anything inside Kconfig. It would
> just get set from the .config , or not be set?
> 
> The above sample, I've not been able to make work. The string in the .config
> gets erased when menuconfig runs.
> 
> Any help appreciated.

Hi,

There are several "string" Kconfig symbols in init/Kconfig that do not have
a prompt string after them.  I believe that these do what you are asking about.
If not, please provide your example that is not working.

Or:  this one works for me:

---
 init/Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20181114.orig/init/Kconfig
+++ linux-next-20181114/init/Kconfig
@@ -1858,6 +1858,10 @@ config CMDLINE
 
 endif
 
+config SPECIAL_STRING
+	string
+	default "special"
+
 endmenu		# General setup
 
 source "arch/Kconfig"


and "make oldconfig" gives me a .config file that contains:
CONFIG_SPECIAL_STRING="special"


HTH.  or ask more questions...

-- 
~Randy



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux