* [PATCH v2 0/7] linux-kbuild: fix: process configs set to "y"
@ 2024-09-16 14:29 David Hunter
2024-09-17 14:45 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: David Hunter @ 2024-09-16 14:29 UTC (permalink / raw)
To: Masahiro Yamada
Cc: David Hunter, linux-kbuild, linux-kernel, shuah,
javier.carrasco.cruz
An assumption made in this script is that the config options do not need
to be processed because they will simply be in the new config file. This
assumption is incorrect.
Process the config entries set to "y" because those config entries might
have dependencies set to "m". If a config entry is set to "m" and is not
loaded directly into the machine, the script will currently turn off
that config entry; however, if that turned off config entry is a
dependency for a "y" option. that means the config entry set to "y"
will also be turned off later when the conf executive file is called.
Here is a model of the problem (arrows show dependency):
Original config file
Config_1 (m) <-- Config_2 (y)
Config_1 is not loaded in this example, so it is turned off.
After scripts/kconfig/streamline_config.pl, but before scripts/kconfig/conf
Config_1 (n) <-- Config_2 (y)
After scripts/kconfig/conf
Config_1 (n) <-- Config_2 (n)
It should also be noted that any module in the dependency chain will
also be turned off, even if that module is loaded directly onto the
computer. Here is an example:
Original config file
Config_1 (m) <-- Config_2 (y) <-- Config_3 (m)
Config_3 will be loaded in this example.
After scripts/kconfig/streamline_config.pl, but before scripts/kconfig/conf
Config_1 (n) <-- Config_2 (y) <-- Config_3 (m)
After scripts/kconfig/conf
Config_1 (n) <-- Config_2 (n) <-- Config_3 (n)
I discovered this problem when I ran "make localmodconfig" on a generic
Ubuntu config file. Many hardware devices were not recognized once the
kernel was installed and booted. Another way to reproduced the error I
had is to run "make localmodconfig" twice. The standard error might display
warnings that certain modules should be selected but no config files are
turned on that select that module.
With the changes in this series patch, all modules are loaded properly
and all of the hardware is loaded when the kernel is installed and
booted.
David Hunter (7):
linux-kbuild: fix: config option can be bool
linux-kbuild: fix: missing variable operator
linux-kbuild: fix: ensure all defaults are tracked
linux-kbuild: fix: ensure selected configs were turned on in original
linux-kbuild: fix: implement choice for kconfigs
linux-kbuild: fix: configs with defaults do not need a prompt
linux-kbuild: fix: process config options set to "y"
---
V2:
- Put in subject.
V1:
- https://lore.kernel.org/all/20240913171205.22126-1-david.hunter.linux@gmail.com/
---
scripts/kconfig/streamline_config.pl | 77 ++++++++++++++++++++++++----
1 file changed, 66 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 0/7] linux-kbuild: fix: process configs set to "y"
2024-09-16 14:29 [PATCH v2 0/7] linux-kbuild: fix: process configs set to "y" David Hunter
@ 2024-09-17 14:45 ` Masahiro Yamada
2024-09-17 22:45 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2024-09-17 14:45 UTC (permalink / raw)
To: David Hunter
Cc: linux-kbuild, linux-kernel, shuah, javier.carrasco.cruz,
Steven Rostedt
(+CC: Steven Rostedt, the author of this script)
On Mon, Sep 16, 2024 at 11:31 PM David Hunter
<david.hunter.linux@gmail.com> wrote:
>
> An assumption made in this script is that the config options do not need
> to be processed because they will simply be in the new config file. This
> assumption is incorrect.
>
> Process the config entries set to "y" because those config entries might
> have dependencies set to "m". If a config entry is set to "m" and is not
> loaded directly into the machine, the script will currently turn off
> that config entry; however, if that turned off config entry is a
> dependency for a "y" option. that means the config entry set to "y"
> will also be turned off later when the conf executive file is called.
>
> Here is a model of the problem (arrows show dependency):
>
> Original config file
> Config_1 (m) <-- Config_2 (y)
>
> Config_1 is not loaded in this example, so it is turned off.
> After scripts/kconfig/streamline_config.pl, but before scripts/kconfig/conf
> Config_1 (n) <-- Config_2 (y)
>
> After scripts/kconfig/conf
> Config_1 (n) <-- Config_2 (n)
>
>
> It should also be noted that any module in the dependency chain will
> also be turned off, even if that module is loaded directly onto the
> computer. Here is an example:
>
> Original config file
> Config_1 (m) <-- Config_2 (y) <-- Config_3 (m)
>
> Config_3 will be loaded in this example.
> After scripts/kconfig/streamline_config.pl, but before scripts/kconfig/conf
> Config_1 (n) <-- Config_2 (y) <-- Config_3 (m)
>
> After scripts/kconfig/conf
> Config_1 (n) <-- Config_2 (n) <-- Config_3 (n)
>
>
> I discovered this problem when I ran "make localmodconfig" on a generic
> Ubuntu config file. Many hardware devices were not recognized once the
> kernel was installed and booted. Another way to reproduced the error I
> had is to run "make localmodconfig" twice. The standard error might display
> warnings that certain modules should be selected but no config files are
> turned on that select that module.
>
> With the changes in this series patch, all modules are loaded properly
> and all of the hardware is loaded when the kernel is installed and
> booted.
>
>
> David Hunter (7):
> linux-kbuild: fix: config option can be bool
> linux-kbuild: fix: missing variable operator
> linux-kbuild: fix: ensure all defaults are tracked
> linux-kbuild: fix: ensure selected configs were turned on in original
> linux-kbuild: fix: implement choice for kconfigs
> linux-kbuild: fix: configs with defaults do not need a prompt
> linux-kbuild: fix: process config options set to "y"
>
> ---
> V2:
> - Put in subject.
> V1:
> - https://lore.kernel.org/all/20240913171205.22126-1-david.hunter.linux@gmail.com/
>
> ---
> scripts/kconfig/streamline_config.pl | 77 ++++++++++++++++++++++++----
> 1 file changed, 66 insertions(+), 11 deletions(-)
>
>
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 0/7] linux-kbuild: fix: process configs set to "y"
2024-09-17 14:45 ` Masahiro Yamada
@ 2024-09-17 22:45 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2024-09-17 22:45 UTC (permalink / raw)
To: Masahiro Yamada
Cc: David Hunter, linux-kbuild, linux-kernel, shuah,
javier.carrasco.cruz
On Tue, 17 Sep 2024 23:45:36 +0900
Masahiro Yamada <masahiroy@kernel.org> wrote:
> (+CC: Steven Rostedt, the author of this script)
>
Since my Out of Office message only goes to people who email me, and
this was basically just adding me to someone else's email, I'll reply
here to say I'm currently helping to running Linux Plumbers, and next
week I'll be at Kernel Recipes. My inbox will be very full when I get
back home and will likely not see this email again for a month or two.
If you want me to take a look, please ping me again sometime after
September 30th.
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-17 22:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 14:29 [PATCH v2 0/7] linux-kbuild: fix: process configs set to "y" David Hunter
2024-09-17 14:45 ` Masahiro Yamada
2024-09-17 22:45 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox