展示HN:每块板的辅助程序,用于串行访问、刷写和启动

1作者: acarminati大约 2 小时前原帖
嗨,HN, 我正在构建一个名为 Provisioner 的小型基础设施工具:一个针对单板计算机(SBC)引导和实验室自动化的每板配置侧车。 [GitHub链接](https://github.com/alessandrocarminati/provisioner) 模型很简单:每块板一个实例。它与硬件并排工作,拥有串口控制台,通过 SSH 提供访问,并通过 TFTP/HTTP 提供引导工件(内核、initramfs、rootfs)。它的设计适用于网络不可靠、存储半闪存、而 UART 是唯一能提供真实信息的阶段。 功能介绍: - 拥有串口控制台 + SSH 多路复用 - 监控 shell + 串口隧道 - 可脚本化的引导交互 - 工件提供(TFTP + HTTP) - 串口内传输文件 - gzip/base64 黑客 + XMODEM - 基于我之前的 send_console-ng 工具开发而来 [GitHub链接](https://github.com/alessandrocarminati/send_file-ng) - 可插拔的电源控制 - SNMP PDU,以及其他廉价的 ESP8266/Tasmota 设备 - 串口日志记录 - 轻量级访问控制 Provisioner 还在内核 initramfs 中嵌入了一个最小的初始化运行时(goinit),作为其板载配置代理,处理闪存、工件检索,并通过串口报告管理状态。 路由与流处理: 在内部,Provisioner 通过可插拔路由器路由串口流量: - 生产者/消费者作为组件连接 - 人类与机器客户端的处理方式不同 - 单播控制会话 - 广播多路复用到多个观察者 这使得多个用户或服务可以在不干扰的情况下观察同一个控制台。 过滤器: 过滤器子系统可以实时拦截和修改串口流。最初是为了缓解 ANSI 设备状态报告(例如光标位置报告问题)在隧道串口控制台时的影响,但它也可以作为自动化和规范化的一般流重写机制。 定位: 并不是试图取代像 LAVA 这样的大型系统。这个工具的目标是: - 家庭实验室 - 引导测试台 - 内核/BSP 工作 - 小型共享实验室 想象一下可以在一个下午内部署的实验室自动化,而不是舰队编排。 该项目仍在不断发展中,但已经在日常使用中。欢迎反馈和建议。
查看原文
Hi HN,<p>I’ve been building a small infrastructure tool called Provisioner: a per-board provisioning sidecar for SBC bring-up and lab automation. <a href="https:&#x2F;&#x2F;github.com&#x2F;alessandrocarminati&#x2F;provisioner" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alessandrocarminati&#x2F;provisioner</a><p>The model is simple: one instance per board. It sits next to the hardware, owns the serial console, exposes access over SSH, and serves boot artifacts (kernel, initramfs, rootfs) via TFTP&#x2F;HTTP. It’s designed for the phase where networking is unreliable, storage is half-flashed, and UART is the only thing still telling the truth.<p>What it does<p>- Serial console ownership + SSH multiplexing - Monitor shell + serial tunnels - Scriptable boot interaction - Artifact provisioning (TFTP + HTTP) - In-band file transfer over serial - gzip&#x2F;base64 hacks + XMODEM - Derived from my earlier send_console-ng utility <a href="https:&#x2F;&#x2F;github.com&#x2F;alessandrocarminati&#x2F;send_file-ng" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alessandrocarminati&#x2F;send_file-ng</a> - Pluggable power control - SNMP PDUs, among others cheap ESP8266&#x2F;Tasmota devices - Serial logging - Lightweight access control<p>Provisioner also embeds a minimal init runtime (goinit) inside the kernel initramfs, acting as its on-board provisioning agent, handling flashing, artifact retrieval, and reporting management state back over serial.<p>Routing &amp; stream handling<p>Internally, Provisioner routes serial traffic through a pluggable router:<p>- Producers&#x2F;consumers attach as components - Human vs machine clients handled differently - Unicast control sessions - Broadcast multiplexing to multiple observers<p>This allows several users or services to watch the same console without interfering.<p>Filters<p>A filter subsystem can intercept and modify serial streams on the fly.<p>Originally added to mitigate ANSI Device Status Reports (e.g. Cursor Position Report issues) when tunneling serial consoles, but it doubles as a general stream rewriting mechanism for automation and normalization.<p>Positioning<p>Not trying to replace large systems like LAVA.<p>This is aimed at:<p>- Homelabs - Bring-up benches - Kernel&#x2F;BSP work - Small shared labs<p>Think lab automation you can deploy in an afternoon, not fleet orchestration.<p>Project is still evolving but already in daily use. Feedback and abuse welcome.