2019-08-08 22:57:33 +08:00
|
|
|
include ../common_arm/Makefile.common
|
2013-03-26 20:35:54 +08:00
|
|
|
|
2019-08-31 03:55:13 +08:00
|
|
|
INSTALLFW = proxmark3_recovery.bin
|
2019-08-31 15:31:33 +08:00
|
|
|
ifneq (,$(FWTAG))
|
|
|
|
INSTALLFWTAG = $(notdir $(INSTALLFW:%.bin=%-$(FWTAG).bin))
|
|
|
|
else
|
|
|
|
INSTALLFWTAG = $(notdir $(INSTALLFW))
|
|
|
|
endif
|
|
|
|
|
2019-08-31 03:55:13 +08:00
|
|
|
BINS = bootrom.bin fullimage.bin $(INSTALLFW)
|
2013-03-26 20:35:54 +08:00
|
|
|
|
|
|
|
all: $(BINS)
|
|
|
|
|
|
|
|
bootrom.bin: ../bootrom/obj/bootrom.elf
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [=] GEN $@)
|
|
|
|
$(Q)$(OBJCOPY) --gap-fill=0xff --pad-to 0x00102000 -O binary $^ $@
|
2013-03-26 20:35:54 +08:00
|
|
|
|
|
|
|
fullimage.bin: ../armsrc/obj/fullimage.elf
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [=] GEN $@)
|
|
|
|
$(Q)$(OBJCOPY) --gap-fill=0xff -O binary $^ $@
|
2013-03-26 20:35:54 +08:00
|
|
|
|
|
|
|
proxmark3_recovery.bin: bootrom.bin fullimage.bin
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [=] GEN $@)
|
|
|
|
$(Q)cat bootrom.bin fullimage.bin > $@
|
2013-03-26 20:35:54 +08:00
|
|
|
|
2019-03-10 18:35:03 +08:00
|
|
|
clean:
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $(BINS)
|
2013-03-26 20:35:54 +08:00
|
|
|
|
2019-08-31 03:44:40 +08:00
|
|
|
install: all
|
2019-08-31 03:55:13 +08:00
|
|
|
$(info [@] Installing recovery to $(DESTDIR)$(PREFIX)...)
|
2019-09-06 05:20:46 +08:00
|
|
|
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
|
|
|
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
2019-08-31 03:44:40 +08:00
|
|
|
|
2019-08-31 03:55:13 +08:00
|
|
|
uninstall:
|
|
|
|
$(info [@] Uninstalling recovery from $(DESTDIR)$(PREFIX)...)
|
2019-09-06 05:20:46 +08:00
|
|
|
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
2019-08-31 03:44:40 +08:00
|
|
|
|
2019-08-31 03:55:13 +08:00
|
|
|
.PHONY: all clean install uninstall
|