I need to automate the creation of a Debian-based custom BBB image that will be used in production. We’re currently using one of the “console-only” pre-built images and then interactively tweaking it via console commands via SSH. Our tweaking procedure includes:
- Running apt install for additional needed packages not included in the pre-built image
- Running apt remove for packages that we don’t need
- Deploying the device overlays to match the hardware that we connect to the BBB header pins
- Deploying our application executables
- Setting-up systemd entries so that our executables are launched in the proper order
This method of creating custom images with a human interactively inputting commands is error-prone and time-consuming. I want to be able to automate the entire image creation process via a master script on a dedicated build machine (preferably a x64 computer, but I can also purchase a high-performance ARM machine if necessary).
Please advise on the way I should go about doing this. I found the omap-image-builder GitHub repo, but there’s very little documentation and it’s not clear what this tool actual does. It does not mention if the command can be run on a host computer, or if it should be run on a Beaglebone.
I also found this Digikey article that describes how to build the kernel. It also describes how to copy a minimal Debian filesystem prepared by Robert Nelson.
To make things more confusing, there’s this InstallingDebianOn page that doesn’t seem to have any relation with Robert Nelson’s stuff.
I want to be able to generate my own Debian filesystem from scratch with only the minimal packages that we need. How do I go about doing this?
While I appreciate everything Robert Nelson has been doing for the community, it seems that he’s the only one who understands how to create these images, and his notes are scattered across several places on the web. Is it possible for anyone else to replace Robert if he gets hit by a bus? We shouldn’t be relying on a single person.
Any guidance would be appreciated.