Skip to content

Commit d1873b7

Browse files
committed
feat: Add Raspberry Pi 5 deployment support
Add platform/debian directory with deployment documentation, systemd service, and cross-compilation build script. Configure ARM64 cross-compilation toolchain and restructure Cargo features. Update network bindings to 0.0.0.0 for remote access and enhance SDR device detection with detailed troubleshooting messages.
1 parent 888ee96 commit d1873b7

File tree

13 files changed

+1054
-17
lines changed

13 files changed

+1054
-17
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ rustflags = [
77
"-C", "target-cpu=native"
88
]
99

10+
# Cross-compilation target for Raspberry Pi 5 (ARM64)
11+
[target.aarch64-unknown-linux-gnu]
12+
# Native cross-compilation using Homebrew toolchain
13+
linker = "aarch64-unknown-linux-gnu-gcc"
14+
1015

CLAUDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,60 @@ cargo run --release -- --file samples.cf32
142142

143143
Input files should be Complex32 format at any sample rate ≥ 2 MHz.
144144

145+
## Cross-Compilation for Raspberry Pi 5
146+
147+
AirJedi can be cross-compiled for ARM64 targets like Raspberry Pi 5 running DietPi or Raspberry Pi OS using the native macOS toolchain.
148+
149+
### Quick Build Script
150+
151+
The easiest way to cross-compile:
152+
```bash
153+
./platform/debian/build-rpi5.sh
154+
```
155+
156+
This script handles all the setup and builds the ARM64 binary automatically.
157+
158+
### Manual Cross-Compilation
159+
160+
```bash
161+
# One-time setup (install native ARM64 cross-compiler)
162+
brew tap messense/macos-cross-toolchains
163+
brew install aarch64-unknown-linux-gnu
164+
rustup target add aarch64-unknown-linux-gnu
165+
166+
# Build for ARM64 using native toolchain (fast, no Docker required)
167+
cargo build --release --target aarch64-unknown-linux-gnu --no-default-features
168+
```
169+
170+
**Note**: The `--no-default-features` flag is required because SoapySDR cannot be cross-compiled easily. The resulting binary will need SDR drivers installed on the target Raspberry Pi.
171+
172+
**Benefits of Native Toolchain:**
173+
- ✅ Much faster builds (~35 seconds vs 2+ minutes)
174+
- ✅ No Docker/Colima overhead
175+
- ✅ Simpler setup
176+
- ✅ Direct control over compiler flags
177+
178+
### Deployment
179+
180+
See `platform/debian/DEPLOY_RPI5.md` for complete deployment instructions including:
181+
- Transferring binaries and files to Raspberry Pi
182+
- Installing runtime dependencies
183+
- Setting up systemd service
184+
- Performance optimization tips
185+
- Troubleshooting common issues
186+
187+
### Building with SDR Support on Raspberry Pi
188+
189+
For full SDR functionality, build natively on the Raspberry Pi:
190+
191+
```bash
192+
# On the Raspberry Pi
193+
sudo apt-get install -y build-essential pkg-config soapysdr-tools libsoapysdr-dev
194+
cargo build --release
195+
```
196+
197+
This approach provides full SoapySDR integration and better hardware compatibility.
198+
145199
## Output Formats
146200

147201
AirJedi supports multiple output formats for compatibility with various ADS-B tools and applications:

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ name = "airjedi"
1616
path = "src/bin/airjedi.rs"
1717

1818
[features]
19-
default = ["soapy"]
20-
aaronia_http = ["futuresdr/aaronia_http"]
21-
rtlsdr = ["futuresdr/rtlsdr"]
22-
soapy = ["futuresdr/soapy"]
19+
default = ["rtlsdr"]
20+
aaronia_http = ["futuresdr/aaronia_http", "futuresdr/seify"]
21+
rtlsdr = ["futuresdr/rtlsdr", "futuresdr/seify"]
22+
soapy = ["futuresdr/soapy", "futuresdr/seify"]
2323

2424
[dependencies]
2525
adsb_deku = "0.7"
2626
anyhow = "1.0"
2727
async-trait = "0.1"
2828
chrono = "0.4"
2929
clap = { version = "4", features = ["derive"] }
30-
futuresdr = { version = "0.0.38", features = ["seify"] }
30+
futuresdr = { version = "0.0.38", default-features = false }
3131
serde = { version = "1", features = ["derive"] }
3232
serde_json = "1"
3333
serde_with = "3"

0 commit comments

Comments
 (0)