You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following environment variables are supported:
30
39
31
-
*`IMG_NAME`, the name of the distribution to build (required)
32
40
*`APT_PROXY`, proxy/cache URL to be included in the build
33
41
42
+
*`IMG_NAME`, the name of the distribution to build (required)
43
+
The name of the image to build with the current stage directories. Setting
44
+
`IMG_NAME=Raspbian` is logical for an unmodified RPi-Distro/pi-gen build,
45
+
but you should use something else for a customized version. Export files
46
+
in stages may add suffixes to `IMG_NAME`.
47
+
48
+
*`APT_PROXY` (Default: unset)
49
+
50
+
If you require the use of an apt proxy, set it here. This proxy setting
51
+
will not be included in the image, making it safe to use an `apt-cacher` or
52
+
similar package for development.
53
+
54
+
*`BASE_DIR` (Default: location of `build.sh`)
55
+
56
+
**CAUTION**: Currently, changing this value will probably break build.sh
57
+
58
+
Top-level directory for `pi-gen`. Contains stage directories, build
59
+
scripts, and by default both work and deployment directories.
60
+
61
+
*`WORK_DIR` (Default: `"$BASE_DIR/work"`)
62
+
63
+
Directory in which `pi-gen` builds the target system. This value can be
64
+
changed if you have a suitably large, fast storage location for stages to
65
+
be built and cached. Note, `WORK_DIR` stores a complete copy of the target
66
+
system for each build stage, amounting to tens of gigabytes in the case of
67
+
Raspbian.
68
+
69
+
*`DEPLOY_DIR` (Default: `"$BASE_DIR/deploy"`)
70
+
71
+
Output directory for target system images and NOOBS bundles.
72
+
34
73
A simple example for building Hassbian:
74
+
=======
35
75
36
76
```bash
37
77
IMG_NAME='Hassbian'
38
78
```
39
79
80
+
40
81
## Docker Build
41
82
42
83
```bash
43
84
nano config # Edit your config file. See above.
44
85
./build-docker.sh
45
86
```
87
+
46
88
If everything goes well, your finished image will be in the `deploy/` folder.
47
-
You can then remove the build container with `docker rm pigen_work`
89
+
You can then remove the build container with `docker rm -v pigen_work`
48
90
49
91
If something breaks along the line, you can edit the corresponding scripts, and
50
92
continue:
51
93
52
-
```
94
+
```bash
53
95
CONTINUE=1 ./build-docker.sh
54
96
```
55
97
56
-
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).
98
+
There is a possibility that even when running from a docker container, the
99
+
installation of `qemu-user-static` will silently fail when building the image
100
+
because `binfmt-support`_must be enabled on the underlying kernel_. An easy
101
+
fix is to ensure `binfmt-support` is installed on the host machine before
102
+
starting the `./build-docker.sh` script (or using your own docker build
103
+
solution).
104
+
57
105
58
-
### Raspbian Stage Anatomy
106
+
### Hasspbian Stage Anatomy
59
107
60
108
The build of Hassbian is divided up into several stages for logical clarity
61
109
and modularity. This causes some initial complexity, but it simplifies
@@ -101,15 +149,26 @@ maintenance and allows for more easy customization.
101
149
The original **Stage 4** and **Stage 5** are removed since they are not
102
150
used on the HASSbian image.
103
151
104
-
### Stage specification
105
-
If you wish to build up to a specified stage (such as building up to stage 2 for a lite system), place an empty file named `SKIP` in each of the `./stage` directories you wish not to include.
106
152
107
-
Then remove the `EXPORT*` files from `./stage3` (if building up to stage 2) and add them to `./stage2`.
108
-
109
-
```
110
153
## Example for building a lite system without Home Assistant
111
154
$ touch ./stage3/SKIP
112
155
$ rm stage3/EXPORT*
113
156
$ touch stage3/EXPORT_IMAGE
114
157
```
115
158
If you wish to build further configurations upon (for example) the lite system, you can also delete the contents of `./stage3` and replace with your own contents in the same format.
159
+
160
+
=======
161
+
If you wish to build up to a specified stage (such as building up to stage 2
162
+
for a lite system), place an empty file named `SKIP` in each of the `./stage`
163
+
directories you wish not to include.
164
+
165
+
Then remove the `EXPORT*` files from `./stage4` (if building up to stage 2) or
0 commit comments