fix(Tools): add clarifying comment (#27403)

It wasn't clear to me why this merge_config.py was required. It is now
clear, so let me leave a comment.
This commit is contained in:
Julian Oes
2026-05-21 08:06:11 +12:00
committed by GitHub
parent cfa3d6a3b9
commit 110be82e7d
+6 -2
View File
@@ -101,8 +101,12 @@ def main(kconfig_file, config1, config2):
# load_config() and write_config() returns a message to print.
print(kconf.load_config(config1, replace=False))
print(kconf.load_config(config2, replace=False))
# Modification for PX4 unset all symbols (INT,HEX etc) from 2nd config
# PX4 extension: stock kconfiglib only honors "# CONFIG_X is not set" for
# bool/tristate symbols. PX4 overlay fragments need to revert int/hex/
# string symbols set by default.px4board back to their Kconfig defaults
# — e.g. mr-canhubk3 fmu/sysview overlays revert BOARD_ROMFSROOT from
# "cannode" to "px4fmu_common", which also gates the bootloaders and
# uavcannode drivers via Kconfig dependencies.
f = open(config2, 'r')
unset_match = re.compile(r"# {}([^ ]+) is not set".format("CONFIG_"), re.ASCII).match