Features
New ready package: hold the status LED until your app is ready
An app that needs WiFi, an external API, or a sensor initialized before
it's genuinely "all okay" can now hold gosd-init's status LED on
"booting" past /app's process start, and only let it show "running" once
the app says so. Importing github.com/jphastings/gosd/ready is the
declaration — gosd build inspects the app's own dependency graph, no flag
needed — and calling ready.Signal() is what flips the LED. Every app that
doesn't import the package is unaffected: the LED still moves to "running"
the instant /app starts, exactly as before.
New wifi package
wifi.Join(ctx, wifi.Credentials{SSID, Passphrase}, wifi.Options{Persist: bool}) lets an app join a WiFi network at runtime, using credentials it
obtained by its own means — an NFC tag, a provisioning screen, anything
other than what the config tree already had at boot. Join blocks until
gosd-init reports the attempt joined or failed. Off a device (any binary
not built by gosd build), Join returns an immediate, actionable error
rather than reaching for a filesystem that isn't there.
wifi.Join now works end to end
gosd-init's WiFi bring-up now watches for a runtime wifi.Join request and
reconciles it: tears down the current association, attempts the requested
network, and reports back joined or failed with the failure reason as
precisely as nl80211 gives it. This runs on any WiFi-capable board even if
no WiFi credentials were configured at boot, and answers honestly with "no
WiFi interface" on a board with no WiFi hardware at all — an app's Join
call never just hangs.
wifi.Options{Persist: true} now does something: on a successful join,
gosd-init writes the network into the card's config tree so the device
rejoins it on every future boot too. A failed join is never persisted.
A successful runtime join also restarts the cloudflared or tailscale-funnel
ingress tunnel (whichever the image was built with), so it comes back on
the new network without a reboot — including a join back onto the same
network, which still counts as a fresh restart.
Fixes
Board images are now built from artifacts v0.10.4
gosd build downloads the board kernels and bootloaders published as
v0.10.4, which brings:
- Turing RK1 kernel and U-Boot are now published in artifacts releases