Compare commits
No commits in common. "d33aafa6776c0ebb6ac8ffe06702c731a7636bdd" and "2963a173c8bac98fe19c8b727d9af9bc687d9fe4" have entirely different histories.
d33aafa677
...
2963a173c8
65
README.md
65
README.md
|
|
@ -1,65 +0,0 @@
|
||||||
# toes-image-builder
|
|
||||||
|
|
||||||
Builds a Raspberry Pi Ubuntu Server image for Toes hardware.
|
|
||||||
|
|
||||||
## What it does
|
|
||||||
|
|
||||||
`build.sh` starts from the Ubuntu 24.04.4 preinstalled ARM64 Raspberry Pi image, mounts it locally, chroots into it, and installs/configures:
|
|
||||||
|
|
||||||
- Toes app and systemd service
|
|
||||||
- Matter service
|
|
||||||
- audio overlay, ALSA config, and audio init service
|
|
||||||
- Wi-Fi via `wpa_supplicant` and `systemd-networkd`
|
|
||||||
- Bluetooth/Avahi support
|
|
||||||
- SSH password login
|
|
||||||
- USB serial gadget login
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
Run on an Ubuntu/Debian host with `sudo` access. On non-ARM64 hosts, the build expects `qemu-aarch64` binfmt support.
|
|
||||||
|
|
||||||
Bootstrap the host once:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
scripts/bootstrap-repo.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./build.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script downloads the base image into `cache/`, writes build artifacts into `build/`, mounts the image under `mnt/`, and cleans up mounts on exit.
|
|
||||||
|
|
||||||
Final image path:
|
|
||||||
|
|
||||||
```text
|
|
||||||
build/toes-ubuntu-base.img
|
|
||||||
```
|
|
||||||
|
|
||||||
## Default image access
|
|
||||||
|
|
||||||
- Hostname: `toes`
|
|
||||||
- User: `toes`
|
|
||||||
- Password: set by `scripts/build-in-chroot.sh`
|
|
||||||
- SSH password auth: enabled
|
|
||||||
- USB serial gadget: enabled on `ttyGS0`
|
|
||||||
|
|
||||||
## Layout
|
|
||||||
|
|
||||||
- `build.sh` - top-level build pipeline
|
|
||||||
- `scripts/` - host-side build phases
|
|
||||||
- `audio/` - audio overlay, ALSA config, and init service
|
|
||||||
- `matter/` - Matter systemd service
|
|
||||||
- `cache/` - downloaded Ubuntu image and checksums
|
|
||||||
- `build/` - generated image files
|
|
||||||
- `mnt/` - temporary mount points
|
|
||||||
|
|
||||||
## Cleanup
|
|
||||||
|
|
||||||
If a build is interrupted and mounts are left behind, run:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
scripts/cleanup.sh
|
|
||||||
```
|
|
||||||
|
|
@ -4,26 +4,18 @@ set -ex
|
||||||
# bootstrap _this_ repo (toes-image-builder), not the image itself.
|
# bootstrap _this_ repo (toes-image-builder), not the image itself.
|
||||||
# should only have to do this once per host we run this on.
|
# should only have to do this once per host we run this on.
|
||||||
|
|
||||||
packages=(
|
|
||||||
kpartx
|
|
||||||
parted
|
|
||||||
fdisk
|
|
||||||
dosfstools
|
|
||||||
e2fsprogs
|
|
||||||
xz-utils
|
|
||||||
rsync
|
|
||||||
curl
|
|
||||||
ca-certificates
|
|
||||||
)
|
|
||||||
|
|
||||||
case "$(uname -m)" in
|
|
||||||
aarch64|arm64)
|
|
||||||
echo "native arm64 host detected; skipping qemu user emulation packages"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
packages=(qemu-user-static binfmt-support "${packages[@]}")
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y "${packages[@]}"
|
sudo apt-get install -y \
|
||||||
|
qemu-user-static \
|
||||||
|
binfmt-support \
|
||||||
|
qemu-system-arm \
|
||||||
|
qemu-utils \
|
||||||
|
kpartx \
|
||||||
|
parted \
|
||||||
|
fdisk \
|
||||||
|
dosfstools \
|
||||||
|
e2fsprogs \
|
||||||
|
xz-utils \
|
||||||
|
rsync \
|
||||||
|
curl \
|
||||||
|
ca-certificates
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# runs setup commands inside the arm64 image rootfs.
|
# runs setup commands inside the image, under qemu arm64.
|
||||||
|
|
||||||
sudo tee mnt/root/tmp/image-build.sh >/dev/null <<'EOF'
|
sudo tee mnt/root/tmp/image-build.sh >/dev/null <<'EOF'
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user