diff --git a/README.md b/README.md index 92d296216c..0cb32efb50 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ####################################### Proxmark III Develoment Kit for Windows ####################################### -## Different branches ## - The master branch is designed for development, when 'runme.bat' is started a terminal opens that allows to run make. - The autoBuild branch runs a script (msys/scrip.sh) at startup that updates all git repositories in the pm3 folder and then wants to compile them, it was not designed for development, just for compiling. +## Different runme ## + The runme.bat is designed for development, when 'runme.bat' is started a terminal opens that allows to run make. + The runme_autobuild.bat runs a script (msys/scrip.sh) at startup that updates all git repositories in the pm3 folder and then wants to compile them, it was not designed for development, just for compiling. ## What's installed ## diff --git a/msys/autobuild/win32/FLASH - Bootrom.bat b/msys/autobuild/win32/FLASH - Bootrom.bat new file mode 100644 index 0000000000..1bc139e18b --- /dev/null +++ b/msys/autobuild/win32/FLASH - Bootrom.bat @@ -0,0 +1,75 @@ +@echo off +color 0a +MODE CON COLS=80 LINES=36 +title Bootrom FLASH FILE +echo. +echo. +echo. +echo ============================================================================= +echo ©¦!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! O__O !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!©¦ +echo ©¦=========================================================================©¦ +echo ©¦Bootrom-ONLY FLASHER BATCH FILE ©¦ +echo ©¦ ©¦ +echo ©¦you will need to have this file (FLASH - Bootrom.bat) in \win32 folder ©¦ +echo ©¦you will need to have flasher.exe in \win32 folder ©¦ +echo ©¦you will need to have bootrom.elf in \firmware_win\bootrom folder ©¦ +echo ©¦ ©¦ +echo ©¦ ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ! FLASHING BOOTROM CAN BE EXTREMELY DANGEROUS ! ©¦ +echo ©¦ ©¦ +echo ©¦ ©¦ +echo ©¦IF YOU HAVE THOSE REQUISITES ©¦ +echo ©¦ HIT ANY BUTTON TO CONTINUE AT YOUR OWN RISK !!! ©¦ +echo ©¦-------------------------------------------------------------------------©¦ +echo ============================================================================= +pause. + +cls +echo. +echo ==================================== +echo FLASHING bootrom.elf, please wait... +echo ==================================== +echo. +flasher.exe com5 -b ..\firmware_win\bootrom\bootrom.elf + +pause. + +cls +title DONE +echo. +echo ___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___ +echo / \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ +echo / \___/ \___/ \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \ FLASHING OPERATION SUCCESSFUL ! Enjoy it ! / \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \ BATCH FILE BY ASPER / \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \___ ___/ \ +echo \___/ \___ ___ ___ ___ ___ ___ ___/ \___/ +echo / \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ + +echo. +pause. +cls +MODE CON COLS=130 LINES=36 +cmd.exe \ No newline at end of file diff --git a/msys/autobuild/win32/FLASH - fullimage.bat b/msys/autobuild/win32/FLASH - fullimage.bat new file mode 100644 index 0000000000..3405946a39 --- /dev/null +++ b/msys/autobuild/win32/FLASH - fullimage.bat @@ -0,0 +1,61 @@ +@echo off +color 0a +MODE CON COLS=80 LINES=36 +title FPGA FLASH FILE +echo. +echo. +echo. +echo ========================================================================== +echo ©¦!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! O__O !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!©¦ +echo ©¦======================================================================©¦ +echo ©¦FULLIMAGE FLASHER BATCH FILE ©¦ +echo ©¦ ©¦ +echo ©¦you will need to have this batch in \win32 folder ©¦ +echo ©¦you will need to have flasher.exe in \win32 folder ©¦ +echo ©¦you will need to have fullimage.elf in \firmware_win folder ©¦ +echo ©¦ ©¦ +echo ©¦ ©¦ +echo ©¦IF YOU HAVE THOSE REQUISITES HIT ANY BUTTON TO CONTINUE ! ©¦ +echo ©¦----------------------------------------------------------------------©¦ +echo ========================================================================== +pause. + +cls +echo. +echo ====================================== +echo FLASHING fullimage.elf, please wait... +echo ====================================== +echo. +flasher.exe com5 -b ..\firmware_win\fullimage.elf + +pause. + +cls +title DONE +echo. +echo ___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___ +echo / \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ +echo / \___/ \___/ \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \ FLASHING OPERATION SUCCESSFUL ! Enjoy it ! / \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \ BATCH FILE BY ASPER / \ +echo \___/ \___/ +echo / \ / \ +echo \___/ \___/ +echo / \___ ___/ \ +echo \___/ \___ ___ ___ ___ ___ ___ ___/ \___/ +echo / \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ +echo \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ + +echo. +pause. +cls +MODE CON COLS=130 LINES=36 +cmd.exe diff --git a/msys/autobuild/win32/Go.bat b/msys/autobuild/win32/Go.bat new file mode 100644 index 0000000000..859999157c --- /dev/null +++ b/msys/autobuild/win32/Go.bat @@ -0,0 +1 @@ +proxmark3 COM5 \ No newline at end of file diff --git a/msys/autobuild/win32/qt.conf b/msys/autobuild/win32/qt.conf new file mode 100644 index 0000000000..2775587ef7 --- /dev/null +++ b/msys/autobuild/win32/qt.conf @@ -0,0 +1,2 @@ +[Paths] +Plugins=. \ No newline at end of file diff --git a/msys/bin/zip.exe b/msys/bin/zip.exe new file mode 100644 index 0000000000..31260744b7 Binary files /dev/null and b/msys/bin/zip.exe differ diff --git a/msys/etc/fstab b/msys/etc/fstab index ee337920c0..25e0e5d82d 100644 --- a/msys/etc/fstab +++ b/msys/etc/fstab @@ -2,3 +2,5 @@ C:\Users\Julius\Documents\ProxSpace\devkitARM /devkitARM C:\Users\Julius\Documents\ProxSpace\Qt\5.6 /qt C:\Users\Julius\Documents\ProxSpace\pm3 /pm3 +C:\Users\Julius\Documents\ProxSpace\build /build +C:\Users\Julius\Documents\ProxSpace\finished /finished diff --git a/msys/msys.bat b/msys/msys.bat index 0a66179ed5..711b0e1fcd 100644 --- a/msys/msys.bat +++ b/msys/msys.bat @@ -94,7 +94,8 @@ exit :startsh if NOT EXIST %WD%sh.exe goto notfound -start %WD%sh --login -i +if NOT %autobuild% == true start %WD%sh --login -i +if %autobuild% == true start %WD%sh --login -i -c "sh /script.sh" exit :EOF diff --git a/msys/script.sh b/msys/script.sh new file mode 100644 index 0000000000..e728f76bd9 --- /dev/null +++ b/msys/script.sh @@ -0,0 +1,62 @@ +#!/bin/bash +pm3Dir=/pm3 +buildDir=/build +finishedDir=/finished +qtDir=/qt +mingwDir=/mingw + +cd $pm3Dir +for i in $( ls ); do + echo Processing: $i + cd $pm3Dir/$i + git fetch + git pull + hash=$(git rev-parse HEAD) + date=$(date +%Y%m%d) + if ! ls $finishedDir/$i/*-$hash.zip 1> /dev/null 2>&1; then + make clean + make all + if [ $? -eq 0 ]; then + mkdir -p $buildDir/$i/win32/lualibs + mkdir -p $buildDir/$i/win32/scripts + mkdir -p $buildDir/$i/win32/hardnested + mkdir -p $buildDir/$i/win32/platforms + mkdir -p $buildDir/$i/firmware_win/bootrom + mkdir -p "$buildDir/$i/Windows Driver" + mkdir -p "$buildDir/$i/firmware_win/JTAG Only" + mkdir -p $finishedDir/$i + rm -rf $buildDir/$i/win32/lualibs/* + rm -rf $buildDir/$i/win32/scripts/* + rm -rf $buildDir/$i/win32/hardnested/* + cp $qtDir/bin/Qt5Core.dll $buildDir/$i/win32 + cp $qtDir/bin/Qt5Gui.dll $buildDir/$i/win32 + cp $qtDir/bin/Qt5Widgets.dll $buildDir/$i/win32 + cp $qtDir/bin/libstdc++-6.dll $buildDir/$i/win32 + cp $mingwDir/bin/readline5.dll $buildDir/$i/win32 + cp $qtDir/bin/libwinpthread-1.dll $buildDir/$i/win32 + cp $qtDir/bin/libgcc_s_dw2-1.dll $buildDir/$i/win32 + cp $qtDir/plugins/platforms/qwindows.dll $buildDir/$i/win32/platforms + cp -r /autobuild/* $buildDir/$i + cp $pm3Dir/$i/client/proxmark3.exe $buildDir/$i/win32 + cp $pm3Dir/$i/client/flasher.exe $buildDir/$i/win32 + cp $pm3Dir/$i/client/*.dic $buildDir/$i/win32 + cp $pm3Dir/$i/client/lualibs/* $buildDir/$i/win32/lualibs + cp $pm3Dir/$i/client/scripts/* $buildDir/$i/win32/scripts + cp -r $pm3Dir/$i/client/hardnested/* $buildDir/$i/win32/hardnested + rm $buildDir/$i/win32/hardnested/*.h + rm $buildDir/$i/win32/hardnested/*.c + cp $pm3Dir/$i/armsrc/obj/fullimage.elf $buildDir/$i/firmware_win + cp $pm3Dir/$i/armsrc/obj/fullimage.s19 $buildDir/$i/firmware_win + cp $pm3Dir/$i/bootrom/obj/bootrom.elf $buildDir/$i/firmware_win/bootrom + cp $pm3Dir/$i/bootrom/obj/bootrom.s19 $buildDir/$i/firmware_win/bootrom + cp $pm3Dir/$i/recovery/bootrom.bin "$buildDir/$i/firmware_win/JTAG Only" + cp $pm3Dir/$i/recovery/fullimage.bin "$buildDir/$i/firmware_win/JTAG Only" + cp $pm3Dir/$i/recovery/proxmark3_recovery.bin "$buildDir/$i/firmware_win/JTAG Only" + cp $pm3Dir/$i/driver/proxmark3.inf "$buildDir/$i/Windows Driver" + cd $buildDir/$i + zip -r $finishedDir/$i/$date-$hash.zip ./* + else + echo $i failed + fi + fi +done diff --git a/runme.bat b/runme.bat index 4d9bda801a..00c9dd99b2 100644 --- a/runme.bat +++ b/runme.bat @@ -3,6 +3,7 @@ REM ******************************************* REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION REM ******************************************* set MYPATH=%~dp0 +set autobuild=false echo #Win32_Path Mount_Point >msys/etc/fstab echo %MYPATH%devkitARM /devkitARM >>msys/etc/fstab diff --git a/runme_autobuild.bat b/runme_autobuild.bat new file mode 100644 index 0000000000..a37434bf26 --- /dev/null +++ b/runme_autobuild.bat @@ -0,0 +1,14 @@ +@echo off +REM ******************************************* +REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION +REM ******************************************* +set MYPATH=%~dp0 +set autobuild=true + +echo #Win32_Path Mount_Point >msys/etc/fstab +echo %MYPATH%devkitARM /devkitARM >>msys/etc/fstab +echo %MYPATH%Qt\5.6 /qt >>msys/etc/fstab +echo %MYPATH%pm3 /pm3 >>msys/etc/fstab +echo %MYPATH%build /build >>msys/etc/fstab +echo %MYPATH%finished /finished >>msys/etc/fstab +msys\msys.bat