conferences | speakers | series

Plan 9 CPU command, in Go, for Linux

home

Plan 9 CPU command, in Go, for Linux
FOSDEM 2022

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