Skip to content

kconfig/devicetree: Print path to headers when configuring #22365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

ulfalizer
Copy link
Collaborator

Change the output during CMake configure from

Devicetree configuration written to .../devicetree.conf
Parsing /home/ulf/z/z/Kconfig
Loaded configuration '.../frdm_kw41z_defconfig'
Merged configuration '.../prj.conf'
Configuration saved to '.../.config'

to

Devicetree header saved to '.../devicetree_unfixed.h'
Parsing /home/ulf/z/z/Kconfig
Loaded configuration '.../frdm_kw41z_defconfig'
Merged configuration '.../prj.conf'
Configuration saved to '.../.config'
Kconfig header saved to '.../autoconf.h'

devicetree_unfixed.h is more useful to be aware of than devicetree.conf
(still hoping we can get rid of it at some point), and seeing the
Kconfig header clarifies things to.

"Saved" instead of "written" for consistency. Maybe it could say
"Kconfig configuration" instead of "configuration" too, though it gets a
bit spammy in other contexts where the message shows up.

Updates Kconfiglib (and menuconfig/guiconfig, just to sync) to upstream
revision 061e71f7d7, to get this commit in, which is used to print the
header path:

Return a message from Kconfig.write_autoconf()

Like for Kconfig.write_config() and Kconfig.write_min_config(),
return a string from Kconfig.write_autoconf() with a message saying
that the header got saved, or that there were no changes to it. Can
be handy in tools.

Also make the "no change" message for the various files more
specific, by mentioning what type of file it is (configuration,
header, etc.)

Return True/False from Kconfig._write_if_changed() to indicate if
the file was updated. This also allows it to be reused in
Kconfig.write_min_config().

Change the output during CMake configure from

    Devicetree configuration written to .../devicetree.conf
    Parsing /home/ulf/z/z/Kconfig
    Loaded configuration '.../frdm_kw41z_defconfig'
    Merged configuration '.../prj.conf'
    Configuration saved to '.../.config'

to

    Devicetree header saved to '.../devicetree_unfixed.h'
    Parsing /home/ulf/z/z/Kconfig
    Loaded configuration '.../frdm_kw41z_defconfig'
    Merged configuration '.../prj.conf'
    Configuration saved to '.../.config'
    Kconfig header saved to '.../autoconf.h'

devicetree_unfixed.h is more useful to be aware of than devicetree.conf
(still hoping we can get rid of it at some point), and seeing the
Kconfig header clarifies things to.

"Saved" instead of "written" for consistency. Maybe it could say
"Kconfig configuration" instead of "configuration" too, though it gets a
bit spammy in other contexts where the message shows up.

Updates Kconfiglib (and menuconfig/guiconfig, just to sync) to upstream
revision 061e71f7d7, to get this commit in, which is used to print the
header path:

    Return a message from Kconfig.write_autoconf()

    Like for Kconfig.write_config() and Kconfig.write_min_config(),
    return a string from Kconfig.write_autoconf() with a message saying
    that the header got saved, or that there were no changes to it. Can
    be handy in tools.

    Also make the "no change" message for the various files more
    specific, by mentioning what type of file it is (configuration,
    header, etc.)

    Return True/False from Kconfig._write_if_changed() to indicate if
    the file was updated. This also allows it to be reused in
    Kconfig.write_min_config().

Signed-off-by: Ulf Magnusson <[email protected]>
@ulfalizer
Copy link
Collaborator Author

Semi-unrelated, but #21560 might help with getting rid of devicetree.conf btw.

@SebastianBoe
Copy link
Collaborator

On my machine it doesn't say "Parsing <kconfig_source_file>", it says "Parsing Kconfig tree in <kconfig_source_file>".

@SebastianBoe
Copy link
Collaborator

We want to keep logs as short as possible, let us omit

Kconfig header saved to '.../autoconf.h'

autoconf.h is automatically included, so there is no need to know where it is.
.config is useful to know where is because it contains the resulting/active Kconfig'uration.

@ulfalizer
Copy link
Collaborator Author

ulfalizer commented Jan 31, 2020

On my machine it doesn't say "Parsing <kconfig_source_file>", it says "Parsing Kconfig tree in <kconfig_source_file>".

Changed in commit 45050dd ("kconfig/cmake: Improve reconfiguration behavior").

We want to keep logs as short as possible, let us omit

Kconfig header saved to '.../autoconf.h'

autoconf.h is automatically included, so there is no need to know where it is.
.config is useful to know where is because it contains the resulting/active Kconfig'uration.

Want to include it so that people coming at it fresh realize that there's a header. Helps with understanding how Kconfig works. Might think it's just the configuration file otherwise.

autoconf.h is a pretty bad name too. It's just consistent with the C tools.

@carlescufi carlescufi merged commit d0f082d into zephyrproject-rtos:master Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants