Bugs-evident cleanup: cable-measure failure is fatal with its reason (failed/fail pretend-path and dead relinked plumbing deleted), bcm.command refuses partial SETs (0 or 5 params, stale-DATA trap made structural), BOOT gains a patched-ixgbe check naming stock-driver boots, panel fault rows matched by label and console rows strict on column count, phy.go split into sff/bcm/rollball and main.go's direction machinery into direction.go (pure moves), input events decoded via encoding/binary, gofmt; verified on hardware (20.00G, zero errors, ECD 41m)

This commit is contained in:
flamingcow
2026-08-17 18:56:55 -07:00
parent 38c2cc4da2
commit 916c0150ef
12 changed files with 1109 additions and 1049 deletions
+30 -1
View File
@@ -2,6 +2,8 @@ package main
import (
"fmt"
"os"
"path/filepath"
"time"
"golang.org/x/sys/unix"
@@ -89,6 +91,32 @@ func mountFilesystems() []checkResult {
return out
}
// The sff_i2c debugfs node is the patched driver's signature. Checked up front
// because stock ixgbe also refuses the FS module's EEPROM and leaves its port
// with no netdev, so the missing patch would otherwise surface later as a
// baffling "want 2 ixgbe interfaces, found 1".
func checkPatchedIxgbe() checkResult {
res := checkResult{item: "patched ixgbe"}
devs, err := filepath.Glob("/sys/kernel/debug/ixgbe/*")
if err != nil {
res.err = err
return res
}
if len(devs) == 0 {
res.err = fmt.Errorf("no ixgbe devices in debugfs; run ./load-ixgbe")
return res
}
for _, d := range devs {
if _, err := os.Stat(d + "/sff_i2c"); err != nil {
res.err = fmt.Errorf("%s has no sff_i2c: stock ixgbe loaded; run ./load-ixgbe",
filepath.Base(d))
return res
}
}
res.state = fmt.Sprintf("sff_i2c on %d devices", len(devs))
return res
}
const (
touchTimeout = 30 * time.Second
touchPoll = 100 * time.Millisecond
@@ -123,9 +151,10 @@ func waitForTouchscreen() checkResult {
func bootstrap() []checkResult {
out := mountFilesystems()
// /dev/input/event* only exists once devtmpfs is mounted above.
// debugfs and /dev/input/event* only exist once the mounts above are in.
if out[len(out)-1].err != nil {
return out
}
out = append(out, checkPatchedIxgbe())
return append(out, waitForTouchscreen())
}