-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: one-shot Ubuntu setup script, crapto1 mirror URLs, Windows non-ProxSpace build docs #3211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PhenixStar
wants to merge
1
commit into
RfidResearchGroup:master
Choose a base branch
from
PhenixStar:feat/ubuntu-setup-and-cherrypicks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+180
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
doc/md/Installation_Instructions/Windows-Non-ProxSpace-Build.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Building Proxmark3 on Windows without ProxSpace | ||
|
|
||
| Three approaches for building outside the ProxSpace MSYS2 shell. | ||
|
|
||
| ## Option 1: PowerShell + ProxSpace toolchain (recommended) | ||
|
|
||
| Use the `Build-Proxmark3.ps1` wrapper from [ProxSpace](https://github.com/Gator96100/ProxSpace): | ||
|
|
||
| ```powershell | ||
| cd C:\ProxSpace | ||
| .\Build-Proxmark3.ps1 # build all | ||
| .\Build-Proxmark3.ps1 -Flash -Port COM5 # build + flash | ||
| .\Build-Proxmark3.ps1 -Target client # client only | ||
| ``` | ||
|
|
||
| The wrapper sets `TMP`, `TEMP`, `CC`, `CXX`, `MINGW_HOME` to avoid the `/tmp` path translation bug that causes `Cannot create temporary file in C:\WINDOWS\` linker errors when building from git-bash. | ||
|
|
||
| ### Manual PowerShell build (without wrapper) | ||
|
|
||
| ```powershell | ||
| $env:TEMP = 'C:\ProxSpace\msys2\tmp' | ||
| $env:TMP = 'C:\ProxSpace\msys2\tmp' | ||
| $env:PATH = 'C:\ProxSpace\msys2\mingw64\bin;C:\ProxSpace\msys2\usr\bin;' + $env:PATH | ||
| $env:MSYSTEM = 'MINGW64' | ||
| New-Item -ItemType Directory -Force -Path 'C:\ProxSpace\msys2\tmp' | ||
|
|
||
| & 'C:\ProxSpace\msys2\usr\bin\make.exe' -C 'C:\ProxSpace\pm3' bootrom/all | ||
| & 'C:\ProxSpace\msys2\usr\bin\make.exe' -C 'C:\ProxSpace\pm3' armsrc/all | ||
| & 'C:\ProxSpace\msys2\usr\bin\make.exe' -C 'C:\ProxSpace\pm3' SKIPREVENGTEST=1 client | ||
| ``` | ||
|
|
||
| ## Option 2: WSL2 (Windows Subsystem for Linux) | ||
|
|
||
| Treat it as a standard Linux build. From a WSL2 Ubuntu terminal: | ||
|
|
||
| ```bash | ||
| # Install dependencies | ||
| bash setup-ubuntu.sh | ||
|
|
||
| # Build | ||
| make clean && make -j$(nproc) | ||
|
|
||
| # Flash — use the Windows COM port path | ||
| ./client/proxmark3 /dev/ttyS4 --flash --unlock-bootloader --image bootrom/obj/bootrom.elf | ||
| ./client/proxmark3 /dev/ttyS4 --flash --image armsrc/obj/fullimage.elf | ||
| ``` | ||
|
|
||
| Note: WSL2 COM port mapping is `/dev/ttySN` where N is the Windows COM port number. | ||
|
|
||
| ## Option 3: Native MSYS2 (without ProxSpace) | ||
|
|
||
| Install MSYS2 from https://www.msys2.org/ and add the required packages: | ||
|
|
||
| ```bash | ||
| pacman -S --needed \ | ||
| mingw-w64-x86_64-gcc \ | ||
| mingw-w64-x86_64-arm-none-eabi-gcc \ | ||
| mingw-w64-x86_64-arm-none-eabi-newlib \ | ||
| mingw-w64-x86_64-qt6-base \ | ||
| mingw-w64-x86_64-readline \ | ||
| mingw-w64-x86_64-lua \ | ||
| mingw-w64-x86_64-jansson \ | ||
| mingw-w64-x86_64-bzip2 \ | ||
| mingw-w64-x86_64-lz4 \ | ||
| mingw-w64-x86_64-python \ | ||
| make git pkg-config | ||
|
|
||
| cd /c/path/to/proxmark3 | ||
| make clean && make -j$(nproc) | ||
| ``` | ||
|
|
||
| This approach uses a standard MSYS2 installation rather than ProxSpace's bundled snapshot, so packages are always up to date. | ||
|
|
||
| ## Flash procedure (all options) | ||
|
|
||
| Always flash bootrom first, then fullimage: | ||
|
|
||
| ```bash | ||
| ./pm3-flash-bootrom | ||
| ./pm3-flash-fullimage | ||
| ./pm3 | ||
| hw version | ||
| ``` | ||
|
|
||
| Note: The COM port may change after flashing the bootloader. Re-check with: | ||
| ```powershell | ||
| Get-PnpDevice -Class 'Ports' -Status OK | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/usr/bin/env bash | ||
| # setup-ubuntu.sh — One-shot Proxmark3 setup for Debian/Ubuntu/Kali | ||
| # | ||
| # Installs all build dependencies, handles ModemManager (udev rule preferred | ||
| # over full disable), installs device permission rules, and adds user to the | ||
| # required groups. | ||
| # | ||
| # Usage: bash setup-ubuntu.sh | ||
| # Idempotent: safe to re-run on an already-configured machine. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # --- Distro check --- | ||
| if ! command -v apt-get &>/dev/null; then | ||
| echo "ERROR: This script requires apt-get (Debian/Ubuntu/Kali). Exiting." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
|
||
| echo "==> Updating package lists..." | ||
| sudo apt-get update -q | ||
|
|
||
| echo "==> Installing build dependencies..." | ||
| sudo apt-get install --no-install-recommends -y \ | ||
| git ca-certificates build-essential pkg-config \ | ||
| libreadline-dev gcc-arm-none-eabi libnewlib-dev \ | ||
| libbz2-dev liblz4-dev zlib1g-dev \ | ||
| libbluetooth-dev libpython3-dev libssl-dev libgd-dev | ||
|
|
||
| # Qt6 for GUI support (optional but included by default) | ||
| if apt-cache show qt6-base-dev &>/dev/null 2>&1; then | ||
| sudo apt-get install --no-install-recommends -y qt6-base-dev | ||
| elif apt-cache show qtbase5-dev &>/dev/null 2>&1; then | ||
| echo " Qt6 not available, installing Qt5 fallback..." | ||
| sudo apt-get install --no-install-recommends -y qtbase5-dev | ||
| else | ||
| echo " WARNING: Neither Qt6 nor Qt5 dev packages found. GUI support will be disabled." | ||
| fi | ||
|
|
||
| # --- ModemManager handling --- | ||
| echo "==> Handling ModemManager..." | ||
| # ModemManager probes new serial devices with AT commands and can interfere | ||
| # with the Proxmark3. A udev rule to ignore the PM3 VID is preferred over | ||
| # disabling ModemManager entirely (which would break cellular modems). | ||
| UDEV_MM_RULE='/etc/udev/rules.d/77-mm-proxmark3.rules' | ||
| if [[ ! -f "$UDEV_MM_RULE" ]]; then | ||
| echo 'ATTRS{idVendor}=="9ac4", ENV{ID_MM_DEVICE_IGNORE}="1"' | sudo tee "$UDEV_MM_RULE" > /dev/null | ||
| echo " ModemManager ignore rule written to $UDEV_MM_RULE" | ||
| else | ||
| echo " ModemManager ignore rule already exists." | ||
| fi | ||
|
|
||
| # --- Device permissions --- | ||
| echo "==> Setting device permissions..." | ||
| if [[ -f "$SCRIPT_DIR/Makefile" ]]; then | ||
| # Use the repo's built-in accessrights target if available | ||
| make -C "$SCRIPT_DIR" accessrights 2>/dev/null || true | ||
| fi | ||
|
|
||
| # Ensure user is in dialout and plugdev groups | ||
| for group in dialout plugdev; do | ||
| if getent group "$group" &>/dev/null; then | ||
| if ! id -nG "$USER" | grep -qw "$group"; then | ||
| sudo usermod -aG "$group" "$USER" | ||
| echo " Added $USER to $group group." | ||
| else | ||
| echo " $USER already in $group group." | ||
| fi | ||
| fi | ||
| done | ||
|
|
||
| # --- Reload udev --- | ||
| echo "==> Reloading udev rules..." | ||
| sudo udevadm control --reload-rules && sudo udevadm trigger | ||
|
|
||
| echo "" | ||
| echo "==> Setup complete." | ||
| echo "" | ||
| echo " ACTION REQUIRED: Log out and back in for group membership to take effect." | ||
| echo "" | ||
| echo " Then build with:" | ||
| echo " make clean && make -j\$(nproc)" | ||
| echo "" | ||
| echo " Flash:" | ||
| echo " ./pm3-flash-bootrom" | ||
| echo " ./pm3-flash-fullimage" | ||
| echo "" | ||
| echo " Run client:" | ||
| echo " ./pm3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first, blapost doesn't prohibits binary distributions of his source. Hence the wget was pointing to his own distribution.
second, the aperturelasltd doesn't work since it doesn't exist any longer, Adam Laurie has taken over it.
remove these two changes.