File tree 2 files changed +23
-3
lines changed
2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,13 @@ third_party/%/.git: .gitmodules
178
178
# --------------------------------------
179
179
ifeq ($(FIRMWARE ) ,none)
180
180
OVERRIDE_FIRMWARE=--override-firmware =none
181
+ FIRMWARE_FBI =
181
182
else
182
183
OVERRIDE_FIRMWARE=--override-firmware =$(FIRMWARE_FILEBASE ) .fbi
184
+ FIRMWARE_FBI =$(FIRMWARE_FILEBASE ) .fbi
183
185
endif
184
186
185
- $(IMAGE_FILE ) : $(GATEWARE_FILEBASE ) .bin $(BIOS_FILE ) $(FIRMWARE_FILEBASE ) .fbi
187
+ $(IMAGE_FILE ) : $(GATEWARE_FILEBASE ) .bin $(BIOS_FILE ) $(FIRMWARE_FBI )
186
188
$(PYTHON ) mkimage.py \
187
189
$(MISOC_EXTRA_CMDLINE ) $(LITEX_EXTRA_CMDLINE ) $(MAKE_LITEX_EXTRA_CMDLINE ) \
188
190
--override-gateware=$(GATEWARE_FILEBASE ) .bin \
Original file line number Diff line number Diff line change @@ -30,8 +30,26 @@ gateware-load-$(PLATFORM):
30
30
@echo " make gateware-flash"
31
31
@false
32
32
33
- gateware-flash-$(PLATFORM ) :
34
- $(PYTHON ) $$(which MimasV2Config.py ) $(PROG_PORT ) $(GATEWARE_FILEBASE ) .bin
33
+ # On Mimas v2 both the gateware and the BIOS need to be in the same flash,
34
+ # which means that they can only really usefully be updated together. As
35
+ # a result we should flash "Gateware + BIOS + no application" if the user
36
+ # asks us to flash the gatware. This mirrors the behaviour of embedding
37
+ # the BIOS in the Gateware loaded via gateware-load, on other platforms,
38
+ # eg, on the Arty.
39
+ #
40
+ GATEWARE_BIOS_FILE = $(TARGET_BUILD_DIR ) /image-gateware+bios+none.bin
41
+
42
+ gateware-flash-$(PLATFORM ) : $(GATEWARE_BIOS_FILE )
43
+ $(PYTHON ) $$(which MimasV2Config.py ) $(PROG_PORT ) $(GATEWARE_BIOS_FILE )
44
+
45
+ # To avoid duplicating the mkimage.py call here, if the user has not
46
+ # already built a image-gateware+bios+none.bin, we call make recursively
47
+ # to build one here, with the FIRMWARE=none override.
48
+ #
49
+ ifneq ($(GATEWARE_BIOS_FILE ) ,$(IMAGE_FILE ) )
50
+ $(GATEWARE_BIOS_FILE ) : $(GATEWARE_FILEBASE ) .bin $(BIOS_FILE ) mkimage.py
51
+ FIRMWARE=none make image
52
+ endif
35
53
36
54
# Firmware
37
55
firmware-load-$(PLATFORM ) :
You can’t perform that action at this time.
0 commit comments