Automate CHIP configuration
There are times when it is convenient to set up a CHIP in an automatic, programmatic way. You might be using multiple CHIPs in a project and you want them all to work the same way, or you'd like to share a particular configuration of CHIP with others, or maybe you want a way to reset a CHIP to a known state. This page outlines approaches for doing automated software installation and configuration of a CHIP.
Run a script after flashing
Probably the easiest way to start with automation is to place the setup steps into a script (such as a bash script) and run that manually after the CHIP has been flashed.
The following sections discuss some things to consider with this approach.
How to connect with the CHIP to run the script?
- Serial over USB
- Ssh over a wired ethernet connection
How to get the script to the CHIP?
- Using a USB drive
- Over a network
Do you need a network connection for the configuration?
For example, if you are installing software from the internet, you will need to establish an internet connection.
Prepare a custom image to flash with Buildroot
Buildroot is a cross-compiling system for making custom Linux operating system images and may be used with CHIP. For more information on Buildroot and using it with CHIP, see:
Please note that as of 2016-11-19, there are some issues that need to be addressed when using CHIP-buildroot. Please see the forum thread https://bbs.nextthing.co/t/cli-flashing-help/11766 for more details.
There has been some discussion about the possibility of running a configuration script as part of the flashing process: