This commit is contained in:
iceman1001 2019-05-06 22:42:01 +02:00
commit fa8bd85016
7 changed files with 278 additions and 280 deletions

View file

@ -3,36 +3,36 @@ GZIP=gzip
# amount of shell command line parsing going on. echo "" on # amount of shell command line parsing going on. echo "" on
# Windows yields literal "", on Linux yields an empty line # Windows yields literal "", on Linux yields an empty line
ifeq ($(shell echo ""),) ifeq ($(shell echo ""),)
# This is probably a proper system, so we can use uname # This is probably a proper system, so we can use uname
DELETE=rm -rf DELETE=rm -rf
FLASH_TOOL=client/flasher FLASH_TOOL=client/flasher
platform=$(shell uname) platform=$(shell uname)
ifneq (,$(findstring MINGW,$(platform))) ifneq (,$(findstring MINGW,$(platform)))
FLASH_PORT=com3
PATHSEP=\\#
else
FLASH_PORT=/dev/ttyACM0
PATHSEP=/
endif
else
# Assume that we are running on native Windows
DELETE=del /q
FLASH_TOOL=client/flasher.exe
platform=Windows
FLASH_PORT=com3 FLASH_PORT=com3
PATHSEP=\\# PATHSEP=\\#
else
FLASH_PORT=/dev/ttyACM0
PATHSEP=/
endif
else
# Assume that we are running on native Windows
DELETE=del /q
FLASH_TOOL=client/flasher.exe
platform=Windows
FLASH_PORT=com3
PATHSEP=\\#
endif endif
ifeq ($(PLATFORM),) ifeq ($(PLATFORM),)
-include Makefile.platform -include Makefile.platform
ifeq ($(PLATFORM),) ifeq ($(PLATFORM),)
PLATFORM=PM3RDV4 PLATFORM=PM3RDV4
else else
${info using saved PLATFORM: '$(PLATFORM)'} ${info using saved PLATFORM: '$(PLATFORM)'}
endif endif
ifneq ($(PLATFORM_EXTRAS),) ifneq ($(PLATFORM_EXTRAS),)
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'} ${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
endif endif
endif endif
include common/Makefile.hal include common/Makefile.hal

View file

@ -10,31 +10,31 @@ APP_INCLUDES = apps.h
# This Makefile might have been called directly, not via the root Makefile, so: # This Makefile might have been called directly, not via the root Makefile, so:
ifeq ($(PLTNAME),) ifeq ($(PLTNAME),)
-include ../Makefile.platform -include ../Makefile.platform
ifeq ($(PLATFORM),) ifeq ($(PLATFORM),)
PLATFORM=PM3RDV4 PLATFORM=PM3RDV4
else else
${info using saved PLATFORM: '$(PLATFORM)'} ${info using saved PLATFORM: '$(PLATFORM)'}
endif endif
ifneq ($(PLATFORM_EXTRAS),) ifneq ($(PLATFORM_EXTRAS),)
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'} ${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
endif endif
include ../common/Makefile.hal include ../common/Makefile.hal
$(info ===================================================================) $(info ===================================================================)
$(info Platform name: $(PLTNAME)) $(info Platform name: $(PLTNAME))
$(info PLATFORM: $(PLATFORM)) $(info PLATFORM: $(PLATFORM))
$(info PLATFORM_EXTRAS: $(PLATFORM_EXTRAS)) $(info PLATFORM_EXTRAS: $(PLATFORM_EXTRAS))
$(info Included options: $(PLATFORM_DEFS_INFO)) $(info Included options: $(PLATFORM_DEFS_INFO))
$(info Standalone mode: $(PLATFORM_DEFS_INFO_STANDALONE)) $(info Standalone mode: $(PLATFORM_DEFS_INFO_STANDALONE))
$(info ===================================================================) $(info ===================================================================)
endif endif
#remove one of the following defines and comment out the relevant line #remove one of the following defines and comment out the relevant line
#in the next section to remove that particular feature from compilation. #in the next section to remove that particular feature from compilation.
# NO space,TABs after the "\" sign. # NO space,TABs after the "\" sign.
APP_CFLAGS = $(PLATFORM_DEFS) \ APP_CFLAGS = $(PLATFORM_DEFS) \
-DON_DEVICE \ -DON_DEVICE \
-fno-strict-aliasing -ffunction-sections -fdata-sections -fno-strict-aliasing -ffunction-sections -fdata-sections
SRC_LF = lfops.c lfsampling.c pcf7931.c lfdemod.c SRC_LF = lfops.c lfsampling.c pcf7931.c lfdemod.c
SRC_ISO15693 = iso15693.c iso15693tools.c SRC_ISO15693 = iso15693.c iso15693tools.c
@ -49,21 +49,21 @@ SRC_LEGIC = legicrf.c legicrfsim.c legic_prng.c
# RDV40 related hardware support # RDV40 related hardware support
ifneq (,$(findstring WITH_FLASH,$(APP_CFLAGS))) ifneq (,$(findstring WITH_FLASH,$(APP_CFLAGS)))
SRC_FLASH = flashmem.c SRC_FLASH = flashmem.c
else else
SRC_FLASH = SRC_FLASH =
endif endif
ifneq (,$(findstring WITH_SMARTCARD,$(APP_CFLAGS))) ifneq (,$(findstring WITH_SMARTCARD,$(APP_CFLAGS)))
SRC_SMARTCARD = i2c.c SRC_SMARTCARD = i2c.c
else else
SRC_SMARTCARD = SRC_SMARTCARD =
endif endif
ifneq (,$(findstring WITH_FPC_USART,$(APP_CFLAGS))) ifneq (,$(findstring WITH_FPC_USART,$(APP_CFLAGS)))
SRC_FPC = usart.c SRC_FPC = usart.c
else else
SRC_FPC = SRC_FPC =
endif endif
ifneq (,$(findstring WITH_HITAG,$(APP_CFLAGS))) ifneq (,$(findstring WITH_HITAG,$(APP_CFLAGS)))
@ -84,35 +84,35 @@ endif
SRC_STANDALONE = placeholder.c SRC_STANDALONE = placeholder.c
# WITH_STANDALONE_LF_ICERUN # WITH_STANDALONE_LF_ICERUN
ifneq (,$(findstring WITH_STANDALONE_LF_ICERUN,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_LF_ICERUN,$(APP_CFLAGS)))
SRC_STANDALONE = lf_icerun.c SRC_STANDALONE = lf_icerun.c
endif endif
# WITH_STANDALONE_LF_SAMYRUN # WITH_STANDALONE_LF_SAMYRUN
ifneq (,$(findstring WITH_STANDALONE_LF_SAMYRUN,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_LF_SAMYRUN,$(APP_CFLAGS)))
SRC_STANDALONE = lf_samyrun.c SRC_STANDALONE = lf_samyrun.c
endif endif
# WITH_STANDALONE_LF_PROXBRUTE # WITH_STANDALONE_LF_PROXBRUTE
ifneq (,$(findstring WITH_STANDALONE_LF_PROXBRUTE,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_LF_PROXBRUTE,$(APP_CFLAGS)))
SRC_STANDALONE = lf_proxbrute.c SRC_STANDALONE = lf_proxbrute.c
endif endif
# WITH_STANDALONE_LF_HIDBRUTE # WITH_STANDALONE_LF_HIDBRUTE
ifneq (,$(findstring WITH_STANDALONE_LF_HIDBRUTE,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_LF_HIDBRUTE,$(APP_CFLAGS)))
SRC_STANDALONE = lf_hidbrute.c SRC_STANDALONE = lf_hidbrute.c
endif endif
# WITH_STANDALONE_HF_YOUNG # WITH_STANDALONE_HF_YOUNG
ifneq (,$(findstring WITH_STANDALONE_HF_YOUNG,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_HF_YOUNG,$(APP_CFLAGS)))
SRC_STANDALONE = hf_young.c SRC_STANDALONE = hf_young.c
endif endif
# WITH_STANDALONE_HF_MATTYRUN # WITH_STANDALONE_HF_MATTYRUN
ifneq (,$(findstring WITH_STANDALONE_HF_MATTYRUN,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_HF_MATTYRUN,$(APP_CFLAGS)))
SRC_STANDALONE = hf_mattyrun.c SRC_STANDALONE = hf_mattyrun.c
endif endif
# WITH_STANDALONE_HF_COLIN # WITH_STANDALONE_HF_COLIN
ifneq (,$(findstring WITH_STANDALONE_HF_COLIN,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_HF_COLIN,$(APP_CFLAGS)))
SRC_STANDALONE = vtsend.c hf_colin.c SRC_STANDALONE = vtsend.c hf_colin.c
endif endif
# WITH_STANDALONE_HF_BOG # WITH_STANDALONE_HF_BOG
ifneq (,$(findstring WITH_STANDALONE_HF_BOG,$(APP_CFLAGS))) ifneq (,$(findstring WITH_STANDALONE_HF_BOG,$(APP_CFLAGS)))
SRC_STANDALONE = hf_bog.c SRC_STANDALONE = hf_bog.c
endif endif
#the FPGA bitstream files. Note: order matters! #the FPGA bitstream files. Note: order matters!
@ -132,42 +132,42 @@ APP_CFLAGS += -I. -fno-stack-protector -fno-pie
# Compile these in thumb mode (small size) # Compile these in thumb mode (small size)
THUMBSRC = start.c \ THUMBSRC = start.c \
protocols.c \ protocols.c \
$(SRC_LCD) \ $(SRC_LCD) \
$(SRC_ISO15693) \ $(SRC_ISO15693) \
$(SRC_LF) \ $(SRC_LF) \
$(SRC_ZLIB) \ $(SRC_ZLIB) \
$(SRC_LEGIC) \ $(SRC_LEGIC) \
$(SRC_FLASH) \ $(SRC_FLASH) \
$(SRC_SMARTCARD) \ $(SRC_SMARTCARD) \
$(SRC_FPC) \ $(SRC_FPC) \
$(SRC_HITAG) \ $(SRC_HITAG) \
appmain.c \ appmain.c \
printf.c \ printf.c \
commonutil.c \ commonutil.c \
util.c \ util.c \
string.c \ string.c \
BigBuf.c \ BigBuf.c \
ticks.c \ ticks.c \
hfsnoop.c hfsnoop.c
# These are to be compiled in ARM mode # These are to be compiled in ARM mode
ARMSRC = fpgaloader.c \ ARMSRC = fpgaloader.c \
$(SRC_ISO14443a) \ $(SRC_ISO14443a) \
$(SRC_ISO14443b) \ $(SRC_ISO14443b) \
$(SRC_CRAPTO1) \ $(SRC_CRAPTO1) \
$(SRC_ICLASS) \ $(SRC_ICLASS) \
$(SRC_EMV) \ $(SRC_EMV) \
$(SRC_CRC) \ $(SRC_CRC) \
$(SRC_FELICA) \ $(SRC_FELICA) \
$(SRC_STANDALONE) \ $(SRC_STANDALONE) \
parity.c \ parity.c \
usb_cdc.c \ usb_cdc.c \
cmd.c cmd.c
VERSIONSRC = version.c \ VERSIONSRC = version.c \
fpga_version_info.c fpga_version_info.c
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
include ../common/Makefile.common include ../common/Makefile.common

