# Raspberry Pi Build Utilities

Utilities for building msger-native on Raspberry Pi (ARM64/aarch64).

## Files

### build-on-pi.sh
Shell script to run on the Raspberry Pi itself to build the native binary.

### build-pi.ps1
PowerShell script to build remotely on Pi via SSH (called from Windows).

### pi-diagnostics.ts
TypeScript diagnostic script to check Pi build environment and dependencies.

### setup-arm64-toolchain.sh
Sets up ARM64 cross-compilation toolchain on WSL for local ARM64 builds.

## Usage

The main builder (`../builder/builder.ts`) handles Pi builds automatically when enabled in `build-config.json`. These utilities are for manual builds or troubleshooting.

### Remote build on Pi (from Windows):
```powershell
.\build-pi.ps1
```

### Direct build on Pi:
```bash
ssh pi4c
cd /home/pi/dev/msger/msger-native
./pibuild/build-on-pi.sh
```

### Setup ARM64 cross-compilation:
```bash
wsl bash pibuild/setup-arm64-toolchain.sh
```

## Output

Pi builds produce: `bin/msgernative-linux-aarch64`
