File tree 3 files changed +26
-6
lines changed
3 files changed +26
-6
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 \
@@ -337,7 +339,7 @@ bios-flash: $(BIOS_FILE) bios-flash-$(PLATFORM)
337
339
# We can run the TFTP server as the user if port >= 1024
338
340
# otherwise we need to run as root using sudo
339
341
340
- ATFTPD: =$(shell which atftpd)
342
+ ATFTPD: =$(shell which atftpd 2>/dev/null )
341
343
ifeq ($(ATFTPD ) ,)
342
344
ATFTPD: =/usr/sbin/atftpd
343
345
endif
@@ -347,7 +349,7 @@ endif
347
349
# even if run as current user, otherwise it reports
348
350
# "cannot set groups for user $USER"
349
351
#
350
- IN_TFTPD: =$(shell which in.tftpd)
352
+ IN_TFTPD: =$(shell which in.tftpd 2>/dev/null )
351
353
ifeq ($(IN_TFTPD ) ,)
352
354
IN_TFTPD: =/usr/sbin/in.tftpd
353
355
endif
Original file line number Diff line number Diff line change @@ -322,4 +322,4 @@ litex_buildenv_prompt() {
322
322
;;
323
323
esac
324
324
}
325
- PROMPT_COMMAND=litex_buildenv_prompt
325
+ PROMPT_COMMAND=" litex_buildenv_prompt; ${PROMPT_COMMAND} "
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