Skip to content

Commit e2427ff

Browse files
tejlmandnashif
authored andcommitted
scripts: check_compliance should not generate soc/shield Kconfig files
Fixes: #38463 With 6be1b2a then Zephyr shields and soc Kconfig are always sourced from Kconfig directly. However, check_compliance.py generates Kconfig files for sourcing the same files thus sourcing the same files twice. The end result is a lot of Kconfig warnings as described in #38463. Removing the generated Kconfig files as this is no longer needed after 6be1b2a has been introduced. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent b2b411d commit e2427ff

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

scripts/ci/check_compliance.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -268,36 +268,6 @@ def get_modules(self, modules_file):
268268
))
269269
fp_module_file.write(content)
270270

271-
def write_kconfig_soc(self):
272-
"""
273-
Write KConfig soc files to be sourced during Kconfig parsing
274-
275-
"""
276-
277-
soc_defconfig_file = os.path.join(tempfile.gettempdir(), "Kconfig.soc.defconfig")
278-
soc_file = os.path.join(tempfile.gettempdir(), "Kconfig.soc")
279-
soc_arch_file = os.path.join(tempfile.gettempdir(), "Kconfig.soc.arch")
280-
shield_defconfig_file = os.path.join(tempfile.gettempdir(), "Kconfig.shield.defconfig")
281-
shield_file = os.path.join(tempfile.gettempdir(), "Kconfig.shield")
282-
try:
283-
with open(soc_defconfig_file, 'w', encoding="utf-8") as fp:
284-
fp.write(f'osource "{ZEPHYR_BASE}/soc/$(ARCH)/*/Kconfig.defconfig"\n')
285-
286-
with open(soc_file, 'w', encoding="utf-8") as fp:
287-
fp.write(f'osource "{ZEPHYR_BASE}/soc/$(ARCH)/*/Kconfig.soc"\n')
288-
289-
with open(soc_arch_file, 'w', encoding="utf-8") as fp:
290-
fp.write(f'osource "{ZEPHYR_BASE}/soc/$(ARCH)/Kconfig"\n\
291-
osource "{ZEPHYR_BASE}/soc/$(ARCH)/*/Kconfig"\n')
292-
293-
with open(shield_defconfig_file, 'w', encoding="utf-8") as fp:
294-
fp.write(f'osource "{ZEPHYR_BASE}/boards/shields/*/Kconfig.defconfig"\n')
295-
296-
with open(shield_file, 'w', encoding="utf-8") as fp:
297-
fp.write(f'osource "{ZEPHYR_BASE}/boards/shields/*/Kconfig.shield"\n')
298-
except IOError as ex:
299-
self.error(ex.output)
300-
301271
def parse_kconfig(self):
302272
"""
303273
Returns a kconfiglib.Kconfig object for the Kconfig files. We reuse
@@ -337,9 +307,6 @@ def parse_kconfig(self):
337307
# For multi repo support
338308
self.get_modules(os.path.join(tempfile.gettempdir(), "Kconfig.modules"))
339309

340-
# For list of SOC_ROOT support
341-
self.write_kconfig_soc()
342-
343310
# Tells Kconfiglib to generate warnings for all references to undefined
344311
# symbols within Kconfig files
345312
os.environ["KCONFIG_WARN_UNDEF"] = "y"

0 commit comments

Comments
 (0)