From 76c782c546dd55644c40b90f0948bfb9ddaa037c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 20 Sep 2021 08:31:17 +0200 Subject: [PATCH] inetgration/builder: Check for full software re-build only when a CPU is used. --- litex/soc/integration/builder.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index 4633845dd..6209fa99a 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -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()