1 include ..
/common_arm
/Makefile.common
3 INSTALLFW
= proxmark3_recovery.bin
5 INSTALLFWTAG
= $(notdir $(INSTALLFW
:%.bin
=%-$(FWTAG
).bin
))
7 INSTALLFWTAG
= $(notdir $(INSTALLFW
))
9 FWMAXSIZE
= $(shell echo
$$(($(PLATFORM_SIZE
)*1024)))
11 BINS
= bootrom.bin fullimage.bin
$(INSTALLFW
)
14 @FWSIZE
=$$(wc
-c
< $(INSTALLFW
));\
15 if
[ $$FWSIZE -gt
$(FWMAXSIZE
) ]; then \
16 echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
17 echo
"ERROR: Firmware image too large for your platform! $$FWSIZE > $(FWMAXSIZE)"; \
18 echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
22 bootrom.bin
: ..
/bootrom
/obj
/bootrom.elf
24 $(Q
)$(CROSS_OBJCOPY
) --gap-fill
=0xff --pad-to
0x00102000 -O binary
$^
$@
26 fullimage.bin
: ..
/armsrc
/obj
/fullimage.elf
28 $(Q
)$(CROSS_OBJCOPY
) --gap-fill
=0xff -O binary
$^
$@
30 proxmark3_recovery.bin
: bootrom.bin fullimage.bin
32 $(Q
)cat bootrom.bin fullimage.bin
> $@
38 $(info [@
] Installing recovery to
$(DESTDIR
)$(PREFIX
)...
)
39 $(Q
)$(INSTALLSUDO
) $(MKDIR
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLFWRELPATH
)
40 $(Q
)$(INSTALLSUDO
) $(CP
) $(INSTALLFW
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLFWRELPATH
)$(PATHSEP
)$(INSTALLFWTAG
)
43 $(info [@
] Uninstalling recovery from
$(DESTDIR
)$(PREFIX
)...
)
44 $(Q
)$(INSTALLSUDO
) $(RM
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLFWRELPATH
)$(PATHSEP
)$(INSTALLFWTAG
)
46 .PHONY
: all clean install uninstall