zephyr/scripts
Ulf Magnusson 45050dda48 kconfig/cmake: Improve reconfiguration behavior
There are some issues with the behavior when rerunning CMake in an
already initialized build directory:

 1. The check for assignments to promptless symbols in configuration
    fragments isn't run when reconfiguring, because it only runs if
    zephyr/.config doesn't exist

 2. As outlined in
    https://github.com/zephyrproject-rtos/zephyr/issues/9573, you can
    get into situations where zephyr/.config is invalid (e.g. due to
    being outdated), but menuconfig/guiconfig can't be run to fix it

 3. If kconfig.py fails while merging fragments during reconfiguration,
    it will ignore the fragments during the next reconfiguration and use
    the existing zephyr/.config instead, because the fragment checksum
    is calculated and saved before running kconfig.py

(Footnote: The input configuration file(s) to kconfig.py can be either a
list of configuration fragments, when merging fragments, or just
zephyr/.config, if the merged configuration is up-to-date. The output
configuration file is always zephyr/.config.)

To fix the first two issues, explicitly tell kconfig.py when it's
dealing with handwritten configuration input (fragments), via a new
--handwritten-input-configs flag. This is more robust than checking
whether zephyr/.config exists, which was the old logic.

When dealing with handwritten input, there should be no assignments to
promptless symbols. Assignments to promptless symbols is expected in
zephyr/.config however, because it doubles as configuration output.

When running menuconfig/guiconfig, the input configuration is
zephyr/.config rather than configuration fragments, so this change also
makes sure that menuconfig can always be run as long as zephyr/.config
exists and is up-to-date.

To fix the last issue, only write the checksum for the configuration
fragments if kconfig.py succeeds (which means it wrote a
zephyr/.config).

Also improve naming a bit, add help texts for the command-line
parameters to kconfig.py, and simplify write_kconfig_filenames() by
moving logic into it.

Partial fix for
https://github.com/zephyrproject-rtos/zephyr/issues/9573, without the
part in #issuecomment-469701831. Can still run into issues when e.g.
when CMake files can't make sense of settings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-22 18:28:07 +01:00
..
checkpatch
ci ci: do not display timestamps 2020-01-17 08:30:23 -06:00
coccinelle
dts dts: gen_defines.py: Rename *_dev() to *_node() 2020-01-16 18:32:58 +01:00
footprint
gitlint
kconfig kconfig/cmake: Improve reconfiguration behavior 2020-01-22 18:28:07 +01:00
release scripts: add script for listing closed bugs 2019-10-22 15:11:09 -04:00
sanity_chk sanitycheck: additional scripting hook after flashing 2020-01-06 13:58:10 -05:00
support
west_commands scripts: runners: nrfjprog: sort SNR list before prompting 2020-01-16 10:20:39 -05:00
.gitignore
checkpatch.pl syscalls: Remove references to __syscall_inline 2019-12-09 12:47:15 -05:00
checkstack.pl
coccicheck
dir_is_writeable.py global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
elf_helper.py kernel: fix 64-bit for kobject generation 2019-12-12 14:48:42 -08:00
file2hex.py
filter-known-issues.py
gen_app_partitions.py
gen_cfb_font_header.py
gen_gcov_files.py
gen_kobject_list.py userspace: fix incorrect linker routing 2020-01-09 09:13:23 -08:00
gen_offset_header.py doc: document python build scripts 2020-01-02 17:09:29 -05:00
gen_priv_stacks.py
gen_relocate_app.py doc: document python build scripts 2020-01-02 17:09:29 -05:00
gen_syscalls.py syscalls: Remove gen_syscall_header.py 2019-12-09 16:08:50 +01:00
mergehex.py scripts: cmake: move print from python to cmake 2020-01-03 08:20:08 -05:00
parse_syscalls.py
process_gperf.py kernel: fix 64-bit for kobject generation 2019-12-12 14:48:42 -08:00
requirements.txt scripts: requirements: Request version 0.24.0 for pyocd 2020-01-13 11:49:57 +01:00
sanitycheck sanitycheck: fix reporting of timeouts 2020-01-22 01:39:28 -05:00
series-push-hook.sh
spelling.txt
subfolder_list.py
tags.sh
valgrind.supp
west-commands.yml
zephyr_module.py west: Fix defining modules without a module.yml 2019-12-19 15:52:44 -05:00