From: Florent Kermarrec Date: Thu, 28 Dec 2017 21:42:58 +0000 (+0100) Subject: soc/integration/builder: don't build bios is user is providing rom data X-Git-Tag: 24jan2021_ls180~1778 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b78a4760bbdc7a1a9c6bc7fa8de4b3384771c505;p=litex.git soc/integration/builder: don't build bios is user is providing rom data --- diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index b5fd06b5..3cfe1ab2 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -117,12 +117,15 @@ class Builder: dst_dir = os.path.join(self.output_dir, "software", name) os.makedirs(dst_dir, exist_ok=True) - def _generate_software(self): + def _generate_software(self, compile_bios=True): for name, src_dir in self.software_packages: - dst_dir = os.path.join(self.output_dir, "software", name) - makefile = os.path.join(src_dir, "Makefile") - if self.compile_software: - subprocess.check_call(["make", "-C", dst_dir, "-f", makefile]) + if name == "bios" and not compile_bios: + pass + else: + dst_dir = os.path.join(self.output_dir, "software", name) + makefile = os.path.join(src_dir, "Makefile") + if self.compile_software: + subprocess.check_call(["make", "-C", dst_dir, "-f", makefile]) def _initialize_rom(self): bios_file = os.path.join(self.output_dir, "software", "bios", @@ -144,7 +147,7 @@ class Builder: if self.soc.cpu_type is not None: self._prepare_software() self._generate_includes() - self._generate_software() + self._generate_software(not self.soc.integrated_rom_initialized) if self.soc.integrated_rom_size and self.compile_software: if not self.soc.integrated_rom_initialized: self._initialize_rom()