Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Oleksii <inisider@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: forcibly disable config
Date: Wed, 23 Aug 2023 15:45:51 +0300	[thread overview]
Message-ID: <f67bae5ffacbb1e86c9f06ef601fccb0d532ba4f.camel@gmail.com> (raw)

Hello, dear community,

I want to ask what is a proper way to disable config forcibly.

For example, I have some config somewhere in common Kconfig:
config NAME
bool "some short description" if EXPERT
default y

When I do the command `make olddefconfig`, it will generate a new
config based on old .config.
So my expectation was if I put CONFIG_NAME=n to .config and then ran
the command, I'll get CONFIG_NAME=n in the final .config, but it
doesn't work.

If you update 'config NAME' from `default y` to `default n`, all will
be fine, but it is not the best solution to touch common Kconfig.
If you use 'make defconfig' and put `# CONFIG_NAME is not set`, then
all will be fine too, but my CI uses 'make olddefconfig`, which ignores
`*_defconfig`.
Also, I tried to override CONFIG_NAME in arch-specific Kconfig in the
following way:
config NAME
bool
default n
and it works for olddefconfig, but if you use `make randconfig`, it
still can set CONFIG_NAME=y.

I tried debugging the conf utility and found that [1] CONFIG_NAME is
set to n, but [2] it takes `default y` from the original in Kconfig
common, ignoring what I write to .config.
Is it expected behavior?

Could you please let me know the right solution?


[1]
https://github.com/torvalds/linux/blob/master/scripts/kconfig/confdata.c#L490


[2]
https://github.com/torvalds/linux/blob/master/scripts/kconfig/symbol.c#L394


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

                 reply	other threads:[~2023-08-23 12:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=f67bae5ffacbb1e86c9f06ef601fccb0d532ba4f.camel@gmail.com \
    --to=inisider@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).