Skip to content

open-horizon-services/utility-raspberry-pi-image-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPI Burner

Version Platform Python

A macOS CLI tool for creating custom Raspberry Pi SD card images with Cloud Init support. Detects removable disks, burns .img files, and injects cloud-config — all from the terminal.

Prerequisites

  • macOS (uses diskutil and dd)
  • Python 3.10+
  • An SD card reader with a card inserted

Quick Start

git clone https://github.com/open-horizon-services/utility-raspberry-pi-image-builder.git
cd utility-raspberry-pi-image-builder
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"

List available disks, then burn:

rpi-burner list
sudo rpi-burner burn image.img -d /dev/disk4 --cloud-init config.yaml

Requires sudo — disk write operations need root access.

Usage

rpi-burner list                                    # List removable disks
rpi-burner burn <image> [options]                   # Burn image to disk

Options

Flag Description
-d, --disk PATH Target disk device path (e.g., /dev/disk4). Prompts interactively if omitted.
--cloud-init PATH Cloud-init config file (YAML) to inject onto boot partition.
--confirm Skip the confirmation prompt (use with caution).
--no-eject Don't eject the disk after writing.

Cloud Init

Provide a YAML cloud-config file to configure the Pi on first boot. The file is written to the FAT32 boot partition as user-data.

#cloud-config
hostname: rpi-hostname
users:
  - name: pi
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-rsa AAAAB3... your-key
runcmd:
  - echo "Ready" > /home/pi/booted.txt

See samples/ for more examples: Wi-Fi, static IP, SSH keys.

License

Apache 2.0

About

A cross-platform tool for creating custom Raspberry Pi SD card images with embedded Open Horizon edge computing components. Build images on Linux or macOS that boot ready for edge workload deployment.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages