🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.1 KiB
3.1 KiB
Quick Build Reference
TL;DR for building your Dangerous Pi image.
Prerequisites
# 1. Install Docker
brew install docker # macOS
# OR
sudo apt-get install docker.io # Linux
# 2. Clone pi-gen
git clone https://github.com/RPi-Distro/pi-gen.git
cd pi-gen
git checkout arm64
Build Commands
First Time (Full Build)
# Copy your stage to pi-gen
cp -r /path/to/dangerous-pi/pi-gen/stageDTPM3 /path/to/pi-gen/
cp /path/to/dangerous-pi/pi-gen/config /path/to/pi-gen/config
# Build
cd /path/to/pi-gen
sudo ./build.sh
# OR with Docker (recommended)
./docker-build.sh
⏱️ Time: 1-2 hours
📦 Output: deploy/image_2025-11-26-Proxmark3.img
Quick Iteration (After Code Changes)
cd /path/to/pi-gen
# Copy updated code
cp -r /path/to/dangerous-pi/pi-gen/stageDTPM3 .
# Rebuild only your stage
CONTINUE=1 STAGE=stageDTPM3 sudo ./build.sh
⏱️ Time: 5-10 minutes 💡 Use: Testing Dangerous Pi changes only
Flash & Test
Flash Image
# Using Balena Etcher (easiest)
# https://etcher.balena.io/
# OR using dd
sudo dd if=deploy/image.img of=/dev/sdX bs=4M status=progress
Connect & Test
- Boot Pi with SD card
- Connect to WiFi:
- SSID:
raspi-webgui - Password:
ChangeMe
- SSID:
- Run tests:
./test-image.sh 10.3.141.1
Verify Manually
# SSH
ssh dt@10.3.141.1 # password: proxmark3
# Check service
sudo systemctl status dangerous-pi.service
# Test API
curl http://10.3.141.1:8000/api/health
What Was Built
Your image includes:
- ✅ Stage 01: Proxmark3 firmware & client
- ✅ Stage 02: RaspAP (WiFi access point)
- ✅ Stage 03: ttyd (web terminal)
- ✅ Stage 04: Dangerous Pi backend at
/opt/dangerous-pi
Key Config Values
From pi-gen/config:
IMG_NAME="Proxmark3"
TARGET_HOSTNAME="Proxmark3"
FIRST_USER_NAME="dt"
FIRST_USER_PASS="proxmark3"
Troubleshooting
Build fails?
# Check disk space
df -h # Need 20GB+
# Clean and retry
sudo rm -rf work/ deploy/
sudo ./build.sh
Service not starting?
# Check logs
ssh dt@10.3.141.1
sudo journalctl -u dangerous-pi.service -n 50
# Common issue: Port conflict with ttyd
# See PORT_CONFLICT.md
Image too large? Already optimized! Your scripts include:
- Package cache cleanup
- Pip cache removal
- Auto-remove unused packages
Files Created
- 📄 BUILD_GUIDE.md - Complete build guide
- 🚀 build-image.sh - Build helper script
- ✅ test-image.sh - Automated testing
- 📖 This file - Quick reference
Recommended Workflow
- Initial setup: Full build with
./build.sh - Development: Make code changes
- Quick rebuild:
CONTINUE=1 STAGE=stageDTPM3 ./build.sh - Flash: Use Balena Etcher
- Test: Run
./test-image.sh - Iterate: Repeat steps 2-5
Full Documentation
See BUILD_GUIDE.md for:
- Detailed configuration options
- Advanced customization
- Stage architecture
- Optimization tips
- Complete troubleshooting guide
Quick Start: ./docker-build.sh → Flash → Test 🎉