inetgration/builder: Check for full software re-build only when a CPU is used.

This commit is contained in:
Florent Kermarrec 2021-09-20 08:31:17 +02:00
parent 46cd9c5a5c
commit 76c782c546
1 changed files with 8 additions and 7 deletions

View File

@ -266,13 +266,14 @@ class Builder:
# Create Software directory.
# First check if software needs a full re-build and remove software dir if so.
software_full_rebuild = False
software_variables_mak = os.path.join(self.generated_dir, "variables.mak")
if os.path.exists(software_variables_mak):
old_variables_contents = open(software_variables_mak).read()
new_variables_contents = self._get_variables_contents()
software_full_rebuild = (old_variables_contents != new_variables_contents)
_create_dir(self.software_dir, remove_if_exists=software_full_rebuild)
if self.soc.cpu_type is not None:
software_full_rebuild = False
software_variables_mak = os.path.join(self.generated_dir, "variables.mak")
if os.path.exists(software_variables_mak):
old_variables_contents = open(software_variables_mak).read()
new_variables_contents = self._get_variables_contents()
software_full_rebuild = (old_variables_contents != new_variables_contents)
_create_dir(self.software_dir, remove_if_exists=software_full_rebuild)
# Finalize the SoC.
self.soc.finalize()