What is Pi Chef?
Pi Chef is an application that allows you to ‘cook’ your Pi Images using ‘Recipes’ before burning them to an SD Card. A ‘recipe’ is a zip file containing a set of instructions on how to modify the image. It lets you add files, edit the config.txt and set up wifi etc. A full list can be found below. The recipes can be created easily or supplied by hardware creators that use a Raspberry Pi in their hardware, such as in IoT and handheld gaming devices. Nearly all custom hardware using a Raspberry Pi in their design require the user to use a special customised Raspberry Pi image that the creator supplies. With Pi Chef, the aim is that user can download any pre-existing Pi Image and then apply a recipe to make it compatible with the hardware.
RecipesA recipe is a zip file that contains everything needed to modify the filesystem image. It also contains a file called recipe.py which contains the commands to be ran. Currently it's created manually. It must contain the recipe.py file.
The following commands can be used in a recipe.py
Adds a file to the Rasperry Pi Image. File paths are relative to root. Either the root of the recipe zip file or the file system of the Rasperry Pi Image
Enabled SSH on startup.
Configure the WiFi on the Raspberry Pi
This takes a service file located in the Recipe zip and installs it to run on boot in the Raspberry Pi image
editConfig(lineToAddOrRemove, Operation, PartialMatch)
Edit the config.txt in the boot partition. Can add or remove lines. When the operation is remove, partial match will delete any lines that contain the text specified as lineToAddOrRemove.
Adds a line “dtoverlay=dpi18” to the config.txt.
Removes the line “dtoverlay=dpi18” if present.
editConfig("dpi18", "Remove", "true")
Removes any line that contains the text ‘dpi18’