westwork-org / westwork-gen

Tool used to create Raspbian images for Westwork. Based on pi-gen.
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

westwork-gen

Tool used to create the Westwork Raspbian-based image This tool is based on the official RPi-distro generator

TODO

  1. Documentation

Dependencies

quilt parted realpath qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2-bin grep rsync

Config

Upon execution, build.sh will source the file config in the current working directory. This bash shell fragment is intended to set needed environment variables.

The following environment variables are supported:

A simple example for building Raspbian:

IMG_NAME='Raspbian'

Docker Build

vi config         # Edit your config file. See above.
./build-docker.sh

If everything goes well, your finished image will be in the deploy/ folder. You can then remove the build container with docker rm pigen_work

If something breaks along the line, you can edit the corresponding scripts, and continue:

CONTINUE=1 ./build-docker.sh

There is a possibility that even when running from a docker container, the installation of qemu-user-static will silently fail when building the image because binfmt-support must be enabled on the underlying kernel. An easy fix is to ensure binfmt-support is installed on the host machine before starting the ./build-docker.sh script (or using your own docker build solution).

Stage Anatomy

Raspbian Stage Overview

The build of Raspbian is divided up into several stages for logical clarity and modularity. This causes some initial complexity, but it simplifies maintenance and allows for more easy customization.