What is Spin?
Spin creates bootable images for FreeBSD. It will spin together a number of different binary artifacts into an image tailored for a specific environment. Spin knows how to create a number of common image types. Spin's image creation engine is flexible and extensible. Packages can include metadata which spin can use to create images that are independent of common ones, or that merely flavor them in some specific way.
Spin is designed to pull together the large diversity of tools that currently does this: release(7), nanobsd, crochet, zrouter, Adrian Chadd's wifi tools, mfsbsd, and dozens of home-grown variants in the wild. The goal is to centralize this knowledge and to increase the flexibility in creating releases beyond what buildworld and make release have offered. Spin is a not a build tool, but more of a tool that assembles built pieces into a greater whole.
What are spin's inputs?
Spin's inputs are quite varied. At a high level, it accepts any collection of files, plus metadata about the files (perhaps stored in the filesystem, perhaps stored in METALOG mtree files). This collection of files can also contain metadata that directs spin to create the image. For example, u-boot ports will soon provide meta-data files which describe how to take the files in the u-boot port (and possibly other dependent ports) and create the image from that. Some SoCs require
Some use cases for spin
- Using mkimg to create a bootable image from a FreeBSD installworld / installkernel tree, perhaps customized with new files and packages.
- Creating a customized boot image (with the proper u-boot firmware for your board, for example) from a generic boot image provided by the project. Spin's job here is to fill in the missing pieces in the template to produce a bootable image.
- Using src pkg and ports pkg to stitch together a complete system image (including pulling metadata about the image format from those packages)
- Creating images for custom boot roms