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
README.md: Describe more config variables, cleanup
Added some documentation of environment variables to README.md,
specifically WORK_DIR and DEPLOY_DIR. Explicitly did not include
SCRIPT_DIR at this time because that appears to require some small work
before it can be changed.
Took the chance for some other syntax cleanups while I was at it, mostly
breaking long lines and inserting whitespace where some Markdown parsers
require it.
The file `depends` contains a list of tools needed. The format of this
20
+
package is `<tool>[:<debian-package>]`.
21
+
10
22
11
23
## Config
12
24
@@ -29,29 +41,57 @@ The following environment variables are supported:
29
41
will not be included in the image, making it safe to use an `apt-cacher` or
30
42
similar package for development.
31
43
44
+
*`BASE_DIR` (Default: location of `build.sh`)
45
+
46
+
**CAUTION**: Currently, changing this value will probably break build.sh
47
+
48
+
Top-level directory for `pi-gen`. Contains stage directories, build
49
+
scripts, and by default both work and deployment directories.
50
+
51
+
*`WORK_DIR` (Default: `"$BASE_DIR/work"`)
52
+
53
+
Directory in which `pi-gen` builds the target system. This value can be
54
+
changed if you have a suitably large, fast storage location for stages to
55
+
be built and cached. Note, `WORK_DIR` stores a complete copy of the target
56
+
system for each build stage, amounting to tens of gigabytes in the case of
57
+
Raspbian.
58
+
59
+
*`DEPLOY_DIR` (Default: `"$BASE_DIR/deploy"`)
60
+
61
+
Output directory for target system images and NOOBS bundles.
62
+
63
+
32
64
A simple example for building Raspbian:
33
65
34
66
```bash
35
67
IMG_NAME='Raspbian'
36
68
```
37
69
70
+
38
71
## Docker Build
39
72
40
73
```bash
41
74
vi config # Edit your config file. See above.
42
75
./build-docker.sh
43
76
```
77
+
44
78
If everything goes well, your finished image will be in the `deploy/` folder.
45
79
You can then remove the build container with `docker rm pigen_work`
46
80
47
81
If something breaks along the line, you can edit the corresponding scripts, and
48
82
continue:
49
83
50
-
```
84
+
```bash
51
85
CONTINUE=1 ./build-docker.sh
52
86
```
53
87
54
-
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).
88
+
There is a possibility that even when running from a docker container, the
89
+
installation of `qemu-user-static` will silently fail when building the image
90
+
because `binfmt-support`_must be enabled on the underlying kernel_. An easy
91
+
fix is to ensure `binfmt-support` is installed on the host machine before
92
+
starting the `./build-docker.sh` script (or using your own docker build
93
+
solution).
94
+
55
95
56
96
## Stage Anatomy
57
97
@@ -104,14 +144,22 @@ maintenance and allows for more easy customization.
104
144
the stage that installs all of the things that make Raspbian friendly to
105
145
new users.
106
146
147
+
107
148
### Stage specification
108
-
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.
109
149
110
-
Then remove the `EXPORT*` files from `./stage4` (if building up to stage 2) or from `./stage2` (if building a minimal system).
150
+
If you wish to build up to a specified stage (such as building up to stage 2
151
+
for a lite system), place an empty file named `SKIP` in each of the `./stage`
152
+
directories you wish not to include.
111
153
112
-
```
154
+
Then remove the `EXPORT*` files from `./stage4` (if building up to stage 2) or
155
+
from `./stage2` (if building a minimal system).
156
+
157
+
```bash
113
158
# Example for building a lite system
114
-
$ touch ./stage3/SKIP ./stage4/SKIP
115
-
$ rm stage4/EXPORT*
159
+
touch ./stage3/SKIP ./stage4/SKIP
160
+
rm stage4/EXPORT*
116
161
```
117
-
If you wish to build further configurations upon (for example) the lite system, you can also delete the contents of `./stage3` and `./stage4` and replace with your own contents in the same format.
162
+
163
+
If you wish to build further configurations upon (for example) the lite
164
+
system, you can also delete the contents of `./stage3` and `./stage4` and
165
+
replace with your own contents in the same format.
0 commit comments