mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-30 03:53:26 +08:00
Disable ht2crack5gpu as ht2crack5opencl supercedes it and ht2crack5gpu can be difficult to get running on setups supporting OpenCL on more than one Nvidia GPU
This commit is contained in:
parent
6b0b9682aa
commit
f11ae25213
11 changed files with 20 additions and 33 deletions
|
@ -35,7 +35,7 @@ make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && sudo make install PLATFORM=P
|
|||
( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1
|
||||
( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1
|
||||
|
||||
# Hitag2crack, optionally with --long and --gpu ...
|
||||
# Hitag2crack, optionally with --long and --opencl ...
|
||||
make hitag2crack/clean && make hitag2crack && tools/pm3_tests.sh hitag2crack || exit 1
|
||||
```
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ On some architectures, pthread library is not present:
|
|||
|
||||
One tool requires a CUDA compilation environment, it can be skipped as well:
|
||||
|
||||
* `make hitag2crack SKIPGPU=1` to skip ht2crack5gpu tool when compiling the hitag2crack toolsuite.
|
||||
* `make hitag2crack SKIPOPENCL=1` to skip ht2crack5opencl tool when compiling the hitag2crack toolsuite.
|
||||
|
||||
Some unittests are available via `make check`, which is actually triggering individual targets as for `make install`.
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ At the moment both are maintained because they don't perfectly overlap yet.
|
|||
|
||||
| Feature | Makefile | Remarks |
|
||||
|-----|---|---|
|
||||
| Skip GPU-dependent code | `SKIPGPU=1` | to skip ht2crack5gpu tool when compiling the hitag2crack toolsuite |
|
||||
| Skip OpenCL-dependent code | `SKIPOPENCL=1` | to skip ht2crack5opencl tool when compiling the hitag2crack toolsuite |
|
||||
|
||||
## ARM
|
||||
^[Top](#top)
|
||||
|
|
|
@ -11,7 +11,7 @@ make -j client USE_BREW=1 SKIPREADLINE=1
|
|||
make -j mfkey
|
||||
make -j nonce2key
|
||||
make -j mf_nonce_brute
|
||||
make -j hitag2crack SKIPGPU=1
|
||||
make -j hitag2crack SKIPOPENCL=1
|
||||
make -j fpga_compress
|
||||
```
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
include ../../Makefile.defs
|
||||
|
||||
all clean install uninstall check: %: crack2/% crack3/% crack4/% crack5/%
|
||||
ifneq ($(SKIPGPU),1)
|
||||
all clean install uninstall check: %: crack5gpu/% crack5opencl/%
|
||||
ifneq ($(SKIPOPENCL),1)
|
||||
all clean install uninstall check: %: crack5opencl/%
|
||||
endif
|
||||
|
||||
crack2/%: FORCE
|
||||
|
@ -21,14 +21,10 @@ crack5/%: FORCE
|
|||
$(info [*] MAKE $@)
|
||||
$(Q)$(MAKE) --no-print-directory -C crack5 $(patsubst crack5/%,%,$@) DESTDIR=$(MYDESTDIR)
|
||||
|
||||
crack5gpu/%: FORCE
|
||||
$(info [*] MAKE $@)
|
||||
$(Q)$(MAKE) --no-print-directory -C crack5gpu $(patsubst crack5gpu/%,%,$@) DESTDIR=$(MYDESTDIR)
|
||||
|
||||
crack5opencl/%: FORCE
|
||||
$(info [*] MAKE $@)
|
||||
$(Q)$(MAKE) --no-print-directory -C crack5opencl $(patsubst crack5opencl/%,%,$@) DESTDIR=$(MYDESTDIR)
|
||||
|
||||
FORCE: # Dummy target to force remake in the subdirectories, even if files exist (this Makefile doesn't know about the prerequisites)
|
||||
|
||||
.phony: crack2 crack3 crack4 crack5 crack5gpu crack5opencl FORCE
|
||||
.phony: crack2 crack3 crack4 crack5 crack5opencl FORCE
|
||||
|
|
|
@ -7,7 +7,7 @@ DICPATH="./client/dictionaries"
|
|||
RESOURCEPATH="./client/resources"
|
||||
|
||||
SLOWTESTS=false
|
||||
GPUTESTS=false
|
||||
OPENCLTESTS=false
|
||||
TESTALL=true
|
||||
TESTMFKEY=false
|
||||
TESTNONCE2KEY=false
|
||||
|
@ -26,9 +26,9 @@ while (( "$#" )); do
|
|||
case "$1" in
|
||||
-h|--help)
|
||||
echo """
|
||||
Usage: $0 [--long] [--gpu] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_nonce_brute|fpga_compress|bootrom|armsrc|client|recovery|common]
|
||||
Usage: $0 [--long] [--opencl] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_nonce_brute|fpga_compress|bootrom|armsrc|client|recovery|common]
|
||||
--long: Enable slow tests
|
||||
--gpu: Enable tests requiring GPU
|
||||
--opencl: Enable tests requiring OpenCL (preferably a Nvidia GPU)
|
||||
--clientbin ...: Specify path to proxmark3 binary to test
|
||||
If no target given, all targets will be tested
|
||||
"""
|
||||
|
@ -38,8 +38,8 @@ Usage: $0 [--long] [--gpu] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_
|
|||
SLOWTESTS=true
|
||||
shift
|
||||
;;
|
||||
--gpu)
|
||||
GPUTESTS=true
|
||||
--opencl)
|
||||
OPENCLTESTS=true
|
||||
shift
|
||||
;;
|
||||
--clientbin)
|
||||
|
@ -141,9 +141,9 @@ function CheckFileExist() {
|
|||
return 1
|
||||
}
|
||||
|
||||
# [slow] [gpu] [retry] [ignore] <title> <command_line> <check_result_regex>
|
||||
# [slow] [opencl] [retry] [ignore] <title> <command_line> <check_result_regex>
|
||||
# slow: test takes more than ~5s
|
||||
# gpu: test requires GPU presence
|
||||
# opencl: test requires OpenCL
|
||||
# retry: test repeated up to 3 times in case of failure
|
||||
# ignore: test failure is not fatal
|
||||
function CheckExecute() {
|
||||
|
@ -153,11 +153,11 @@ function CheckExecute() {
|
|||
else
|
||||
local SLOWTEST=false
|
||||
fi
|
||||
if [ "$1" == "gpu" ]; then
|
||||
local GPUTEST=true
|
||||
if [ "$1" == "opencl" ]; then
|
||||
local OPENCLTEST=true
|
||||
shift
|
||||
else
|
||||
local GPUTEST=false
|
||||
local OPENCLTEST=false
|
||||
fi
|
||||
if [ "$1" == "retry" ]; then
|
||||
local RETRY="1 2 3 e"
|
||||
|
@ -179,8 +179,8 @@ function CheckExecute() {
|
|||
echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( slow )"
|
||||
return $RESULT
|
||||
fi
|
||||
if $GPUTEST && ! $GPUTESTS; then
|
||||
echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( gpu )"
|
||||
if $OPENCLTEST && ! $OPENCLTESTS; then
|
||||
echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( opencl )"
|
||||
return $RESULT
|
||||
fi
|
||||
|
||||
|
@ -327,15 +327,6 @@ while true; do
|
|||
# Order of magnitude to crack it: ~12s on 1 core, ~3s on 4 cores -> tagged as "slow"
|
||||
if ! CheckExecute slow "ht2crack5 test" "cd $HT2CRACK5PATH; ./ht2crack5 $HT2CRACK5UID $HT2CRACK5NRAR" "Key: $HT2CRACK5KEY"; then break; fi
|
||||
|
||||
echo -e "\n${C_BLUE}Testing ht2crack5gpu:${C_NC} ${HT2CRACK5GPUPATH:=./tools/hitag2crack/crack5gpu/}"
|
||||
if ! CheckFileExist "ht2crack5gpu exists" "$HT2CRACK5GPUPATH/ht2crack5gpu"; then break; fi
|
||||
HT2CRACK5GPUUID=12345678
|
||||
HT2CRACK5GPUKEY=AABBCCDDEEFF
|
||||
# The speed depends on the nRaR so we'll use two pairs known to work fast
|
||||
HT2CRACK5GPUNRAR="B438220C 944FFD74 942C59E3 3D450B34"
|
||||
# Order of magnitude to crack it: ~15s -> tagged as "slow"
|
||||
if ! CheckExecute slow gpu "ht2crack5gpu test" "cd $HT2CRACK5GPUPATH; ./ht2crack5gpu $HT2CRACK5GPUUID $HT2CRACK5GPUNRAR" "Key: $HT2CRACK5GPUKEY"; then break; fi
|
||||
|
||||
echo -e "\n${C_BLUE}Testing ht2crack5opencl:${C_NC} ${HT2CRACK5OPENCLPATH:=./tools/hitag2crack/crack5opencl/}"
|
||||
if ! CheckFileExist "ht2crack5opencl exists" "$HT2CRACK5OPENCLPATH/ht2crack5opencl"; then break; fi
|
||||
HT2CRACK5OPENCLUID=12345678
|
||||
|
@ -343,7 +334,7 @@ while true; do
|
|||
# The speed depends on the nRaR so we'll use two pairs known to work fast
|
||||
HT2CRACK5OPENCLNRAR="B438220C 944FFD74 942C59E3 3D450B34"
|
||||
# Order of magnitude to crack it: ~15s -> tagged as "slow"
|
||||
if ! CheckExecute slow gpu "ht2crack5opencl test" "cd $HT2CRACK5OPENCLPATH; ./ht2crack5opencl $HT2CRACK5OPENCLUID $HT2CRACK5OPENCLNRAR" "Key found.*: $HT2CRACK5OPENCLKEY"; then break; fi
|
||||
if ! CheckExecute slow opencl "ht2crack5opencl test" "cd $HT2CRACK5OPENCLPATH; ./ht2crack5opencl $HT2CRACK5OPENCLUID $HT2CRACK5OPENCLNRAR" "Key found.*$HT2CRACK5OPENCLKEY"; then break; fi
|
||||
fi
|
||||
if $TESTALL || $TESTCLIENT; then
|
||||
echo -e "\n${C_BLUE}Testing client:${C_NC} ${CLIENTBIN:=./client/proxmark3}"
|
||||
|
|
Loading…
Reference in a new issue