make.py: init bios memory in build-bitstream action otherwise it is not possible...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 19 May 2014 17:49:32 +0000 (19:49 +0200)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Wed, 21 May 2014 19:16:06 +0000 (21:16 +0200)
make.py

diff --git a/make.py b/make.py
index 57e1670007978c67e3383bb72695bf2c25dca9da..3d0df7217a38cf2396ae51667228eac08ffe295d 100755 (executable)
--- a/make.py
+++ b/make.py
@@ -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)