From e764eabda1aaeaa9d7ccb63ab276e23696d43339 Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Mon, 27 Apr 2020 21:52:36 +0200 Subject: [PATCH] builder: add a parameter to pass options to BIOS Makefile --- litex/soc/integration/builder.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index 745eb75e9..4fd1b2330 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -49,7 +49,8 @@ class Builder: csr_json = None, csr_csv = None, csr_svd = None, - memory_x = None): + memory_x = None, + bios_options = None): self.soc = soc # From Python doc: makedirs() will become confused if the path @@ -66,6 +67,7 @@ class Builder: self.csr_json = csr_json self.csr_svd = csr_svd self.memory_x = memory_x + self.bios_options = bios_options self.software_packages = [] for name in soc_software_packages: @@ -110,6 +112,10 @@ class Builder: for name, src_dir in self.software_packages: define(name.upper() + "_DIRECTORY", src_dir) + if self.bios_options is not None: + for option in self.bios_options: + define(option, "1") + write_to_file( os.path.join(self.generated_dir, "variables.mak"), "".join(variables_contents))