* Suggestion: Improve the dependency information during Kconfig compilation
@ 2023-05-18 7:05 sunying
2023-05-20 5:21 ` Masahiro Yamada
0 siblings, 1 reply; 5+ messages in thread
From: sunying @ 2023-05-18 7:05 UTC (permalink / raw)
To: masahiroy, linux-kbuild
Hi,
We found that the Kconfig build system silently changes invalid values in the. config file,
which may prevent users from getting their desired kernel, and also make it hard to know
which configuration option caused the forced change based on the compilation information.
There are similar questions on stack overflow, where people find it difficult to get
the complete dependency chain and other information:
ex1. How can I disable CONFIG_PM when building Linux kernel for x86_64 - Stack Overflow
https://stackoverflow.com/questions/64499221/how-can-i-disable-config-pm-when-building-linux-kernel-for-x86-64/64501647#64501647
ex2. c - kernel symbol enabled but doesn't shows up in .config - Stack Overflow
https://stackoverflow.com/questions/24074116/kernel-symbol-enabled-but-doesnt-shows-up-in-config)
ex3. makefile - update menuconfig entries without recompiling all the kernel - Stack Overflow
https://stackoverflow.com/questions/71075113/update-menuconfig-entries-without-recompiling-all-the-kernel
ex4. linux - disabling CONFIG_NET_DMA - Stack Overflow
https://stackoverflow.com/questions/30794576/disabling-config-net-dma/30796820#30796820
We plan to optimize the conf_read() function in /scripts/kconfig/confdata.c,
and add information for the mismatched configuration options to help users get the desired Linux kernel.
Do you think it's necessary? Any suggestions?
Best regards,
Siyuan Guo
Ying Sun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Suggestion: Improve the dependency information during Kconfig compilation
2023-05-18 7:05 Suggestion: Improve the dependency information during Kconfig compilation sunying
@ 2023-05-20 5:21 ` Masahiro Yamada
2023-05-31 8:11 ` sunying
0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2023-05-20 5:21 UTC (permalink / raw)
To: sunying; +Cc: linux-kbuild
On Thu, May 18, 2023 at 4:13 PM <sunying@nj.iscas.ac.cn> wrote:
>
> Hi,
>
>
> We found that the Kconfig build system silently changes invalid values in the. config file,
> which may prevent users from getting their desired kernel, and also make it hard to know
> which configuration option caused the forced change based on the compilation information.
>
> There are similar questions on stack overflow, where people find it difficult to get
> the complete dependency chain and other information:
>
> ex1. How can I disable CONFIG_PM when building Linux kernel for x86_64 - Stack Overflow
> https://stackoverflow.com/questions/64499221/how-can-i-disable-config-pm-when-building-linux-kernel-for-x86-64/64501647#64501647
>
> ex2. c - kernel symbol enabled but doesn't shows up in .config - Stack Overflow
> https://stackoverflow.com/questions/24074116/kernel-symbol-enabled-but-doesnt-shows-up-in-config)
>
> ex3. makefile - update menuconfig entries without recompiling all the kernel - Stack Overflow
> https://stackoverflow.com/questions/71075113/update-menuconfig-entries-without-recompiling-all-the-kernel
>
> ex4. linux - disabling CONFIG_NET_DMA - Stack Overflow
> https://stackoverflow.com/questions/30794576/disabling-config-net-dma/30796820#30796820
>
> We plan to optimize the conf_read() function in /scripts/kconfig/confdata.c,
> and add information for the mismatched configuration options to help users get the desired Linux kernel.
> Do you think it's necessary? Any suggestions?
>
It may be helpful.
I do not know if such warnings should be turned on by default,
or under some verbose mode, though.
> Best regards,
> Siyuan Guo
> Ying Sun
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Suggestion: Improve the dependency information during Kconfig compilation
2023-05-20 5:21 ` Masahiro Yamada
@ 2023-05-31 8:11 ` sunying
2023-06-06 4:10 ` Masahiro Yamada
0 siblings, 1 reply; 5+ messages in thread
From: sunying @ 2023-05-31 8:11 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild
On Sat, May 20, 2023 at 1:21 PM <masahiroy@kernel.org> wrote:
>
> On Thu, May 18, 2023 at 4:13 PM <sunying@nj.iscas.ac.cn> wrote:
> >
> > Hi,
> >
> >
> > We found that the Kconfig build system silently changes invalid values in the. config file,
> > which may prevent users from getting their desired kernel, and also make it hard to know
> > which configuration option caused the forced change based on the compilation information.
> >
> > There are similar questions on stack overflow, where people find it difficult to get
> > the complete dependency chain and other information:
> >
> > ex1. How can I disable CONFIG_PM when building Linux kernel for x86_64 - Stack Overflow
> > https://stackoverflow.com/questions/64499221/how-can-i-disable-config-pm-when-building-linux-kernel-for-x86-64/64501647#64501647
> >
> > ex2. c - kernel symbol enabled but doesn't shows up in .config - Stack Overflow
> > https://stackoverflow.com/questions/24074116/kernel-symbol-enabled-but-doesnt-shows-up-in-config)
> >
> > ex3. makefile - update menuconfig entries without recompiling all the kernel - Stack Overflow
> > https://stackoverflow.com/questions/71075113/update-menuconfig-entries-without-recompiling-all-the-kernel
> >
> > ex4. linux - disabling CONFIG_NET_DMA - Stack Overflow
> > https://stackoverflow.com/questions/30794576/disabling-config-net-dma/30796820#30796820
> >
> > We plan to optimize the conf_read() function in /scripts/kconfig/confdata.c,
> > and add information for the mismatched configuration options to help users get the desired Linux kernel.
> > Do you think it's necessary? Any suggestions?
> >
>
>
> It may be helpful.
> I do not know if such warnings should be turned on by default,
> or under some verbose mode, though.
>
Can we reuse "KBUILD_VERBOSE" switch to print more warning?
By default, a message is added as follows only when invalid values in .config are detected:
"warning: values in .config are forcibly modified to meet the kconfig dependency constraints.
For more information, enable the environment variable 'export KBUILD_VERBOSE=1'."
In verbose mode, print invalid configuration options one by one, including error causes and current values,
to help users correct them. For example, in the case of ex1. above, we can prompt with the following message:
"file:line: warning: 'CONFIG_PM' reverse select error, due to 'CONFIG_PM_SLEEO' is set to 'y'."
Do you think this would work? Can we modify it in this way?
> > Best regards,
> > Siyuan Guo
> > Ying Sun
> >
> >
>
>
> --
> Best Regards
> Masahiro Yamada
--
Best regards,
Siyuan Guo
Ying Sun
</sunying@nj.iscas.ac.cn></masahiroy@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Suggestion: Improve the dependency information during Kconfig compilation
2023-05-31 8:11 ` sunying
@ 2023-06-06 4:10 ` Masahiro Yamada
[not found] ` <3b2ebf53.22a5.188ad14a0cb.Coremail.sunying@nj.iscas.ac.cn>
0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2023-06-06 4:10 UTC (permalink / raw)
To: sunying; +Cc: linux-kbuild
On Wed, May 31, 2023 at 5:11 PM <sunying@nj.iscas.ac.cn> wrote:
>
> On Sat, May 20, 2023 at 1:21 PM <masahiroy@kernel.org> wrote:
> >
> > On Thu, May 18, 2023 at 4:13 PM <sunying@nj.iscas.ac.cn> wrote:
> > >
> > > Hi,
> > >
> > >
> > > We found that the Kconfig build system silently changes invalid values in the. config file,
> > > which may prevent users from getting their desired kernel, and also make it hard to know
> > > which configuration option caused the forced change based on the compilation information.
> > >
> > > There are similar questions on stack overflow, where people find it difficult to get
> > > the complete dependency chain and other information:
> > >
> > > ex1. How can I disable CONFIG_PM when building Linux kernel for x86_64 - Stack Overflow
> > > https://stackoverflow.com/questions/64499221/how-can-i-disable-config-pm-when-building-linux-kernel-for-x86-64/64501647#64501647
> > >
> > > ex2. c - kernel symbol enabled but doesn't shows up in .config - Stack Overflow
> > > https://stackoverflow.com/questions/24074116/kernel-symbol-enabled-but-doesnt-shows-up-in-config)
> > >
> > > ex3. makefile - update menuconfig entries without recompiling all the kernel - Stack Overflow
> > > https://stackoverflow.com/questions/71075113/update-menuconfig-entries-without-recompiling-all-the-kernel
> > >
> > > ex4. linux - disabling CONFIG_NET_DMA - Stack Overflow
> > > https://stackoverflow.com/questions/30794576/disabling-config-net-dma/30796820#30796820
> > >
> > > We plan to optimize the conf_read() function in /scripts/kconfig/confdata.c,
> > > and add information for the mismatched configuration options to help users get the desired Linux kernel.
> > > Do you think it's necessary? Any suggestions?
> > >
> >
> >
> > It may be helpful.
> > I do not know if such warnings should be turned on by default,
> > or under some verbose mode, though.
> >
>
>
> Can we reuse "KBUILD_VERBOSE" switch to print more warning?
> By default, a message is added as follows only when invalid values in .config are detected:
> "warning: values in .config are forcibly modified to meet the kconfig dependency constraints.
> For more information, enable the environment variable 'export KBUILD_VERBOSE=1'."
>
> In verbose mode, print invalid configuration options one by one, including error causes and current values,
> to help users correct them. For example, in the case of ex1. above, we can prompt with the following message:
> "file:line: warning: 'CONFIG_PM' reverse select error, due to 'CONFIG_PM_SLEEO' is set to 'y'."
>
> Do you think this would work? Can we modify it in this way?
I prefer a separate option (e.g. "KCONFIG_*")
because KBUILD_VERBOSE=1 is a different class of verbosity.
And, I'd like to keep it quiet by default (current behavior).
>
>
> > > Best regards,
> > > Siyuan Guo
> > > Ying Sun
> > >
> > >
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada
>
>
> --
> Best regards,
> Siyuan Guo
> Ying Sun
> </sunying@nj.iscas.ac.cn></masahiroy@kernel.org>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Re: Suggestion: Improve the dependency information during Kconfig compilation
[not found] ` <3b2ebf53.22a5.188ad14a0cb.Coremail.sunying@nj.iscas.ac.cn>
@ 2023-06-15 13:02 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2023-06-15 13:02 UTC (permalink / raw)
To: sunying; +Cc: linux-kbuild
On Mon, Jun 12, 2023 at 9:57 AM <sunying@nj.iscas.ac.cn> wrote:
>
> On Tue, June 6, 2023 at 12:10 AM <masahiroy@kernel.org> wrote:
> >
> > On Wed, May 31, 2023 at 5:11 PM <sunying@nj.iscas.ac.cn> wrote:
> > >
> > > On Sat, May 20, 2023 at 1:21 PM <masahiroy@kernel.org> wrote:
> > > >
> > > > On Thu, May 18, 2023 at 4:13 PM <sunying@nj.iscas.ac.cn> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > > We found that the Kconfig build system silently changes invalid values in the. config file,
> > > > > which may prevent users from getting their desired kernel, and also make it hard to know
> > > > > which configuration option caused the forced change based on the compilation information.
> > > > >
> > > > > There are similar questions on stack overflow, where people find it difficult to get
> > > > > the complete dependency chain and other information:
> > > > >
> > > > > ex1. How can I disable CONFIG_PM when building Linux kernel for x86_64 - Stack Overflow
> > > > > https://stackoverflow.com/questions/64499221/how-can-i-disable-config-pm-when-building-linux-kernel-for-x86-64/64501647#64501647
> > > > >
> > > > > ex2. c - kernel symbol enabled but doesn't shows up in .config - Stack Overflow
> > > > > https://stackoverflow.com/questions/24074116/kernel-symbol-enabled-but-doesnt-shows-up-in-config)
> > > > >
> > > > > ex3. makefile - update menuconfig entries without recompiling all the kernel - Stack Overflow
> > > > > https://stackoverflow.com/questions/71075113/update-menuconfig-entries-without-recompiling-all-the-kernel
> > > > >
> > > > > ex4. linux - disabling CONFIG_NET_DMA - Stack Overflow
> > > > > https://stackoverflow.com/questions/30794576/disabling-config-net-dma/30796820#30796820
> > > > >
> > > > > We plan to optimize the conf_read() function in /scripts/kconfig/confdata.c,
> > > > > and add information for the mismatched configuration options to help users get the desired Linux kernel.
> > > > > Do you think it's necessary? Any suggestions?
> > > > >
> > > >
> > > >
> > > > It may be helpful.
> > > > I do not know if such warnings should be turned on by default,
> > > > or under some verbose mode, though.
> > > >
> > >
> > >
> > > Can we reuse "KBUILD_VERBOSE" switch to print more warning?
> > > By default, a message is added as follows only when invalid values in .config are detected:
> > > "warning: values in .config are forcibly modified to meet the kconfig dependency constraints.
> > > For more information, enable the environment variable 'export KBUILD_VERBOSE=1'."
> > >
> > > In verbose mode, print invalid configuration options one by one, including error causes and current values,
> > > to help users correct them. For example, in the case of ex1. above, we can prompt with the following message:
> > > "file:line: warning: 'CONFIG_PM' reverse select error, due to 'CONFIG_PM_SLEEO' is set to 'y'."
> > >
> > > Do you think this would work? Can we modify it in this way?
> >
> >
> > I prefer a separate option (e.g. "KCONFIG_*")
> > because KBUILD_VERBOSE=1 is a different class of verbosity.
> >
> > And, I'd like to keep it quiet by default (current behavior).
> >
> >
> >
> >
> >
>
> Thank you for your reply and suggestions.
>
> By default, the current behavior is not changed.
> Detailed error messages are printed only when the separate option is turned on.
> We are considering naming the option as "KCONFIG_VERBOSE" or "KCONFIG_WARNING" or
> "KCONFIG_DEBUG". Which do you think is more appropriate?
I think KCONFIG_VERBOSE is fine.
Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-15 13:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-18 7:05 Suggestion: Improve the dependency information during Kconfig compilation sunying
2023-05-20 5:21 ` Masahiro Yamada
2023-05-31 8:11 ` sunying
2023-06-06 4:10 ` Masahiro Yamada
[not found] ` <3b2ebf53.22a5.188ad14a0cb.Coremail.sunying@nj.iscas.ac.cn>
2023-06-15 13:02 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.