proxmark3/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md
2022-08-19 23:15:48 +02:00

5.8 KiB

Compilation instructions

Table of Contents

Tuning compilation parameters

^Top

The client and the Proxmark3 firmware should always be in sync. Nevertheless, the firmware can be tuned depending on the Proxmark3 platform and options.

Indeed, the Iceman fork can be used on other Proxmark3 hardware platforms as well.

Via some definitions, you can adjust the firmware for a given platform, but also to add features like the support of the Blue Shark add-on or to select which standalone mode to embed. To learn how to adjust the firmware, please read Advanced compilation parameters.

Compile for Proxmark3 RDV4

^Top

The repo defaults for compiling a firmware and client suitable for Proxmark3 RDV4.

Compile for generic Proxmark3 platforms

^Top

In order to build this repo for generic Proxmark3 platforms we urge you to read Advanced compilation parameters

Get the latest commits

^Top

cd proxmark3
git pull

Clean and compile everything

^Top

make clean && make -j

if you got an error

^Top

Read the troubleshooting guide,

For instance, on WSl-1 you usually get the libQt5Core.so.5 not found message solution

Install

^Top

This is an optional step. If you do

sudo make install

Then the required files will be installed on your system, by default in /usr/local/bin and /usr/local/share/proxmark3. Maintainers can read this doc to learn how to modify installation paths via DESTDIR and PREFIX Makefile variables.

The commands given in the documentation assume you did the installation step. If you didn't, you've to adjust the commands paths and files paths accordingly, e.g. calling ./pm3 or client/proxmark3 instead of just pm3 or proxmark3.

Flash the BOOTROM & FULLIMAGE

^Top

In most cases, you can run the following script which try to auto-detect the port to use, on several OS:

pm3-flash-all

For the other cases, specify the port by yourself. For example, for a Proxmark3 connected via USB under Linux (adjust the port for your OS):

proxmark3 /dev/ttyACM0 --flash --unlock-bootloader --image bootrom.elf --image fullimage.elf

The firmware files will be searched in the expected locations (installed files, working repo files, user folder, etc.). You can also specify their location:

pm3-flash -b /tmp/my-bootrom.elf /tmp/my-fullimage.elf

or

proxmark3 /dev/ttyACM0 --flash --unlock-bootloader --image /tmp/my-bootrom.elf --image /tmp/my-fullimage.elf

The button trick

^Top

If the flasher can't detect your Proxmark3 (especially the very first time you flash a new device), force it to enter the bootloader mode as following:

With your Proxmark3 unplugged from your machine, press and hold the button on your Proxmark3 as you plug it into a USB port. You can release the button, two of the four LEDs should stay on. You're in bootloader mode, ready for the next step.

In case the two LEDs don't stay on when you're releasing the button, you've a very old bootloader, start over and keep the button pressed during the whole flashing procedure.

flasher stops and warns you about firmware image

^Top

The Proxmark3 software and firmware is connected tightly. The strong recommendation is to use the client with a Proxmark3 device flashed with firmware images from same source version.
In the flash process you might get this message because the firmware images is downloaded or distributed and you have compiled your own client from a different source version.
To minimize the risks the flasher warns about it and stops.

    Make sure to flash a correct and up-to-date version
    You can force flashing this firmware by using the option '--force'

If you know what you are doing and want to proceed despite the mismatch, you need to add the --force param in order to continue flashing.

pm3-flash-all --force

Run the client

^Top

In most cases, you can run the script pm3 which try to auto-detect the port to use, on several OS.

./pm3

For the other cases, specify the port by yourself. For example, for a Proxmark3 connected via USB under Linux:

Here, for example, for a Proxmark3 connected via USB under Linux (adjust the port for your OS):

proxmark3 /dev/ttyACM0

or from the local repo

client/proxmark3 /dev/ttyACM0

Next steps

^Top

For the next steps, please read the following pages: