Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions rpi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Raspberry Pi Image

This directory contains the files required to build a coatrack raspberry pi image.

The `rpi-gen-config` directory contains the configuration that can be merged with the pi-gen directory structure to build the raspberry pi image.

The `build.sh` script does the following:

- start an arm64 debian image
- install dependencies for [pi-gen](https://github.com/RPI-Distro/pi-gen.git)
- use the build configuration to produce an image in the `build` directory
11 changes: 11 additions & 0 deletions rpi/build-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apt-get update
apt-get install -y coreutils quilt parted qemu-user-static debootstrap zerofree zip \
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
gpg pigz xxd arch-test kmod

mkdir -p /build/rpi
cd /build/rpi
git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git --depth 1
cp -r /src/rpi-gen-config/* /build/rpi/pi-gen/
cd /build/rpi/pi-gen
./build.sh
1 change: 1 addition & 0 deletions rpi/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run --privileged -v .:/src -v ./build:/out arm64v8/debian /bin/bash -c /src/build-image.sh
7 changes: 7 additions & 0 deletions rpi/rpi-gen-config/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IMG_NAME="coatrack-$RELEASE-$ARCH"
PI_GEN_RELEASE="we should set this"
RELEASE="bookworm" # debian 12
USE_QEMU=1
TARGET_HOSTNAME="coatrack"
FIRST_USER_NAME="user"
DEPLOY_DIR=/out
Empty file added rpi/rpi-gen-config/stage3/SKIP
Empty file.
Empty file added rpi/rpi-gen-config/stage4/SKIP
Empty file.
Empty file.
Empty file added rpi/rpi-gen-config/stage5/SKIP
Empty file.
Empty file.