48 lines
1.6 KiB
Markdown
48 lines
1.6 KiB
Markdown
# pi-gen
|
|
|
|
Tool used to create Raspberry Pi OS images, and custom images based on Raspberry Pi OS,
|
|
which was in turn derived from the Raspbian project.
|
|
|
|
**Note**: Raspberry Pi OS 32 bit images are based primarily on Raspbian, while
|
|
Raspberry Pi OS 64 bit images are based primarily on Debian.
|
|
|
|
**Note**: 32 bit images should be built from the `master` branch.
|
|
64 bit images should be built from the `arm64` branch.
|
|
|
|
## Dependencies
|
|
|
|
pi-gen runs on Debian-based operating systems released after 2017, and we
|
|
always advise you use the latest OS for security reasons.
|
|
|
|
On other Linux distributions it may be possible to use the Docker build described
|
|
below.
|
|
|
|
To install the required dependencies for `pi-gen` you should run:
|
|
|
|
```bash
|
|
apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
|
|
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
|
|
gpg pigz xxd arch-test
|
|
```
|
|
|
|
The file `depends` contains a list of tools needed. The format of this
|
|
package is `<tool>[:<debian-package>]`.
|
|
|
|
## Getting started with building your images
|
|
|
|
Getting started is as simple as cloning this repository on your build machine. You
|
|
can do so with:
|
|
|
|
```bash
|
|
git clone https://github.com/RPI-Distro/pi-gen.git
|
|
```
|
|
|
|
`--depth 1` can be added after `git clone` to create a shallow clone, only containing
|
|
the latest revision of the repository. Do not do this on your development machine.
|
|
|
|
Also, be careful to clone the repository to a base path **NOT** containing spaces.
|
|
This configuration is not supported by debootstrap and will lead to `pi-gen` not
|
|
running.
|
|
|
|
After cloning the repository, you can move to the next step and start configuring
|
|
your build. |