gosd

module
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: MIT

README

GoSD

Turn a Go application into a flashable SD-card image for the Raspberry Pi Zero 2W, Raspberry Pi Zero W, Raspberry Pi 3B (and 3B+), Radxa Zero 3E, FriendlyElec NanoPi Zero2, Radxa ROCK 4SE, and Radxa Cubie A5E. COMPATIBILITY.md is the board × feature matrix: what works where, and how each cell was verified.

Like gokrazy, but the result is something anyone can burn and use: images plug into Raspberry Pi Imager's WiFi/hostname wizard, so the people you send them to never need a terminal.

Features

  • One CLI, runnable locally or in CI — building an image needs no Docker, no root, and no Linux
  • Boots to your app in about 10 seconds, and to a wired hostname.local in about the same — over WiFi expect ~25s, because association, DHCP and mDNS all happen after your app is already up
  • Runs any normal Linux-capable Go program — no SDK, no special imports
  • Networking via Ethernet (DHCP) or WiFi (credentials written as the SD card is flashed)
  • Optional USB gadget mode — the board presents as a USB serial or mass-storage device: see docs/runtime.md and examples/usbserial

Quickstart

See the project's GitHub releases for what's shipped; per-board verification status lives in COMPATIBILITY.md.

  1. Install the CLI:

    go install github.com/jphastings/gosd/cmd/gosd@latest
    

    Or, with nix — handy in CI, since the flake bundles the Go toolchain and a vendored copy of gosd's own sources, so gosd build works offline apart from your app's dependencies and board artifacts:

    nix run github:jphastings/gosd -- build ./cmd/myapp
    
  2. Write a main.go. GoSD runs any normal Go program — no special imports or SDK required:

    package main
    
    import (
        "fmt"
        "net/http"
    )
    
    func main() {
        http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
            fmt.Fprintln(w, "hello from gosd")
        })
        http.ListenAndServe(":80", nil)
    }
    

    See examples/hello for a slightly fuller worked example (it also reports hostname and uptime, and falls back to :8080 if :80 is unavailable).

    Calling an HTTPS API from your app? Every image ships the Mozilla CA bundle at the standard system path, so it just works — see docs/runtime.md.

    Need different source on a device, or per board (different pins, an optional peripheral)? gosd build passes your app's compile a gosd build tag plus each selected board's own — see gating app source with build tags.

  3. Build an image for your board:

    gosd build . --board pi-zero-2w -o hello.img
    

    Omit --board to build every supported board at once; gosd build --help lists the full flag set (--boot-config-dir, -o/--output, repeatable --with-external — see docs/runtime.md). Every flag can also live in a checked-in gosd-build.toml, so a bare gosd build in a fresh checkout reproduces your repo's canonical image — see checked-in build options.

    No board on hand yet? gosd run . cross-compiles your app, builds an image, and boots it under qemu-system-aarch64 in one step, so you can watch the real boot sequence and hit your app's HTTP port locally before ever touching hardware — see docs/runtime.md.

  4. Flash hello.img to an SD card and boot it. The recommended path is Raspberry Pi Imager's custom repository: build with --publish-catalog --publish-base-url=<url>, host the emitted os_list.json next to your image, and paste that URL into Imager's Settings → Custom repository — flashers get the full WiFi/hostname wizard. docs/publishing.md is the developer walkthrough; docs/flashing.md is a screenshot-driven, jargon-free version of the end-user steps you can send to non-technical people directly.

    (Imager's plain "Use custom image" file picker skips that wizard for every image, GoSD's included — see docs/provisioning-formats.md. If you flash that way, hand-edit the config tree on the flashed boot partition instead.)

    Then open http://<hostname>.local/ — the hostname defaults to your main package's sanitized name. gosd-init runs its own mDNS responder, so .local resolves on macOS, Linux, and Windows with no extra setup; if your network blocks mDNS, find the device's address via your router.

Going further

  • Caching — downloaded board artifacts, the CA bundle, and any --ingress binary are cached under your OS user cache dir (e.g. ~/Library/Caches/gosd on macOS, ~/.cache/gosd on Linux) so repeat builds work offline; a successful build automatically prunes anything left over from an older gosd version or pin, so the cache holds only the current version's assets instead of growing forever. gosd cache dir/size/clean inspect or manually clear these (and, with --builds, the separate build-kernel/build-external cache): docs/artifacts.md
  • The runtime contract your app runs under once booted — supervision, environment variables, networking timing, storage, logging, and what survives an upgrade: docs/runtime.md
  • Crash reports on the card — an unattended device with no screen and no console still has to tell someone what went wrong. On a fatal error it writes LAST_FATAL_ERROR.md to the root of its boot partition, readable on any computer and safe to forward: your app's own environment values are scrubbed out of it. The fault package lets your app raise one for a problem only a person can fix — and prints exactly the same report to your terminal when you run it off a device, so you can read what your user would read without flashing a card: when to raise one, and what it says
  • A status LED shows boot state at a glance — the LED marked ACT, the activity/status LED, the green LED, or whichever LED your board has, flashes evenly while booting, blips once a second while your app runs, and goes solid on for a recorded fatal error. No code changes, no config: which LED gets used and why
  • The device's config tree — the hand-editable settings on every card, one plain-text file per setting: docs/config.md
  • Checked-in build options (gosd-build.toml) — record the options your app's image needs (boards, partition sizes, an ingress tunnel, placeholder files) in a file next to your code: every key is a gosd build flag of the same name, a bare gosd build reproduces the repo's canonical image, and a flag on the command line still wins per option (gosd init writes a starter one for you, prefilled with what it can auto-detect): checked-in build options
  • Custom kernels (gosd build-kernel) — need a driver GoSD's stock, trimmed kernels cut (a USB DVB-T tuner, a niche sensor)? An opt-in, Docker/Podman-driven command compiles one from a gosd-kernel.toml in your project; the default build path stays zero-Docker for everyone else: docs/custom-kernels.md
  • Sound — one of those cut drivers. With a custom kernel, the sound package plays PCM out of HDMI or a board's headphone jack, no cgo and no alsa-lib. Per-board recipes and the traps: docs/sound.md; examples/chime is the worked example.
  • Companion binaries (gosd build-external) — need something that isn't pure Go (a hardware-accelerated video player, a vendor CLI)? The same kind of opt-in, Docker/Podman-driven command cross-compiles a fully static binary from a gosd-external.toml recipe, and gosd build --with-external bundles it into the image: docs/externals.md
  • Injecting per-user config after the image is built (gosd build --placeholder <path>=<size>) — distributing a per-deployment secret or identity (an API key, a device's WiFi credentials) without building a different image per recipient? Reserve a placeholder file at build time and a downstream tool (typically a browser, between the CDN and the user's disk) can splice real content into the declared byte ranges with no FAT32 code at all: docs/image-injection.md. The official @jphastings/gosd npm package does this end to end in one call — import { withPlaceholders } from "@jphastings/gosd/downloads" — see js/packages/gosd/README.md