View file

@ -68,10 +68,10 @@ LUAPLATFORM = generic
ifneq (,$(findstring MINGW,$(platform))) ifneq (,$(findstring MINGW,$(platform)))
LUAPLATFORM = mingw LUAPLATFORM = mingw
else else
ifeq ($(platform),Darwin) ifeq ($(platform),Darwin)
LUAPLATFORM = macosx LUAPLATFORM = macosx
OBJCSRCS = util_darwin.m OBJCSRCS = util_darwin.m
LDFLAGS += -framework Foundation -framework AppKit LDFLAGS += -framework Foundation -framework AppKit
else else
LUALIB += -ldl LUALIB += -ldl
LDLIBS += -ltermcap -lncurses LDLIBS += -ltermcap -lncurses
@ -86,26 +86,26 @@ MOC = $(shell pkg-config --variable=host_bins Qt5Core)/moc
UIC = $(shell pkg-config --variable=host_bins Qt5Core)/uic UIC = $(shell pkg-config --variable=host_bins Qt5Core)/uic
ifeq ($(QTINCLUDES), ) ifeq ($(QTINCLUDES), )
# if Qt5 not found check for correctly configured Qt4 # if Qt5 not found check for correctly configured Qt4
QTINCLUDES = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) QTINCLUDES = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null)
QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
MOC = $(shell pkg-config --variable=moc_location QtCore) MOC = $(shell pkg-config --variable=moc_location QtCore)
UIC = $(shell pkg-config --variable=uic_location QtCore) UIC = $(shell pkg-config --variable=uic_location QtCore)
else else
CXXFLAGS += -std=c++11 -fPIC CXXFLAGS += -std=c++11 -fPIC
endif endif
ifeq ($(QTINCLUDES), ) ifeq ($(QTINCLUDES), )
# if both pkg-config commands failed, search in common places # if both pkg-config commands failed, search in common places
ifneq ($(QTDIR), ) ifneq ($(QTDIR), )
QTINCLUDES = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui QTINCLUDES = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4 QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
ifneq ($(wildcard $(QTDIR)/include/QtWidgets),) ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
QTINCLUDES += -I$(QTDIR)/include/QtWidgets QTINCLUDES += -I$(QTDIR)/include/QtWidgets
QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core
CXXFLAGS += -std=c++11 -fPIC CXXFLAGS += -std=c++11 -fPIC
endif endif
MOC = $(QTDIR)/bin/moc MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic UIC = $(QTDIR)/bin/uic
endif endif
endif endif
@ -124,139 +124,139 @@ DEPFLAGS = -MT $@ -MMD -MP -MF $(OBJDIR)/$*.Td
POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d
CORESRCS = uart_posix.c \ CORESRCS = uart_posix.c \
uart_win32.c \ uart_win32.c \
ui.c \ ui.c \
commonutil.c \ commonutil.c \
util.c \ util.c \
util_posix.c \ util_posix.c \
scandir.c \ scandir.c \
crc16.c \ crc16.c \
comms.c comms.c
CMDSRCS = crapto1/crapto1.c \ CMDSRCS = crapto1/crapto1.c \
crapto1/crypto1.c \ crapto1/crypto1.c \
mifare/mfkey.c \ mifare/mfkey.c \
tea.c \ tea.c \
fido/additional_ca.c \ fido/additional_ca.c \
fido/cose.c \ fido/cose.c \
fido/cbortools.c \ fido/cbortools.c \
fido/fidocore.c \ fido/fidocore.c \
crypto/asn1dump.c \ crypto/asn1dump.c \
crypto/libpcrypto.c\ crypto/libpcrypto.c\
crypto/asn1utils.c\ crypto/asn1utils.c\
cliparser/argtable3.c\ cliparser/argtable3.c\
cliparser/cliparser.c\ cliparser/cliparser.c\
loclass/cipher.c \ loclass/cipher.c \
loclass/cipherutils.c \ loclass/cipherutils.c \
loclass/ikeys.c \ loclass/ikeys.c \
loclass/elite_crack.c \ loclass/elite_crack.c \
loclass/fileutils.c \ loclass/fileutils.c \
whereami.c \ whereami.c \
mifare/mifarehost.c \ mifare/mifarehost.c \
parity.c \ parity.c \
crc.c \ crc.c \
crc64.c \ crc64.c \
legic_prng.c \ legic_prng.c \
iso15693tools.c \ iso15693tools.c \
prng.c \ prng.c \
graph.c \ graph.c \
cmddata.c \ cmddata.c \
lfdemod.c \ lfdemod.c \
emv/crypto_polarssl.c\ emv/crypto_polarssl.c\
emv/crypto.c\ emv/crypto.c\
emv/emv_pk.c\ emv/emv_pk.c\
emv/emv_pki.c\ emv/emv_pki.c\
emv/emv_pki_priv.c\ emv/emv_pki_priv.c\
emv/test/cryptotest.c\ emv/test/cryptotest.c\
emv/apduinfo.c \ emv/apduinfo.c \
emv/dump.c \ emv/dump.c \
emv/tlv.c \ emv/tlv.c \
emv/emv_tags.c \ emv/emv_tags.c \
emv/dol.c \ emv/dol.c \
emv/emvjson.c\ emv/emvjson.c\
emv/emvcore.c \ emv/emvcore.c \
emv/test/crypto_test.c\ emv/test/crypto_test.c\
emv/test/sda_test.c\ emv/test/sda_test.c\
emv/test/dda_test.c\ emv/test/dda_test.c\
emv/test/cda_test.c\ emv/test/cda_test.c\
emv/cmdemv.c \ emv/cmdemv.c \
emv/emv_roca.c \ emv/emv_roca.c \
mifare/mifare4.c \ mifare/mifare4.c \
mifare/mad.c \ mifare/mad.c \
mifare/ndef.c \ mifare/ndef.c \
cmdanalyse.c \ cmdanalyse.c \
cmdhf.c \ cmdhf.c \
cmdhflist.c \ cmdhflist.c \
cmdhf14a.c \ cmdhf14a.c \
cmdhf14b.c \ cmdhf14b.c \
cmdhf15.c \ cmdhf15.c \
cmdhfepa.c \ cmdhfepa.c \
cmdhflegic.c \ cmdhflegic.c \
cmdhficlass.c \ cmdhficlass.c \
cmdhfmf.c \ cmdhfmf.c \
cmdhfmfu.c \ cmdhfmfu.c \
cmdhfmfp.c \ cmdhfmfp.c \
cmdhfmfhard.c \ cmdhfmfhard.c \
hardnested/hardnested_bruteforce.c \ hardnested/hardnested_bruteforce.c \
cmdhfmfdes.c \ cmdhfmfdes.c \
cmdhftopaz.c \ cmdhftopaz.c \
cmdhffido.c \ cmdhffido.c \
cmdhffelica.c \ cmdhffelica.c \
cmdhw.c \ cmdhw.c \
cmdlf.c \ cmdlf.c \
cmdlfawid.c \ cmdlfawid.c \
cmdlfcotag.c \ cmdlfcotag.c \
cmdlfem4x.c \ cmdlfem4x.c \
cmdlffdx.c \ cmdlffdx.c \
cmdlfguard.c \ cmdlfguard.c \
cmdlfhid.c \ cmdlfhid.c \
cmdlfhitag.c \ cmdlfhitag.c \
cmdlfio.c \ cmdlfio.c \
cmdlfindala.c \ cmdlfindala.c \
cmdlfjablotron.c \ cmdlfjablotron.c \
cmdlfkeri.c \ cmdlfkeri.c \
cmdlfnexwatch.c \ cmdlfnexwatch.c \
cmdlfnedap.c \ cmdlfnedap.c \
cmdlfnoralsy.c \ cmdlfnoralsy.c \
cmdlfpac.c \ cmdlfpac.c \
cmdlfparadox.c \ cmdlfparadox.c \
cmdlfpcf7931.c \ cmdlfpcf7931.c \
cmdlfpresco.c \ cmdlfpresco.c \
cmdlfpyramid.c \ cmdlfpyramid.c \
cmdlfsecurakey.c \ cmdlfsecurakey.c \
cmdlft55xx.c \ cmdlft55xx.c \
cmdlfti.c \ cmdlfti.c \
cmdlfviking.c \ cmdlfviking.c \
cmdlfvisa2000.c \ cmdlfvisa2000.c \
cmdtrace.c \ cmdtrace.c \
cmdflashmem.c \ cmdflashmem.c \
cmdsmartcard.c \ cmdsmartcard.c \
cmdusart.c \ cmdusart.c \
cmdparser.c \ cmdparser.c \
cmdmain.c \ cmdmain.c \
pm3_binlib.c \ pm3_binlib.c \
scripting.c \ scripting.c \
cmdscript.c \ cmdscript.c \
pm3_bitlib.c \ pm3_bitlib.c \
protocols.c \ protocols.c \
cmdcrc.c \ cmdcrc.c \
reveng/preset.c \ reveng/preset.c \
reveng/reveng.c \ reveng/reveng.c \
reveng/cli.c \ reveng/cli.c \
reveng/bmpbit.c \ reveng/bmpbit.c \
reveng/model.c \ reveng/model.c \
reveng/poly.c \ reveng/poly.c \
bucketsort.c bucketsort.c
cpu_arch = $(shell uname -m) cpu_arch = $(shell uname -m)
ifneq ($(findstring 86, $(cpu_arch)), ) ifneq ($(findstring 86, $(cpu_arch)), )
MULTIARCHSRCS = hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c MULTIARCHSRCS = hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c
endif endif
ifneq ($(findstring amd64, $(cpu_arch)), ) ifneq ($(findstring amd64, $(cpu_arch)), )
MULTIARCHSRCS = hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c MULTIARCHSRCS = hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c
endif endif
ifeq ($(MULTIARCHSRCS), ) ifeq ($(MULTIARCHSRCS), )
CMDSRCS += hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c CMDSRCS += hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c
endif endif
ZLIBSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c ZLIBSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c
@ -270,10 +270,10 @@ CMDOBJS = $(CMDSRCS:%.c=$(OBJDIR)/%.o)
OBJCOBJS = $(OBJCSRCS:%.m=$(OBJDIR)/%.o) OBJCOBJS = $(OBJCSRCS:%.m=$(OBJDIR)/%.o)
ZLIBOBJS = $(ZLIBSRCS:%.c=$(OBJDIR)/%.o) ZLIBOBJS = $(ZLIBSRCS:%.c=$(OBJDIR)/%.o)
MULTIARCHOBJS = $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \ MULTIARCHOBJS = $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_MMX.o) \ $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_MMX.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_SSE2.o) \ $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_SSE2.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX.o) \ $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o) $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o)
SUPPORTS_AVX512 := $(shell echo | gcc -E -mavx512f - > /dev/null 2>&1 && echo "True" ) SUPPORTS_AVX512 := $(shell echo | gcc -E -mavx512f - > /dev/null 2>&1 && echo "True" )
@ -284,12 +284,12 @@ HARD_SWITCH_AVX = -mmmx -msse2 -mavx -mno-avx2
HARD_SWITCH_AVX2 = -mmmx -msse2 -mavx -mavx2 HARD_SWITCH_AVX2 = -mmmx -msse2 -mavx -mavx2
HARD_SWITCH_AVX512 = -mmmx -msse2 -mavx -mavx2 -mavx512f HARD_SWITCH_AVX512 = -mmmx -msse2 -mavx -mavx2 -mavx512f
ifeq "$(SUPPORTS_AVX512)" "True" ifeq "$(SUPPORTS_AVX512)" "True"
HARD_SWITCH_NOSIMD += -mno-avx512f HARD_SWITCH_NOSIMD += -mno-avx512f
HARD_SWITCH_MMX += -mno-avx512f HARD_SWITCH_MMX += -mno-avx512f
HARD_SWITCH_SSE2 += -mno-avx512f HARD_SWITCH_SSE2 += -mno-avx512f
HARD_SWITCH_AVX += -mno-avx512f HARD_SWITCH_AVX += -mno-avx512f
HARD_SWITCH_AVX2 += -mno-avx512f HARD_SWITCH_AVX2 += -mno-avx512f
MULTIARCHOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX512.o) MULTIARCHOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX512.o)
endif endif
BINS = proxmark3 flasher fpga_compress BINS = proxmark3 flasher fpga_compress

