linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Les Boys <lesboyspp43@outlook.com>,
	"yann.morin.1998@free.fr" <yann.morin.1998@free.fr>
Cc: "linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [QUESTION] Why tristate look like bool?
Date: Wed, 3 Dec 2025 09:53:29 -0800	[thread overview]
Message-ID: <a19284f6-1a60-4aab-ac2a-ecb81a89fa49@infradead.org> (raw)
In-Reply-To: <SA2PR10MB4460C7DC4762FBD3065F0794A6D9A@SA2PR10MB4460.namprd10.prod.outlook.com>

Hi,

On 12/3/25 4:07 AM, Les Boys wrote:
> First, I wrote a minimal Kconfig:
> ```
> config TRISTATE_TEST
>     tristate "Test"
> ```
> Then, I ran:
> ```
> ./conf --oldaskconfig test.lbConfig
> ```
> Finally, it showed:
> ```
> Test (TRISTATE_TEST) [N/y] (NEW): 
> ```
> This is not excepted, it should shows:
> ```
> Test (TRISTATE_TEST) [N/y/m] (NEW): 
> ```
> I am confused about this problem, no document talks about it, please explain to me, thanks.

I was fairly sure that it has something to do with MODULES.
To your test config file, I added:

config MODULES
    def_bool y

but the test results were still the same. Then I recalled that there is
a special keyword for "modules", described (or mentioned) in
Documentation/kbuild/kconfig-language.rst. When I add "modules" to
CONFIG_MODULES, it works as expected.

config MODULES
	modules
	def_bool y

The kconfig subsystem knows about modular builds but they must be
enabled for them to be allowed on other kconfig symbols.

HTH.

-- 
~Randy


      reply	other threads:[~2025-12-03 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 12:07 [QUESTION] Why tristate look like bool? Les Boys
2025-12-03 17:53 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a19284f6-1a60-4aab-ac2a-ecb81a89fa49@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=lesboyspp43@outlook.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).