Plan 9 CPU command, in Go, for Linux
the network is the computer -- for real this time
- Track: Open Source Firmware, BMC and Bootloader devroom
- Room: D.firmware
- Day: Saturday
- Start: 17:00
- End: 17:50
- Video with Q&A: D.firmware
- Video only: D.firmware
- Chat: Join the conversation!
I have reimplemented the Plan 9 cpu command in pure Go, available at github.com/u-root/cpu. It uses the ssh transport protocol for data, and the 9p protocol for file system traffic.
If you are used to ssh, cpu will look very similar, to the point of even honoring your .ssh/config! What's different is that when you cpu from your local note to a remote node, file systems of your choosing are visible on the remote node, mounted over 9p, connected to a server running in the cpu command itself. Translation: you don't ever need to talk to a sysadmin to get network mounts set up. Want to use programs from your local node, libraries from your node, and see your home directory? No problem, run with the default namespace. Is the node a different architecture, but you want to use your /home? No problem, just tailor the CPUNAMESPACE variable, e.g.: CPUNAMESPACE=/home:/bin=/arm/bin:/usr=/arm/usr:/lib=/arm/lib cpu cat /proc/cpuinfo. Want all this from power-on/reset? No problem, we embed kernels and a cpu daemon in flash on any of x86, ARM, ARM64, and RISC-V. Want to embed a cpu capability into your Go program? No problem there is a simple package that implements the Go exec.Command interface. Want to understand cpu? No problem, it's easy to read, consisting of 1164 lines of code for the client and 799 for the server.
Speakers
Ron Minnich |