integration/builder: change bios_options to list and add assert for supported options.

This commit is contained in:
Florent Kermarrec 2020-09-01 11:48:52 +02:00
parent 043cfc5df7
commit f07efcb97f
1 changed files with 9 additions and 9 deletions

View File

@ -62,7 +62,7 @@ class Builder:
csr_csv = None, csr_csv = None,
csr_svd = None, csr_svd = None,
memory_x = None, memory_x = None,
bios_options = None): bios_options = []):
self.soc = soc self.soc = soc
# From Python doc: makedirs() will become confused if the path elements to create include '..' # From Python doc: makedirs() will become confused if the path elements to create include '..'
@ -109,8 +109,8 @@ class Builder:
for name, src_dir in self.software_packages: for name, src_dir in self.software_packages:
define(name.upper() + "_DIRECTORY", src_dir) define(name.upper() + "_DIRECTORY", src_dir)
if self.bios_options is not None: for bios_option in self.bios_options:
for option in self.bios_options: assert option in ["TERM_NO_HIST", "TERM_MINI", "TERM_NO_COMPLETE"]
define(option, "1") define(option, "1")
write_to_file( write_to_file(