mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 10:16:52 +08:00
Add possibility to make install more firmware variants
This commit is contained in:
parent
ddd32bcb4b
commit
6949a780fc
3 changed files with 23 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -130,6 +130,8 @@ fullimage: armsrc/all
|
|||
|
||||
fullimage/clean: armsrc/clean
|
||||
|
||||
fullimage/install: armsrc/install
|
||||
|
||||
recovery: recovery/all
|
||||
|
||||
mfkey: mfkey/all
|
||||
|
|
|
@ -135,6 +135,12 @@ include ../common_arm/Makefile.common
|
|||
COMMON_FLAGS = -Os
|
||||
|
||||
INSTALLFW = $(OBJDIR)/fullimage.elf
|
||||
ifneq (,$(FWTAG))
|
||||
INSTALLFWTAG = $(notdir $(INSTALLFW:%.elf=%-$(FWTAG).elf))
|
||||
else
|
||||
INSTALLFWTAG = $(notdir $(INSTALLFW))
|
||||
endif
|
||||
|
||||
OBJS = $(OBJDIR)/fullimage.s19
|
||||
FPGA_COMPRESSOR = ../tools/fpga_compress/fpga_compress
|
||||
|
||||
|
@ -217,11 +223,11 @@ clean:
|
|||
install: all
|
||||
$(info [@] Installing fullimage to $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
|
||||
uninstall:
|
||||
$(info [@] Uninstalling fullimage from $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(RM) $(foreach fw,$(INSTALLFW),$(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(notdir $(fw)))
|
||||
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
|
||||
.PHONY: all clean help install uninstall
|
||||
help:
|
||||
|
|
|
@ -10,7 +10,7 @@ Makefile
|
|||
|
||||
`DESTDIR` can be provided by environment variable, it can be a relative path and it will be prepended to `PREFIX`, so you can use e.g.:
|
||||
|
||||
`make install DESTDIR=build PREFIX=/usr UDEV_PREFIX=/lib/udev/rules.d`
|
||||
`make -j install DESTDIR=build PREFIX=/usr UDEV_PREFIX=/lib/udev/rules.d`
|
||||
|
||||
and it will be deployed as
|
||||
|
||||
|
@ -18,11 +18,22 @@ and it will be deployed as
|
|||
./build/lib/udev/rules.d/77-pm3-usb-device-blacklist.rules
|
||||
./build/usr/bin/proxmark3 ...
|
||||
./build/usr/share/doc/proxmark3/...
|
||||
./build/usr/share/proxmark3/...
|
||||
./build/usr/share/proxmark3/firmware/fullimage.elf
|
||||
etc.
|
||||
```
|
||||
|
||||
That should be a good start for you to create your package :)
|
||||
|
||||
It's possible to add other firmwares as well with tagged names (`FWTAG=<mytag>`), e.g. here we're compiling another image for non-RDV4 devices:
|
||||
|
||||
`make -j fullimage/install DESTDIR=build PREFIX=/usr PLATFORM=PM3OTHER PLATFORM_EXTRAS= FWTAG=other`
|
||||
|
||||
and it will be added along the other firmware as:
|
||||
|
||||
```
|
||||
./build/usr/share/proxmark3/firmware/fullimage-other.elf
|
||||
```
|
||||
|
||||
For verbose usage and see the actual commands being executed, add `V=1`.
|
||||
|
||||
`CFLAGS` and `LDFLAGS` can be overriden by environment variables.
|
||||
|
|
Loading…
Reference in a new issue