Directories

Path Synopsis
build
boards/cubie-a5e/kernel
Package kernelassets embeds the Cubie A5E's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the Cubie A5E's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
boards/nanopi-zero2/kernel
Package kernelassets embeds the NanoPi Zero2's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the NanoPi Zero2's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
boards/pi-3b
Package manifest embeds pi-3b's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pi3b can consume it without a runtime file read.
Package manifest embeds pi-3b's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pi3b can consume it without a runtime file read.
boards/pi-cm4
Package manifest embeds pi-cm4's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/picm4 can consume it without a runtime file read.
Package manifest embeds pi-cm4's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/picm4 can consume it without a runtime file read.
boards/pi-zero-2w
Package manifest embeds pi-zero-2w's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pizero2w can consume it without a runtime file read.
Package manifest embeds pi-zero-2w's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pizero2w can consume it without a runtime file read.
boards/pi-zero-w
Package manifest embeds pi-zero-w's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pizerow can consume it without a runtime file read.
Package manifest embeds pi-zero-w's pinned third-party artifact manifest (manifest.json, in this same directory) so the board profile in internal/boards/pizerow can consume it without a runtime file read.
boards/qemu-virt/kernel
Package kernelassets embeds the qemu-virt board's GoSD Kconfig fragment so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the qemu-virt board's GoSD Kconfig fragment so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
boards/radxa-zero-3e/kernel
Package kernelassets embeds the Radxa Zero 3E's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the Radxa Zero 3E's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
boards/rock-4se/kernel
Package kernelassets embeds the Radxa ROCK 4SE's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (mirrors radxa-zero-3e, bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the Radxa ROCK 4SE's GoSD Kconfig fragment and device-tree patches so internal/kernelspec's Go-native KernelSpec (mirrors radxa-zero-3e, bean gosd-di6v) can be the single source of truth for kernel build inputs.
boards/turing-rk1/kernel
Package kernelassets embeds the Turing RK1's GoSD Kconfig fragment so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
Package kernelassets embeds the Turing RK1's GoSD Kconfig fragment so internal/kernelspec's Go-native KernelSpec (bean gosd-di6v) can be the single source of truth for kernel build inputs.
cmd
gosd command
Command gosd cross-compiles a Go application and assembles it into a bootable SD-card image for a supported board.
Command gosd cross-compiles a Go application and assembles it into a bootable SD-card image for a supported board.
gosd-init command
Command gosd-init is PID 1 on a gosd image: a static Go binary that runs as /init from the initramfs, brings up the board, and supervises the user's application for the life of the device.
Command gosd-init is PID 1 on a gosd image: a static Go binary that runs as /init from the initramfs, brings up the board, and supervises the user's application for the life of the device.
gosd-init/internal/boot
Package boot implements the gosd-init boot sequence: early mounts, console logging, the boot partition mount retry, and /app supervision with restart backoff and zombie reaping.
Package boot implements the gosd-init boot sequence: early mounts, console logging, the boot partition mount retry, and /app supervision with restart backoff and zombie reaping.
gosd-init/internal/cardconfig
Package cardconfig reads — and writes back — the config/ tree a gosd image carries at the root of its boot partition: one setting per file, read newline-trimmed, an empty file meaning "not set".
Package cardconfig reads — and writes back — the config/ tree a gosd image carries at the root of its boot partition: one setting per file, read newline-trimmed, an empty file meaning "not set".
gosd-init/internal/childbackoff
Package childbackoff implements the exponential-backoff-with-cap restart delay shared by the gosd-init modules that supervise a single auxiliary child process — extracted from cmd/gosd-init/internal/cloudflared/backoff.go (bean gosd-wxjy) so a second gosd-init-supervised agent (epic gosd-65uy) can reuse the exact same doubling/capping engine instead of duplicating it.
Package childbackoff implements the exponential-backoff-with-cap restart delay shared by the gosd-init modules that supervise a single auxiliary child process — extracted from cmd/gosd-init/internal/cloudflared/backoff.go (bean gosd-wxjy) so a second gosd-init-supervised agent (epic gosd-65uy) can reuse the exact same doubling/capping engine instead of duplicating it.
gosd-init/internal/cloudflared
Package cloudflared implements gosd-init's supervision of a baked-in cloudflared binary, exposing the HTTP service a device's card declares to the public internet over a Cloudflare Tunnel with zero app code (see epic gosd-virc).
Package cloudflared implements gosd-init's supervision of a baked-in cloudflared binary, exposing the HTTP service a device's card declares to the public internet over a Cloudflare Tunnel with zero app code (see epic gosd-virc).
gosd-init/internal/configstore
Package configstore keeps a copy of a device's own settings on the data partition, so that overwriting the boot partition doesn't cost somebody the values they typed onto their card.
Package configstore keeps a copy of a device's own settings on the data partition, so that overwriting the boot partition doesn't cost somebody the values they typed onto their card.
gosd-init/internal/consoletail
Package consoletail implements a bounded byte buffer that retains only the last N bytes written to it, for gosd-init to keep a copy of a supervised app's console output so a crash report can carry it (bean gosd-s9uq, epic gosd-47z3).
Package consoletail implements a bounded byte buffer that retains only the last N bytes written to it, for gosd-init to keep a copy of a supervised app's console output so a crash report can carry it (bean gosd-s9uq, epic gosd-47z3).
gosd-init/internal/dataexpand
Package dataexpand does two related jobs on the data partition — labelled per app at build time (Options.DataLabel, from config.json's dataLabel; see initcfg.Config.DataLabel) — gated on config.json's baked dataFilesystem/dataExpand choices (see initcfg.Config) and always run before the normal data-partition mount:
Package dataexpand does two related jobs on the data partition — labelled per app at build time (Options.DataLabel, from config.json's dataLabel; see initcfg.Config.DataLabel) — gated on config.json's baked dataFilesystem/dataExpand choices (see initcfg.Config) and always run before the normal data-partition mount:
gosd-init/internal/durable
Package durable holds the one file-write gosd-init uses whenever a write has to survive the power being cut immediately afterwards: the boot counter on the data partition, a value written into the card's config tree, a crash-report cleanup.
Package durable holds the one file-write gosd-init uses whenever a write has to survive the power being cut immediately afterwards: the boot counter on the data partition, a value written into the card's config tree, a crash-report cleanup.
gosd-init/internal/logwriter
Package logwriter implements a line-splitting, prefixed log writer: buffers everything written to it, splits it on '\n', and logs each complete line through an injected log func with a fixed prefix.
Package logwriter implements a line-splitting, prefixed log writer: buffers everything written to it, splits it on '\n', and logs each complete line through an injected log func with a fixed prefix.
gosd-init/internal/mdnsresponder
Package mdnsresponder implements the gosd-init mDNS responder: answering A/AAAA queries for <hostname>.local on every currently-up network interface, using the locked github.com/pion/mdns/v2 dependency (see gosd-r796).
Package mdnsresponder implements the gosd-init mDNS responder: answering A/AAAA queries for <hostname>.local on every currently-up network interface, using the locked github.com/pion/mdns/v2 dependency (see gosd-r796).
gosd-init/internal/netup
Package netup brings up wired networking after /app has already been launched: link up, DHCPv4 discovery with retry/backoff, lease renewal, DNS, and reaction to link flaps (cable unplug/replug).
Package netup brings up wired networking after /app has already been launched: link up, DHCPv4 discovery with retry/backoff, lease renewal, DNS, and reaction to link flaps (cable unplug/replug).
gosd-init/internal/restartsignal
Package restartsignal implements a coalescing "restart your child now" notifier, shared by the gosd-init modules that supervise a single externally-launched child process (cloudflared, tsfunnel) and need to be told to restart it from elsewhere in gosd-init — the runtime-WiFi-join epic's ingress reconnect (gosd-ojbm decision 4) is the first producer.
Package restartsignal implements a coalescing "restart your child now" notifier, shared by the gosd-init modules that supervise a single externally-launched child process (cloudflared, tsfunnel) and need to be told to restart it from elsewhere in gosd-init — the runtime-WiFi-join epic's ingress reconnect (gosd-ojbm decision 4) is the first producer.
gosd-init/internal/statusled
Package statusled discovers a board's onboard status LED through sysfs and drives it through the kernel's own "timer" trigger — never a goroutine — so the blink survives the very failures it's reporting on: a fault.Fatal halt, or gosd-init itself wedging mid-boot.
Package statusled discovers a board's onboard status LED through sysfs and drives it through the kernel's own "timer" trigger — never a goroutine — so the blink survives the very failures it's reporting on: a fault.Fatal halt, or gosd-init itself wedging mid-boot.
gosd-init/internal/timesync
Package timesync implements SNTP time synchronization for gosd-init.
Package timesync implements SNTP time synchronization for gosd-init.
gosd-init/internal/tsfunnel
Package tsfunnel implements gosd-init's supervision of a baked-in gosd-tsfunnel shim binary (cmd/gosd-tsfunnel, see epic gosd-65uy), exposing the HTTP service a device's card declares to the public internet over Tailscale Funnel with zero app code.
Package tsfunnel implements gosd-init's supervision of a baked-in gosd-tsfunnel shim binary (cmd/gosd-tsfunnel, see epic gosd-65uy), exposing the HTTP service a device's card declares to the public internet over Tailscale Funnel with zero app code.
gosd-init/internal/wifiup
Package wifiup brings up WiFi networking after /app has already been launched: waiting for the wlan interface to appear (firmware for brcmfmac and similar chipsets loads at driver probe, which can take seconds), associating with an open or WPA2-PSK network via nl80211 (no wpa_supplicant — brcmfmac's firmware SME handles the 4-way handshake once given the PMK), reconnecting on deauth/disconnect, and handing the interface to netup.RunDHCP once associated.
Package wifiup brings up WiFi networking after /app has already been launched: waiting for the wlan interface to appear (firmware for brcmfmac and similar chipsets loads at driver probe, which can take seconds), associating with an open or WPA2-PSK network via nl80211 (no wpa_supplicant — brcmfmac's firmware SME handles the 4-way handshake once given the PMK), reconnecting on deauth/disconnect, and handing the interface to netup.RunDHCP once associated.
gosd-tsfunnel command
Command gosd-tsfunnel exposes a local app on the public internet via Tailscale Funnel, using tsnet's pure-Go userspace netstack: no /dev/net/tun, no root, no iptables (epic gosd-65uy, decision 1).
Command gosd-tsfunnel exposes a local app on the public internet via Tailscale Funnel, using tsnet's pure-Go userspace netstack: no /dev/net/tun, no root, no iptables (epic gosd-65uy, decision 1).
Package disk lets a GoSD app use an attached mass-storage disk — an NVMe SSD in an M.2 slot, a USB drive, an SD card in a reader — formatting it on first use and mounting it on every subsequent boot.
Package disk lets a GoSD app use an attached mass-storage disk — an NVMe SSD in an M.2 slot, a USB drive, an SD card in a reader — formatting it on first use and mounting it on every subsequent boot.
Package emmc lets a GoSD app use the onboard eMMC storage on boards that have it (the Rockchip boards — Radxa Zero 3E, NanoPi Zero2, ROCK 4SE), formatting it on first use and mounting it on every subsequent boot.
Package emmc lets a GoSD app use the onboard eMMC storage on boards that have it (the Rockchip boards — Radxa Zero 3E, NanoPi Zero2, ROCK 4SE), formatting it on first use and mounting it on every subsequent boot.
examples
chime command
Command chime plays a boot chime and then a periodic test tone out of a GoSD board's audio output — HDMI where the board has it, the analog jack where it has one — using the gosd sound package, which talks the kernel's ALSA PCM interface directly.
Command chime plays a boot chime and then a periodic test tone out of a GoSD board's audio output — HDMI where the board has it, the analog jack where it has one — using the gosd sound package, which talks the kernel's ALSA PCM interface directly.
diskstorage command
Command diskstorage exercises the public disk package's default filesystem: disk.FormatAndMountWith's zero-value Options formats ext4 (see disk.Options' docs, epic gosd-lfu0), not FAT32 — proving the DEFAULT, not an explicit disk.EXT4 token.
Command diskstorage exercises the public disk package's default filesystem: disk.FormatAndMountWith's zero-value Options formats ext4 (see disk.Options' docs, epic gosd-lfu0), not FAT32 — proving the DEFAULT, not an explicit disk.EXT4 token.
emmcstorage command
Command emmcstorage is a minimal example demonstrating the emmc package: on a board with onboard eMMC (Radxa Zero 3E, NanoPi Zero2), it formats the eMMC on first boot and mounts it read-write at /storage on every boot after that, then writes a small file there and reads it back to demonstrate persistence.
Command emmcstorage is a minimal example demonstrating the emmc package: on a board with onboard eMMC (Radxa Zero 3E, NanoPi Zero2), it formats the eMMC on first boot and mounts it read-write at /storage on every boot after that, then writes a small file there and reads it back to demonstrate persistence.
gpioinfo command
Command gpioinfo is a minimal example demonstrating GPIO access on GoSD: by default it opens every /dev/gpiochipN character device present and prints a gpioinfo(1)-style dump of each chip's name, label, line count, and per-line name/consumer/direction — entirely read-only, so it's safe to run on any board regardless of what's wired to its header.
Command gpioinfo is a minimal example demonstrating GPIO access on GoSD: by default it opens every /dev/gpiochipN character device present and prints a gpioinfo(1)-style dump of each chip's name, label, line count, and per-line name/consumer/direction — entirely read-only, so it's safe to run on any board regardless of what's wired to its header.
hello command
Command hello is a minimal example app used to exercise the gosd build pipeline end to end and to validate hardware bring-up.
Command hello is a minimal example app used to exercise the gosd build pipeline end to end and to validate hardware bring-up.
i2cscan command
Command i2cscan is a minimal example demonstrating raw I2C access on GoSD: it opens every /dev/i2c-* character device present, politely probes each 7-bit address for a responding device, and additionally checks the two addresses (0x76/0x77) a common BME280/BMP280-family pressure/humidity breakout board answers on, reporting its chip-ID register if one's found.
Command i2cscan is a minimal example demonstrating raw I2C access on GoSD: it opens every /dev/i2c-* character device present, politely probes each 7-bit address for a responding device, and additionally checks the two addresses (0x76/0x77) a common BME280/BMP280-family pressure/humidity breakout board answers on, reporting its chip-ID register if one's found.
sattrack command
Command sattrack is a GoSD example that turns a board with an HDMI display into a live satellite tracker: a fullscreen NASA Blue Marble world map with the chosen satellite's current position, its ground track over the past 45 minutes (solid, fading out at the oldest tip) and the coming 45 minutes (dashed), and its name, updated once per second with partial redraws over DRM/KMS dumb buffers.
Command sattrack is a GoSD example that turns a board with an HDMI display into a live satellite tracker: a fullscreen NASA Blue Marble world map with the chosen satellite's current position, its ground track over the past 45 minutes (solid, fading out at the oldest tip) and the coming 45 minutes (dashed), and its name, updated once per second with partial redraws over DRM/KMS dumb buffers.
spiloopback command
Command spiloopback is a minimal example demonstrating raw SPI access on GoSD: it opens every /dev/spidev* character device present and performs a full-duplex SPI_IOC_MESSAGE transfer of a fixed test pattern, reporting whether the bytes it reads back match the bytes it sent.
Command spiloopback is a minimal example demonstrating raw SPI access on GoSD: it opens every /dev/spidev* character device present and performs a full-duplex SPI_IOC_MESSAGE transfer of a fixed test pattern, reporting whether the bytes it reads back match the bytes it sent.
usbserial command
Command usbserial is a minimal example app used to exercise GoSD's USB gadget mode end to end: it presents the board as a USB CDC-ACM serial device and echoes back every line it receives over /dev/ttyGS0.
Command usbserial is a minimal example app used to exercise GoSD's USB gadget mode end to end: it presents the board as a USB CDC-ACM serial device and echoes back every line it receives over /dev/ttyGS0.
usbwebsite command
Command usbwebsite turns a GoSD board into a tiny self-contained website appliance that you edit by USB.
Command usbwebsite turns a GoSD board into a tiny self-contained website appliance that you edit by USB.
Package fault lets a GoSD app declare a fatal error in terms its user can act on, and have the device write that explanation onto its own SD card.
Package fault lets a GoSD app declare a fatal error in terms its user can act on, and have the device write that explanation onto its own SD card.
Package gadget presents a GoSD board as a USB peripheral (a "gadget") via Linux's configfs USB gadget API — no cgo, no exec, just directory creation, attribute-file writes, and symlinks under /sys/kernel/config/usb_gadget.
Package gadget presents a GoSD board as a USB peripheral (a "gadget") via Linux's configfs USB gadget API — no cgo, no exec, just directory creation, attribute-file writes, and symlinks under /sys/kernel/config/usb_gadget.
internal
artifacts
Package artifacts downloads and caches the CI-built board artifacts (kernels, device trees, bootloaders) GoSD compiles itself and publishes as GitHub Releases tagged artifacts/vX.Y.Z (see .github/workflows/build- artifacts.yml and bean gosd-wtpa).
Package artifacts downloads and caches the CI-built board artifacts (kernels, device trees, bootloaders) GoSD compiles itself and publishes as GitHub Releases tagged artifacts/vX.Y.Z (see .github/workflows/build- artifacts.yml and bean gosd-wtpa).
blockmount
Package blockmount is the shared machinery behind the public emmc and disk packages: deciding, from what a block device already holds, whether to mount it as-is, format it, or refuse to touch it — and then doing so.
Package blockmount is the shared machinery behind the public emmc and disk packages: deciding, from what a block device already holds, whether to mount it as-is, format it, or refuse to touch it — and then doing so.
boards
Package boards is the registry of SD-card targets gosd knows how to build for, and the Board abstraction each target implements.
Package boards is the registry of SD-card targets gosd knows how to build for, and the Board abstraction each target implements.
boards/cubiea5e
Package cubiea5e implements internal/boards.Board for the Radxa Cubie A5E (Allwinner A527, sun55iw3 die): a single raw bootloader write (u-boot-sunxi-with-spl.bin) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
Package cubiea5e implements internal/boards.Board for the Radxa Cubie A5E (Allwinner A527, sun55iw3 die): a single raw bootloader write (u-boot-sunxi-with-spl.bin) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
boards/cubiea5e/templates
Package templates holds the Radxa Cubie A5E's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
Package templates holds the Radxa Cubie A5E's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
boards/nanopizero2
Package nanopizero2 implements internal/boards.Board for the FriendlyElec NanoPi Zero2 (Rockchip RK3528A): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition — the same boot chain as the Radxa Zero 3E (see internal/boards/radxazero3e), since both are Rockchip SoCs booted via idbloader + U-Boot proper + extlinux.
Package nanopizero2 implements internal/boards.Board for the FriendlyElec NanoPi Zero2 (Rockchip RK3528A): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition — the same boot chain as the Radxa Zero 3E (see internal/boards/radxazero3e), since both are Rockchip SoCs booted via idbloader + U-Boot proper + extlinux.
boards/nanopizero2/templates
Package templates holds the NanoPi Zero2's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
Package templates holds the NanoPi Zero2's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
boards/pi3b
Package pi3b implements internal/boards.Board for the Raspberry Pi 3B family - one image covers both the 3B and the 3B+ (bean gosd-oq0z): GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly, same as the Pi Zero 2W), both models' DTBs (the firmware picks by board revision), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
Package pi3b implements internal/boards.Board for the Raspberry Pi 3B family - one image covers both the 3B and the 3B+ (bean gosd-oq0z): GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly, same as the Pi Zero 2W), both models' DTBs (the firmware picks by board revision), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
boards/pi3b/templates
Package templates holds the Pi 3B boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
Package templates holds the Pi 3B boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
boards/picm4
Package picm4 implements internal/boards.Board for the Raspberry Pi Compute Module 4 (Lite, no-wireless variant): GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly, same as pi-zero-2w and pi-3b), a single DTB (the official CM4 IO Board's - the closest available match for any third-party CM4 carrier, including this board's target hardware, a Turing Pi 2 node slot), and no WiFi firmware at all - this module has no wireless hardware, the first Pi board GoSD ships with none.
Package picm4 implements internal/boards.Board for the Raspberry Pi Compute Module 4 (Lite, no-wireless variant): GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly, same as pi-zero-2w and pi-3b), a single DTB (the official CM4 IO Board's - the closest available match for any third-party CM4 carrier, including this board's target hardware, a Turing Pi 2 node slot), and no WiFi firmware at all - this module has no wireless hardware, the first Pi board GoSD ships with none.
boards/picm4/templates
Package templates holds the Pi CM4 boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
Package templates holds the Pi CM4 boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
boards/pizero2w
Package pizero2w implements internal/boards.Board for the Raspberry Pi Zero 2 W: GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
Package pizero2w implements internal/boards.Board for the Raspberry Pi Zero 2 W: GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel8.img directly), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
boards/pizero2w/templates
Package templates holds the Pi Zero 2W boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
Package templates holds the Pi Zero 2W boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
boards/pizerow
Package pizerow implements internal/boards.Board for the original Raspberry Pi Zero W: GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel.img directly, same as the Pi Zero 2W), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
Package pizerow implements internal/boards.Board for the original Raspberry Pi Zero W: GPU boot firmware and config.txt/cmdline.txt in the FAT boot partition (no U-Boot - the GPU ROM loads kernel.img directly, same as the Pi Zero 2W), and WiFi firmware (plus its board-specific alias names) under /lib/firmware in the initramfs.
boards/pizerow/templates
Package templates holds the Pi Zero W boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
Package templates holds the Pi Zero W boot partition text files (config.txt, cmdline.txt) as go:embed text/template sources, so the board profile that assembles a FAT boot partition can render them without shelling out or reading from disk.
boards/qemuvirt
Package qemuvirt implements internal/boards.Board for qemu-virt: an internal-only profile (registered via boards.RegisterInternal, never offered as a default build target or in end-user docs - see the "qemu-virt board" locked decision in CLAUDE.md) targeting `qemu-system-aarch64 -M virt` with virtio devices, used for CI and local testing (see bean gosd-c54j and its children).
Package qemuvirt implements internal/boards.Board for qemu-virt: an internal-only profile (registered via boards.RegisterInternal, never offered as a default build target or in end-user docs - see the "qemu-virt board" locked decision in CLAUDE.md) targeting `qemu-system-aarch64 -M virt` with virtio devices, used for CI and local testing (see bean gosd-c54j and its children).
boards/radxazero3e
Package radxazero3e implements internal/boards.Board for the Radxa Zero 3E: raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
Package radxazero3e implements internal/boards.Board for the Radxa Zero 3E: raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
boards/radxazero3e/templates
Package templates holds the Radxa Zero 3E's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
Package templates holds the Radxa Zero 3E's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
boards/rock4se
Package rock4se implements internal/boards.Board for the Radxa ROCK 4SE (RK3399-T): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
Package rock4se implements internal/boards.Board for the Radxa ROCK 4SE (RK3399-T): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
boards/rock4se/templates
Package templates holds the Radxa ROCK 4SE's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
Package templates holds the Radxa ROCK 4SE's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
boards/turingrk1
Package turingrk1 implements internal/boards.Board for the Turing RK1 (Rockchip RK3588): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
Package turingrk1 implements internal/boards.Board for the Turing RK1 (Rockchip RK3588): raw bootloader writes (idbloader.img, u-boot.itb) into the unpartitioned gap ahead of the FAT boot partition, and the kernel, DTB, initramfs, and extlinux.conf U-Boot reads from that partition.
boards/turingrk1/templates
Package templates holds the Turing RK1's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
Package templates holds the Turing RK1's extlinux.conf as a go:embed text/template source, so the board profile that assembles a FAT boot partition can render it without shelling out or reading from disk.
boardset
Package boardset registers every board GoSD ships, and reports the set it registered.
Package boardset registers every board GoSD ships, and reports the set it registered.
build
Package build cross-compiles Go packages into the static Linux binaries that end up on a gosd image (the user's app, and gosd-init), targeting whichever GOARCH/GOARM a board's boards.Arch calls for.
Package build cross-compiles Go packages into the static Linux binaries that end up on a gosd image (the user's app, and gosd-init), targeting whichever GOARCH/GOARM a board's boards.Arch calls for.
buildconfig
Package buildconfig parses gosd-build.toml, the developer-authored, checked-in file of gosd build (and gosd run) options (bean gosd-mwct).
Package buildconfig parses gosd-build.toml, the developer-authored, checked-in file of gosd build (and gosd run) options (bean gosd-mwct).
cacerts
Package cacerts pins the Mozilla CA bundle GoSD bakes into every image's initramfs (bean gosd-kzgq), so an app's outbound HTTPS calls find a working system trust store with zero setup - see docs/runtime.md's HTTPS section.
Package cacerts pins the Mozilla CA bundle GoSD bakes into every image's initramfs (bean gosd-kzgq), so an app's outbound HTTPS calls find a working system trust store with zero setup - see docs/runtime.md's HTTPS section.
catalog
Package catalog builds Raspberry Pi Imager custom-repository catalog files (os_list.json) from gosd's own built images, so end users can paste a repo URL into Imager's Settings -> Custom repository and get the full WiFi/hostname customization wizard instead of the no-customization "Use custom image" file picker (see the "End-user flashing path" locked decision in CLAUDE.md and the §0 finding in docs/provisioning-formats.md that explains why that file picker can't be used instead).
Package catalog builds Raspberry Pi Imager custom-repository catalog files (os_list.json) from gosd's own built images, so end users can paste a repo URL into Imager's Settings -> Custom repository and get the full WiFi/hostname customization wizard instead of the no-customization "Use custom image" file picker (see the "End-user flashing path" locked decision in CLAUDE.md and the §0 finding in docs/provisioning-formats.md that explains why that file picker can't be used instead).
cloudflaredpin
Package cloudflaredpin pins the upstream cloudflared release that `gosd build --ingress cloudflared` bakes into an image (epic gosd-virc): a locally-managed Cloudflare Tunnel client that lets gosd-init expose one declared HTTP service to the public internet with zero app code.
Package cloudflaredpin pins the upstream cloudflared release that `gosd build --ingress cloudflared` bakes into an image (epic gosd-virc): a locally-managed Cloudflare Tunnel client that lets gosd-init expose one declared HTTP service to the public internet with zero app code.
cmd/imgextract command
Command imgextract copies every file at the root of a gosd .img's FAT boot partition out to a destination directory, without root and without mtools.
Command imgextract copies every file at the root of a gosd .img's FAT boot partition out to a destination directory, without root and without mtools.
cmd/injectfixture command
Command injectfixture builds a small, real gosd image and its <image>.inject.json sidecar for js/packages/gosd's cross-implementation integration test: proof that the TypeScript client (parseManifest, padContents, createSubstitutionTransform) correctly consumes exactly what the Go side (internal/configtree, internal/image.Write, internal/inject.Render/WriteManifest) actually produces, rather than a hand-rolled JS fixture that might silently drift from the real contract.
Command injectfixture builds a small, real gosd image and its <image>.inject.json sidecar for js/packages/gosd's cross-implementation integration test: proof that the TypeScript client (parseManifest, padContents, createSubstitutionTransform) correctly consumes exactly what the Go side (internal/configtree, internal/image.Write, internal/inject.Render/WriteManifest) actually produces, rather than a hand-rolled JS fixture that might silently drift from the real contract.
cmd/qemuboot command
Command qemuboot boots an already-built gosd --board=qemu-virt image under qemu-system-aarch64, using internal/qemurun for both the boot-file extraction and the qemu invocation itself - the same package `gosd run` (cmd/gosd) uses to build and boot an image in one step.
Command qemuboot boots an already-built gosd --board=qemu-virt image under qemu-system-aarch64, using internal/qemurun for both the boot-file extraction and the qemu invocation itself - the same package `gosd run` (cmd/gosd) uses to build and boot an image in one step.
configtree
Package configtree assembles the config/ directory `gosd build` writes to the FAT root of every image's boot partition: one setting per file, read newline-trimmed, with an empty file meaning "not set".
Package configtree assembles the config/ directory `gosd build` writes to the FAT root of every image's boot partition: one setting per file, read newline-trimmed, with an empty file meaning "not set".
container
Package container is a small abstraction over shelling out to a container CLI (Docker or Podman) so Go code — currently only the future internal/kernelbuild — can run a long build inside a container without depending on either engine's SDK.
Package container is a small abstraction over shelling out to a container CLI (Docker or Podman) so Go code — currently only the future internal/kernelbuild — can run a long build inside a container without depending on either engine's SDK.
devreserve
Package devreserve is how gosd-init tells the rest of the device which block devices belong to GoSD itself, so a library an app calls can refuse to hand one of them to a USB host (bean gosd-ix0r).
Package devreserve is how gosd-init tells the rest of the device which block devices belong to GoSD itself, so a library an app calls can refuse to hand one of them to a USB host (bean gosd-ix0r).
diskfmt
Package diskfmt inspects and formats whole block devices on-device, in pure Go (CGO_ENABLED=0), with no external mkfs and no root beyond write access to the device node.
Package diskfmt inspects and formats whole block devices on-device, in pure Go (CGO_ENABLED=0), with no external mkfs and no root beyond write access to the device node.
extbuild
Package extbuild builds one "external" companion binary (e.g.
Package extbuild builds one "external" companion binary (e.g.
extconfig
Package extconfig parses gosd-external.toml, the developer-authored recipe `gosd build-external` (bean gosd-x3o0) reads to describe how to cross-compile a companion userspace binary (an "external", e.g.
Package extconfig parses gosd-external.toml, the developer-authored recipe `gosd build-external` (bean gosd-x3o0) reads to describe how to cross-compile a companion userspace binary (an "external", e.g.
faultdrop
Package faultdrop defines the file an app's fault.Fatal call leaves in /run for gosd-init to pick up, and reads it back (bean gosd-aa1p, epic gosd-47z3).
Package faultdrop defines the file an app's fault.Fatal call leaves in /run for gosd-init to pick up, and reads it back (bean gosd-aa1p, epic gosd-47z3).
faultreport
Package faultreport renders LAST_FATAL_ERROR.md: the human-readable crash report a GoSD device writes onto the root of its own boot partition so that whoever collects an unattended device can read the latest fatal issue by plugging the card into any computer (epic gosd-47z3).
Package faultreport renders LAST_FATAL_ERROR.md: the human-readable crash report a GoSD device writes onto the root of its own boot partition so that whoever collects an unattended device can read the latest fatal issue by plugging the card into any computer (epic gosd-47z3).
fetch
Package fetch downloads pinned upstream files and verifies their content against an expected SHA-256 checksum before caching them locally.
Package fetch downloads pinned upstream files and verifies their content against an expected SHA-256 checksum before caching them locally.
fsutil
Package fsutil holds small filesystem helpers shared by gosd's container- build packages (internal/kernelbuild, internal/extbuild) and the CLI commands that drive them, so a plain byte-for-byte file copy - out of a content-addressed cache entry and into a caller-chosen output location - has exactly one implementation instead of being hand-rolled per package.
Package fsutil holds small filesystem helpers shared by gosd's container- build packages (internal/kernelbuild, internal/extbuild) and the CLI commands that drive them, so a plain byte-for-byte file copy - out of a content-addressed cache entry and into a caller-chosen output location - has exactly one implementation instead of being hand-rolled per package.
gitversion
Package gitversion resolves a "git:" app-version source (bean gosd-bggq) into a describe-style version string, in pure Go via go-git — no git binary is invoked, matching the project's no-extra-host-tools ethos.
Package gitversion resolves a "git:" app-version source (bean gosd-bggq) into a describe-style version string, in pure Go via go-git — no git binary is invoked, matching the project's no-extra-host-tools ethos.
hostsfile
Package hostsfile renders /etc/hosts for a gosd image: the static localhost entries gosd build bakes into the initramfs (see internal/pipeline) and the device's own hostname line gosd-init appends once it settles (see cmd/gosd-init/internal/boot).
Package hostsfile renders /etc/hosts for a gosd image: the static localhost entries gosd build bakes into the initramfs (see internal/pipeline) and the device's own hostname line gosd-init appends once it settles (see cmd/gosd-init/internal/boot).
image
Package image writes flashable SD-card .img files: an MBR partition table with a FAT32 boot partition and an optional second data partition (FAT32 or ext4).
Package image writes flashable SD-card .img files: an MBR partition table with a FAT32 boot partition and an optional second data partition (FAT32 or ext4).
initcfg
Package initcfg owns the schema gosd-init reads at boot: the config.json baked onto every image by the gosd CLI, and the gosd.* kernel command-line parameters.
Package initcfg owns the schema gosd-init reads at boot: the config.json baked onto every image by the gosd CLI, and the gosd.* kernel command-line parameters.
initramfs
Package initramfs builds the initramfs cpio archive that gosd-init and the boot process run out of: gosd-init as /init, the user app as /app, per-board firmware under /lib/firmware, and the build-time config at /etc/gosd/config.json.
Package initramfs builds the initramfs cpio archive that gosd-init and the boot process run out of: gosd-init as /init, the user app as /app, per-board firmware under /lib/firmware, and the build-time config at /etc/gosd/config.json.
inject
Package inject implements the gosd side of the image-injection contract: deterministic, comment-padded placeholder files pre-created on the FAT32 boot partition at build time (`gosd build --placeholder <path>=<size>`), and the <image basename>.inject.json manifest that records the absolute byte ranges each placeholder's content occupies in the finished .img.
Package inject implements the gosd side of the image-injection contract: deterministic, comment-padded placeholder files pre-created on the FAT32 boot partition at build time (`gosd build --placeholder <path>=<size>`), and the <image basename>.inject.json manifest that records the absolute byte ranges each placeholder's content occupies in the finished .img.
kernelbuild
Package kernelbuild builds a board's kernel inside a container from its kernelspec.KernelSpec plus an optional developer Overlay, emitting a flat artifact directory and/or the staging/<board> layout build/artifacts/package.sh consumes - output that drops straight into `gosd build --artifacts-dir`.
Package kernelbuild builds a board's kernel inside a container from its kernelspec.KernelSpec plus an optional developer Overlay, emitting a flat artifact directory and/or the staging/<board> layout build/artifacts/package.sh consumes - output that drops straight into `gosd build --artifacts-dir`.
kernelconfig
Package kernelconfig parses gosd-kernel.toml, the developer-authored overlay config gosd build-kernel (and, for its [[firmware]] entries, gosd build) reads to layer custom Kconfig fragments, device-tree patches, and runtime firmware onto a board's kernelspec.KernelSpec.
Package kernelconfig parses gosd-kernel.toml, the developer-authored overlay config gosd build-kernel (and, for its [[firmware]] entries, gosd build) reads to layer custom Kconfig fragments, device-tree patches, and runtime firmware onto a board's kernelspec.KernelSpec.
kernelparam
Package kernelparam validates the extra kernel command-line parameters a developer bakes into an image with `gosd build --kernel-param`.
Package kernelparam validates the extra kernel command-line parameters a developer bakes into an image with `gosd build --kernel-param`.
kernelspec
Package kernelspec is the Go-native, declarative source of truth for how each board's kernel is built: source repo/ref, defconfig, config fragment, device-tree patches, toolchain, build outputs, and the post-olddefconfig assertions the build must satisfy.
Package kernelspec is the Go-native, declarative source of truth for how each board's kernel is built: source repo/ref, defconfig, config fragment, device-tree patches, toolchain, build outputs, and the post-olddefconfig assertions the build must satisfy.
naming
Package naming sanitizes free-form strings (like a main package's basename) into the restricted character set gosd uses for hostnames, output filenames, and the per-app partition volume labels an image is built with (see LabelPrefix and LabelsFor).
Package naming sanitizes free-form strings (like a main package's basename) into the restricted character set gosd uses for hostnames, output filenames, and the per-app partition volume labels an image is built with (see LabelPrefix and LabelsFor).
pipeline
Package pipeline wires the pieces gosd build needs into one flashable image per board: resolving pinned/local artifacts, building the initramfs (app + gosd-init + firmware + config.json), computing config.json's content-derived image identity over that same payload (see internal/initcfg.ComputeIdentity), asking the board profile for its boot files and raw writes, and writing the finished .img via internal/image.
Package pipeline wires the pieces gosd build needs into one flashable image per board: resolving pinned/local artifacts, building the initramfs (app + gosd-init + firmware + config.json), computing config.json's content-derived image identity over that same payload (see internal/initcfg.ComputeIdentity), asking the board profile for its boot files and raw writes, and writing the finished .img via internal/image.
provision
Package provision reads what Raspberry Pi Imager (or a hand-editing user) left on the boot partition and extracts the subset gosd-init consumes: a hostname (from cloud-init's user-data) and WiFi access points (from cloud-init's network-config).
Package provision reads what Raspberry Pi Imager (or a hand-editing user) left on the boot partition and extracts the subset gosd-init consumes: a hostname (from cloud-init's user-data) and WiFi access points (from cloud-init's network-config).
qemurun
Package qemurun boots a gosd --board=qemu-virt image under qemu-system-aarch64: extracting the kernel and initramfs from the image's FAT boot partition (qemu has no bootloader of its own to read them off the partition the way real hardware does), then exec'ing the qemu invocation validated by gosd-5wm0 and proven end-to-end by gosd-27lz.
Package qemurun boots a gosd --board=qemu-virt image under qemu-system-aarch64: extracting the kernel and initramfs from the image's FAT boot partition (qemu has no bootloader of its own to read them off the partition the way real hardware does), then exec'ing the qemu invocation validated by gosd-5wm0 and proven end-to-end by gosd-27lz.
readymark
Package readymark defines the empty marker file the public ready package's Signal function creates, and reads it back for gosd-init's boot sequence — the shared contract between the two, so the writer and the reader cannot drift (the internal/wifictl precedent).
Package readymark defines the empty marker file the public ready package's Signal function creates, and reads it back for gosd-init's boot sequence — the shared contract between the two, so the writer and the reader cannot drift (the internal/wifictl precedent).
redact
Package redact replaces secret values in text with safe placeholders.
Package redact replaces secret values in text with safe placeholders.
repocheck
Package repocheck is the home for repo-wide invariant tests that no production package owns.
Package repocheck is the home for repo-wide invariant tests that no production package owns.
secretreg
Package secretreg defines the format of the registration file fault.RegisterSecretString (bean gosd-aa1p) writes to /run, and reads it back: on a panic the app never gets to hand anything over, so a secret registered only in the app's own memory is exactly the one still in the crash report gosd-init is about to write.
Package secretreg defines the format of the registration file fault.RegisterSecretString (bean gosd-aa1p) writes to /run, and reads it back: on a panic the app never gets to hand anything over, so a secret registered only in the app's own memory is exactly the one still in the crash report gosd-init is about to write.
staticelf
Package staticelf checks whether a binary is a fully static ELF executable matching a given board architecture.
Package staticelf checks whether a binary is a fully static ELF executable matching a given board architecture.
wifictl
Package wifictl defines the request/status file protocol a runtime wifi.Join call uses to ask gosd-init to join a new WiFi network, and reads both files back.
Package wifictl defines the request/status file protocol a runtime wifi.Join call uses to ask gosd-init to join a new WiFi network, and reads both files back.
Package ready lets an app tell gosd-init it has finished its own startup checks — WiFi joined, an API reachable, a sensor initialized, whatever "genuinely all okay" means for it — and is ready to be shown as running.
Package ready lets an app tell gosd-init it has finished its own startup checks — WiFi joined, an API reachable, a sensor initialized, whatever "genuinely all okay" means for it — and is ready to be shown as running.
Package sound plays PCM audio out of a GoSD board — HDMI on the boards that have it, the analog jack on the boards that have one — with no cgo, no alsa-lib, and no third-party dependency.
Package sound plays PCM audio out of a GoSD board — HDMI on the boards that have it, the analog jack on the boards that have one — with no cgo, no alsa-lib, and no third-party dependency.
Package wifi lets a GoSD app join a WiFi network at runtime, using credentials the app obtained by its own means — an NFC tag, a provisioning screen, anything other than the config tree gosd-init already reads at boot.
Package wifi lets a GoSD app join a WiFi network at runtime, using credentials the app obtained by its own means — an NFC tag, a provisioning screen, anything other than the config tree gosd-init already reads at boot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL