make.py: init bios memory in build-bitstream action otherwise it is not possible to run clean or build-csr-csv or build-headers without build-bios

This commit is contained in:
Florent Kermarrec 2014-05-19 19:49:32 +02:00 committed by Sebastien Bourdeauducq
parent f4c0648289
commit 1dcbb077fd
1 changed files with 10 additions and 10 deletions

20
make.py
View File

@ -179,17 +179,17 @@ CPU type: {}
if ret:
raise OSError("BIOS build failed")
if hasattr(soc, "init_bios_memory"):
with open("software/bios/bios.bin", "rb") as bios_file:
bios_data = []
while True:
w = bios_file.read(4)
if not w:
break
bios_data.append(struct.unpack(">I", w)[0])
soc.init_bios_memory(bios_data)
if actions["build-bitstream"]:
if hasattr(soc, "init_bios_memory"):
with open("software/bios/bios.bin", "rb") as bios_file:
bios_data = []
while True:
w = bios_file.read(4)
if not w:
break
bios_data.append(struct.unpack(">I", w)[0])
soc.init_bios_memory(bios_data)
for decorator in args.decorate:
soc = getattr(simplify, decorator)(soc)
build_kwargs = dict((k, autotype(v)) for k, v in args.build_option)