S50usbdevice: an unset USB role is client (flare-edge#278) #9

Merged
noah merged 1 commits from fix-278-s50-role-default into flare-edge-next 2026-10-01 16:04:39 -06:00
Owner

Adds board/patches/0014-s50usbdevice-unset-role-is-client.patch: S50usbdevice's role gate now reads a missing /userdata/warden/role as client (0), like every other role reader (flare-edge S26usbhost, S35iptables, usb-nic-hotplug.sh, wifi-link-watchdog.sh, flared's schema).

0004 read unset as router, so a fresh store never composed the USB gadget and the panel had no usb0 until its second boot (blueflare/flare-edge#278).

Why a new patch and not an edit to 0004

flare-edge tools/build-firmware.sh applies the series idempotently against the persistent runner SDK. On a tree that already carries 0004 and 0008, an edited 0004 neither applies nor reverse-applies, so it is skipped as "inconclusive" and the old gate would keep shipping. Checked on a scratch replay of the vendor-base S50usbdevice:

  • pristine tree: 0004, 0008, 0014 apply in order, and the result carries || echo 0
  • tree already carrying 0004+0008 (the runner SDK): 0014 applies forward; on a second run it reverse-checks as already applied
  • an in-place edit of 0004 on that tree: both forward and reverse checks fail

The patched S50usbdevice (series + 0014) was installed on lab panel warden-a8d1. After a fresh-store reboot: configfs-gadget.rockchip gadget.0: MAC ... at 16 s, usb0 up, SSH over 172.32.0.1.

flare-edge's tests/guards/run-role-default-tests.sh (flare-edge PR to follow) pins this gate to the other readers, using the last gate the series leaves on the file.

Generated with Claude Code

https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg

Adds `board/patches/0014-s50usbdevice-unset-role-is-client.patch`: S50usbdevice's role gate now reads a missing `/userdata/warden/role` as client (0), like every other role reader (flare-edge S26usbhost, S35iptables, usb-nic-hotplug.sh, wifi-link-watchdog.sh, flared's schema). 0004 read unset as router, so a fresh store never composed the USB gadget and the panel had no usb0 until its second boot (blueflare/flare-edge#278). ## Why a new patch and not an edit to 0004 flare-edge `tools/build-firmware.sh` applies the series idempotently against the persistent runner SDK. On a tree that already carries 0004 and 0008, an edited 0004 neither applies nor reverse-applies, so it is skipped as "inconclusive" and the old gate would keep shipping. Checked on a scratch replay of the vendor-base S50usbdevice: - pristine tree: 0004, 0008, 0014 apply in order, and the result carries `|| echo 0` - tree already carrying 0004+0008 (the runner SDK): 0014 applies forward; on a second run it reverse-checks as already applied - an in-place edit of 0004 on that tree: both forward and reverse checks fail The patched S50usbdevice (series + 0014) was installed on lab panel warden-a8d1. After a fresh-store reboot: `configfs-gadget.rockchip gadget.0: MAC ...` at 16 s, usb0 up, SSH over 172.32.0.1. flare-edge's `tests/guards/run-role-default-tests.sh` (flare-edge PR to follow) pins this gate to the other readers, using the last gate the series leaves on the file. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
noah added 1 commit 2026-10-01 15:20:08 -06:00
S50usbdevice: an unset USB role is client
ci / bench (push) Successful in 6s
ci / mcdc (push) Successful in 12s
ci / patches-apply (push) Successful in 15s
ci / test (pull_request) Successful in 14s
ci / quality (push) Successful in 29s
ci / badges (push) Skipped
ci / test (push) Successful in 13s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / qemu-tools (push) Successful in 42s
ci / patches-apply (pull_request) Successful in 16s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 27s
ci / badges (pull_request) Skipped
ci / bench (pull_request) Successful in 4s
ci / mcdc (pull_request) Successful in 14s
ci / qemu-tools (pull_request) Successful in 41s
5f3db8453b
0004's gate read a missing /userdata/warden/role as router, so a fresh
store never composed the gadget and the panel had no usb0 until its
second boot (flare-edge#278). Every other role reader defaults unset to
client. 0014 changes the gate to match.

A new patch rather than an edit to 0004: build-firmware.sh skips an
edited, already-applied 0004 as inconclusive, so the runner SDK would
keep the old gate. 0014 applies on a pristine replay and on a tree that
already carries 0004 and 0008.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
noah merged commit d746ceba6d into flare-edge-next 2026-10-01 16:04:39 -06:00
noah deleted branch fix-278-s50-role-default 2026-10-01 16:04:39 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#9