View file

@ -89,15 +89,15 @@ $(VERSIONOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
# without touching start address or RAM addresses (.bss and .data sections) # without touching start address or RAM addresses (.bss and .data sections)
# See ldscript.common. -- Henryk Plötz <henryk@ploetzli.ch> 2009-08-27 # See ldscript.common. -- Henryk Plötz <henryk@ploetzli.ch> 2009-08-27
OBJCOPY_TRANSLATIONS = --no-change-warnings \ OBJCOPY_TRANSLATIONS = --no-change-warnings \
--change-addresses -0x100000 --change-start 0 \ --change-addresses -0x100000 --change-start 0 \
--change-section-address .bss+0 --change-section-address .data-0x100000 \ --change-section-address .bss+0 --change-section-address .data-0x100000 \
--change-section-address .commonarea+0 --change-section-address .commonarea+0
$(OBJDIR)/%.s19: $(OBJDIR)/%.elf $(OBJDIR)/%.s19: $(OBJDIR)/%.elf
$(OBJCOPY) -Osrec --srec-forceS3 --strip-debug $(OBJCOPY_TRANSLATIONS) $^ $@ $(OBJCOPY) -Osrec --srec-forceS3 --strip-debug $(OBJCOPY_TRANSLATIONS) $^ $@
# easy printing of MAKE VARIABLES # easy printing of MAKE VARIABLES
print-%: ; @echo $* = $($*) print-%: ; @echo $* = $($*)
# Automatic dependency generation # Automatic dependency generation
DEPENDENCY_FILES = $(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(THUMBSRC))) \ DEPENDENCY_FILES = $(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(THUMBSRC))) \
$(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(ARMSRC))) \ $(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(ARMSRC))) \

View file

@ -40,56 +40,56 @@ endef
PLTNAME = Unknown Platform PLTNAME = Unknown Platform
ifeq ($(PLATFORM),PM3RDV4) ifeq ($(PLATFORM),PM3RDV4)
MCU = AT91SAM7S512 MCU = AT91SAM7S512
PLATFORM_DEFS = -DWITH_SMARTCARD -DWITH_FLASH PLATFORM_DEFS = -DWITH_SMARTCARD -DWITH_FLASH
PLTNAME = Proxmark3 rdv4 PLTNAME = Proxmark3 rdv4
else ifeq ($(PLATFORM),PM3EVO) else ifeq ($(PLATFORM),PM3EVO)
MCU = AT91SAM7S512 MCU = AT91SAM7S512
PLTNAME = Proxmark3 EVO PLTNAME = Proxmark3 EVO
else ifeq ($(PLATFORM),PM3EASY) else ifeq ($(PLATFORM),PM3EASY)
MCU = AT91SAM7S256 MCU = AT91SAM7S256
PLTNAME = Proxmark3 rdv3 Easy PLTNAME = Proxmark3 rdv3 Easy
else ifeq ($(PLATFORM),PM3RDV2) else ifeq ($(PLATFORM),PM3RDV2)
MCU = AT91SAM7S512 MCU = AT91SAM7S512
PLTNAME = Proxmark3 rdv2 PLTNAME = Proxmark3 rdv2
else ifeq ($(PLATFORM),PM3OLD256) else ifeq ($(PLATFORM),PM3OLD256)
MCU = AT91SAM7S256 MCU = AT91SAM7S256
PLTNAME = Proxmark3 V1 with AT91SAM7S256 PLTNAME = Proxmark3 V1 with AT91SAM7S256
else ifeq ($(PLATFORM),PM3OLD512) else ifeq ($(PLATFORM),PM3OLD512)
MCU = AT91SAM7S512 MCU = AT91SAM7S512
PLTNAME = Proxmark3 V1 with AT91SAM7S512 PLTNAME = Proxmark3 V1 with AT91SAM7S512
else else
$(error Invalid or empty PLATFORM: $(PLATFORM). Known platforms: $(KNOWN_PLATFORMS)) $(error Invalid or empty PLATFORM: $(PLATFORM). Known platforms: $(KNOWN_PLATFORMS))
endif endif
# parsing additional PLATFORM_EXTRAS tokens # parsing additional PLATFORM_EXTRAS tokens
PLATFORM_EXTRAS_TMP:=$(PLATFORM_EXTRAS) PLATFORM_EXTRAS_TMP:=$(PLATFORM_EXTRAS)
ifneq (,$(findstring BTADDON,$(PLATFORM_EXTRAS_TMP))) ifneq (,$(findstring BTADDON,$(PLATFORM_EXTRAS_TMP)))
PLATFORM_DEFS += -DWITH_FPC_USART_HOST PLATFORM_DEFS += -DWITH_FPC_USART_HOST
PLATFORM_EXTRAS_TMP := $(strip $(filter-out BTADDON,$(PLATFORM_EXTRAS_TMP))) PLATFORM_EXTRAS_TMP := $(strip $(filter-out BTADDON,$(PLATFORM_EXTRAS_TMP)))
endif endif
ifneq (,$(findstring FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP))) ifneq (,$(findstring FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP)))
PLATFORM_DEFS += -DWITH_FPC_USART_DEV PLATFORM_DEFS += -DWITH_FPC_USART_DEV
PLATFORM_EXTRAS_TMP := $(strip $(filter-out FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP))) PLATFORM_EXTRAS_TMP := $(strip $(filter-out FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP)))
endif endif
ifneq (,$(PLATFORM_EXTRAS_TMP)) ifneq (,$(PLATFORM_EXTRAS_TMP))
$(error Unknown PLATFORM_EXTRAS token(s): $(PLATFORM_EXTRAS_TMP)) $(error Unknown PLATFORM_EXTRAS token(s): $(PLATFORM_EXTRAS_TMP))
endif endif
# common LF support # common LF support
PLATFORM_DEFS += \ PLATFORM_DEFS += \
-DWITH_LF \ -DWITH_LF \
-DWITH_HITAG -DWITH_HITAG
# common HF support # common HF support
PLATFORM_DEFS += \ PLATFORM_DEFS += \
-DWITH_ISO15693 \ -DWITH_ISO15693 \
-DWITH_LEGICRF \ -DWITH_LEGICRF \
-DWITH_ISO14443b \ -DWITH_ISO14443b \
-DWITH_ISO14443a \ -DWITH_ISO14443a \
-DWITH_ICLASS \ -DWITH_ICLASS \
-DWITH_FELICA \ -DWITH_FELICA \
-DWITH_HFSNIFF -DWITH_HFSNIFF
# Standalone mode # Standalone mode
# !! Choose only one !! # !! Choose only one !!
@ -112,7 +112,7 @@ $(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))
# WITH_FPC_USART_* needs WITH_FPC_USART : # WITH_FPC_USART_* needs WITH_FPC_USART :
ifneq (,$(findstring WITH_FPC_USART_,$(PLATFORM_DEFS))) ifneq (,$(findstring WITH_FPC_USART_,$(PLATFORM_DEFS)))
PLATFORM_DEFS += -DWITH_FPC_USART PLATFORM_DEFS += -DWITH_FPC_USART
endif endif
PLATFORM_DEFS_INFO = $(strip $(filter-out STANDALONE%, $(subst -DWITH_,,$(PLATFORM_DEFS)))) PLATFORM_DEFS_INFO = $(strip $(filter-out STANDALONE%, $(subst -DWITH_,,$(PLATFORM_DEFS))))
@ -120,7 +120,7 @@ PLATFORM_DEFS_INFO_STANDALONE = $(strip $(subst STANDALONE_,, $(filter STANDALON
# Check that only one Standalone mode has been chosen # Check that only one Standalone mode has been chosen
ifneq (,$(word 2, $(PLATFORM_DEFS_INFO_STANDALONE))) ifneq (,$(word 2, $(PLATFORM_DEFS_INFO_STANDALONE)))
$(error You must choose only one Standalone mode!: $(PLATFORM_DEFS_INFO_STANDALONE)) $(error You must choose only one Standalone mode!: $(PLATFORM_DEFS_INFO_STANDALONE))
endif endif

View file

@ -1,6 +1,6 @@
# External resources # External resources
You might want to follow one of these external resources to get an overview, but please still read carefully this page as some instructions may vary. You might want to follow one of these external resources to get an overview, but please still read carefully this page as some instructions may have evolved.
* [Kali Video Installation guide](https://youtu.be/t5eBPS6lV3E "Kali Linux Installation Tutorial") * [Kali Video Installation guide](https://youtu.be/t5eBPS6lV3E "Kali Linux Installation Tutorial")
* [Ubuntu Video Installation guide](https://youtu.be/DThmkH8CdMo "Ubuntu Installation Tutorial") * [Ubuntu Video Installation guide](https://youtu.be/DThmkH8CdMo "Ubuntu Installation Tutorial")
@ -9,11 +9,8 @@ You might want to follow one of these external resources to get an overview, but
![Linux Installation Video Screenshot](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS/blob/master/screenshot-www.youtube.com-2019.03.17-20-44-33.png) ![Linux Installation Video Screenshot](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS/blob/master/screenshot-www.youtube.com-2019.03.17-20-44-33.png)
* ParrotOS: some further notes can be found at @5w0rdfish repo [Proxmark Installation for Parrot OS](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS) * ParrotOS: some further notes can be found at @5w0rdfish repo [Proxmark Installation for Parrot OS](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS)
* Ubuntu 14.04.2 LTS, 15.10 or 16.04 GC updates on the [Proxmark3 Ubuntu wiki page](https://github.com/Proxmark/proxmark3/wiki/Ubuntu%20Linux)
* A nice and cool install script made by @daveio is found here: https://github.com/daveio/attacksurface/blob/master/proxmark3/pm3-setup.sh (unavailable?)
* Iceman has also added this script to the fork. https://github.com/RfidResearchGroup/proxmark3/blob/master/install.sh * Iceman has also added this script to the fork. https://github.com/RfidResearchGroup/proxmark3/blob/master/install.sh
# Install the required dependencies # Install the required dependencies
## On Debian / Ubuntu / Kali / ParrotOS ## On Debian / Ubuntu / Kali / ParrotOS
@ -31,15 +28,22 @@ sudo apt-get install p7zip git ca-certificates build-essential libreadline5 libr
libusb-0.1-4 libusb-dev libqt4-dev perl pkg-config wget libncurses5-dev gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib libusb-0.1-4 libusb-dev libqt4-dev perl pkg-config wget libncurses5-dev gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib
``` ```
If you don't need the graphical components of the Proxmark3 client, you can skip the installation of `libqt4-dev`.
If you get some (non blocking) error at runtime such as _Gtk-Message: Failed to load module "canberra-gtk-module"_ you may have to install `libcanberra-gtk-module`.
## On ArchLinux ## On ArchLinux
```sh ```sh
sudo pacman -Sy base-devel p7zip libusb readline ncurses arm-none-eabi-newlib --needed sudo pacman -Sy base-devel p7zip libusb readline ncurses arm-none-eabi-gcc arm-none-eabi-newlib git --needed
``` ```
Additional AUR packages:
```sh ```sh
yaourt -S termcap yaourt -S termcap
``` ```
Note that with only these requirements, you will not get the graphical components of the Proxmark3 client. (Untested: how to get it? `yaourt -S qt4` ?)
# Clone the RRG/Iceman repository # Clone the RRG/Iceman repository
```sh ```sh

View file

@ -2,12 +2,6 @@
You will need to use the Gator96100 Proxspace package to assist in your windows installation. You will need to use the Gator96100 Proxspace package to assist in your windows installation.
This can be downloaded from https://github.com/Gator96100/ProxSpace/ This can be downloaded from https://github.com/Gator96100/ProxSpace/
## Notes
If you receive gcc errors using v3.1 during build, download and use v2.2. This may help resolve the issue.
- https://github.com/Gator96100/ProxSpace/releases/tag/v3.1 (release v3.1 with gcc v7.3.0 )
- https://github.com/Gator96100/ProxSpace/releases/tag/v2.2 (release v2.2 with gcc v5.3.0 arm-none-eabi-gcc v7.1.0)
--- ---
# Video Installation guide # Video Installation guide
[![Windows Installation tutorial](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS/blob/master/screenshot-www.youtube.com-2019.03.17-20-44-33.png)](https://youtu.be/zzF0NCMJnYU "Windows Installation Tutorial") [![Windows Installation tutorial](https://github.com/5w0rdfish/Proxmark3-RDV4-ParrotOS/blob/master/screenshot-www.youtube.com-2019.03.17-20-44-33.png)](https://youtu.be/zzF0NCMJnYU "Windows Installation Tutorial")