##// END OF EJS Templates
Merge branch 'drtyhlpr-master'
vidal -
r224:bf3aed6db1b3 Fusion
parent child
Show More
@@ -1,454 +1,453
1 # rpi23-gen-image
1 # rpi23-gen-image
2 ## Introduction
2 ## Introduction
3
3
4 `rpi23-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for Raspberry Pi 2 (RPi2) and Raspberry Pi 3 (RPi3) computers. The script at this time supports the bootstrapping of the Debian (armhf) releases `jessie`, `stretch` and `buster`. Raspberry Pi 3 images are generated for 32-bit mode only. Raspberry Pi 3 64-bit images can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.11.y```).
4 `rpi23-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for Raspberry Pi 2 (RPi2) and Raspberry Pi 3 (RPi3) computers. The script at this time supports the bootstrapping of the Debian (armhf) releases `jessie`, `stretch` and `buster`. Raspberry Pi 3 images are generated for 32-bit mode only. Raspberry Pi 3 64-bit images can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.11.y```).
5
5
6
7 ## Build dependencies
6 ## Build dependencies
8 The following list of Debian packages must be installed on the build system because they are essentially required for the bootstrapping process. The script will check if all required packages are installed and missing packages will be installed automatically if confirmed by the user.
7 The following list of Debian packages must be installed on the build system because they are essentially required for the bootstrapping process. The script will check if all required packages are installed and missing packages will be installed automatically if confirmed by the user.
9
8
10 ```debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo```
9 ```debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo```
11
10
12 It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf) cross-compiler toolchain.
11 It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf) cross-compiler toolchain.
13
12
14 The script has been tested using the default `crossbuild-essential-armhf` toolchain meta package on Debian Linux `jessie` and `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information.
13 The script has been tested using the default `crossbuild-essential-armhf` toolchain meta package on Debian Linux `jessie` and `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information.
15
14
16 If a Debian Linux `jessie` build system is used it will be required to add the [Debian Cross-toolchains repository](http://emdebian.org/tools/debian/) first:
15 If a Debian Linux `jessie` build system is used it will be required to add the [Debian Cross-toolchains repository](http://emdebian.org/tools/debian/) first:
17
16
18 ```
17 ```
19 echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list
18 echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list
20 sudo -u nobody wget -O - http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
19 sudo -u nobody wget -O - http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
21 dpkg --add-architecture armhf
20 dpkg --add-architecture armhf
22 apt-get update
21 apt-get update
23 ```
22 ```
24
23
25 ## Command-line parameters
24 ## Command-line parameters
26 The script accepts certain command-line parameters to enable or disable specific OS features, services and configuration settings. These parameters are passed to the `rpi23-gen-image.sh` script via (simple) shell-variables. Unlike environment shell-variables (simple) shell-variables are defined at the beginning of the command-line call of the `rpi23-gen-image.sh` script.
25 The script accepts certain command-line parameters to enable or disable specific OS features, services and configuration settings. These parameters are passed to the `rpi23-gen-image.sh` script via (simple) shell-variables. Unlike environment shell-variables (simple) shell-variables are defined at the beginning of the command-line call of the `rpi23-gen-image.sh` script.
27
26
28 ##### Command-line examples:
27 ##### Command-line examples:
29 ```shell
28 ```shell
30 ENABLE_UBOOT=true ./rpi23-gen-image.sh
29 ENABLE_UBOOT=true ./rpi23-gen-image.sh
31 ENABLE_CONSOLE=false ENABLE_IPV6=false ./rpi23-gen-image.sh
30 ENABLE_CONSOLE=false ENABLE_IPV6=false ./rpi23-gen-image.sh
32 ENABLE_WM=xfce4 ENABLE_FBTURBO=true ENABLE_MINBASE=true ./rpi23-gen-image.sh
31 ENABLE_WM=xfce4 ENABLE_FBTURBO=true ENABLE_MINBASE=true ./rpi23-gen-image.sh
33 ENABLE_HARDNET=true ENABLE_IPTABLES=true /rpi23-gen-image.sh
32 ENABLE_HARDNET=true ENABLE_IPTABLES=true /rpi23-gen-image.sh
34 APT_SERVER=ftp.de.debian.org APT_PROXY="http://127.0.0.1:3142/" ./rpi23-gen-image.sh
33 APT_SERVER=ftp.de.debian.org APT_PROXY="http://127.0.0.1:3142/" ./rpi23-gen-image.sh
35 ENABLE_MINBASE=true ./rpi23-gen-image.sh
34 ENABLE_MINBASE=true ./rpi23-gen-image.sh
36 BUILD_KERNEL=true ENABLE_MINBASE=true ENABLE_IPV6=false ./rpi23-gen-image.sh
35 BUILD_KERNEL=true ENABLE_MINBASE=true ENABLE_IPV6=false ./rpi23-gen-image.sh
37 BUILD_KERNEL=true KERNELSRC_DIR=/tmp/linux ./rpi23-gen-image.sh
36 BUILD_KERNEL=true KERNELSRC_DIR=/tmp/linux ./rpi23-gen-image.sh
38 ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
37 ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
39 ENABLE_CRYPTFS=true CRYPTFS_PASSWORD=changeme EXPANDROOT=false ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
38 ENABLE_CRYPTFS=true CRYPTFS_PASSWORD=changeme EXPANDROOT=false ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
40 RELEASE=stretch BUILD_KERNEL=true ./rpi23-gen-image.sh
39 RELEASE=stretch BUILD_KERNEL=true ./rpi23-gen-image.sh
41 RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
40 RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
42 RELEASE=stretch RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
41 RELEASE=stretch RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
43 ```
42 ```
44
43
45 ## Configuration template files
44 ## Configuration template files
46 To avoid long lists of command-line parameters and to help to store the favourite parameter configurations the `rpi23-gen-image.sh` script supports so called configuration template files (`CONFIG_TEMPLATE`=template). These are simple text files located in the `./templates` directory that contain the list of configuration parameters that will be used. New configuration template files can be added to the `./templates` directory.
45 To avoid long lists of command-line parameters and to help to store the favourite parameter configurations the `rpi23-gen-image.sh` script supports so called configuration template files (`CONFIG_TEMPLATE`=template). These are simple text files located in the `./templates` directory that contain the list of configuration parameters that will be used. New configuration template files can be added to the `./templates` directory.
47
46
48 ##### Command-line examples:
47 ##### Command-line examples:
49 ```shell
48 ```shell
50 CONFIG_TEMPLATE=rpi3stretch ./rpi23-gen-image.sh
49 CONFIG_TEMPLATE=rpi3stretch ./rpi23-gen-image.sh
51 CONFIG_TEMPLATE=rpi2stretch ./rpi23-gen-image.sh
50 CONFIG_TEMPLATE=rpi2stretch ./rpi23-gen-image.sh
52 ```
51 ```
53
52
54 ## Supported parameters and settings
53 ## Supported parameters and settings
55 #### APT settings:
54 #### APT settings:
56 ##### `APT_SERVER`="ftp.debian.org"
55 ##### `APT_SERVER`="ftp.debian.org"
57 Set Debian packages server address. Choose a server from the list of Debian worldwide [mirror sites](https://www.debian.org/mirror/list). Using a nearby server will probably speed-up all required downloads within the bootstrapping process.
56 Set Debian packages server address. Choose a server from the list of Debian worldwide [mirror sites](https://www.debian.org/mirror/list). Using a nearby server will probably speed-up all required downloads within the bootstrapping process.
58
57
59 ##### `APT_PROXY`=""
58 ##### `APT_PROXY`=""
60 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once.
59 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once.
61
60
62 ##### `APT_INCLUDES`=""
61 ##### `APT_INCLUDES`=""
63 A comma separated list of additional packages to be installed by debootstrap during bootstrapping.
62 A comma separated list of additional packages to be installed by debootstrap during bootstrapping.
64
63
65 ##### `APT_INCLUDES_LATE`=""
64 ##### `APT_INCLUDES_LATE`=""
66 A comma separated list of additional packages to be installed by apt after bootstrapping and after APT sources are set up. This is useful for packages with pre-depends, which debootstrap do not handle well.
65 A comma separated list of additional packages to be installed by apt after bootstrapping and after APT sources are set up. This is useful for packages with pre-depends, which debootstrap do not handle well.
67
66
68 ---
67 ---
69
68
70 #### General system settings:
69 #### General system settings:
71 ##### `RPI_MODEL`=2
70 ##### `RPI_MODEL`=2
72 Specifiy the target Raspberry Pi hardware model. The script at this time supports the Raspberry Pi models `2` and `3`. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` is used.
71 Specifiy the target Raspberry Pi hardware model. The script at this time supports the Raspberry Pi models `2` and `3`. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` is used.
73
72
74 ##### `RELEASE`="jessie"
73 ##### `RELEASE`="jessie"
75 Set the desired Debian release name. The script at this time supports the bootstrapping of the Debian releases "jessie", "stretch" and "buster". `BUILD_KERNEL`=true will automatically be set if the Debian releases `stretch` or `buster` are used.
74 Set the desired Debian release name. The script at this time supports the bootstrapping of the Debian releases "jessie", "stretch" and "buster". `BUILD_KERNEL`=true will automatically be set if the Debian releases `stretch` or `buster` are used.
76
75
77 ##### `RELEASE_ARCH`="armhf"
76 ##### `RELEASE_ARCH`="armhf"
78 Set the desired Debian release architecture.
77 Set the desired Debian release architecture.
79
78
80 ##### `HOSTNAME`="rpi$RPI_MODEL-$RELEASE"
79 ##### `HOSTNAME`="rpi$RPI_MODEL-$RELEASE"
81 Set system host name. It's recommended that the host name is unique in the corresponding subnet.
80 Set system host name. It's recommended that the host name is unique in the corresponding subnet.
82
81
83 ##### `PASSWORD`="raspberry"
82 ##### `PASSWORD`="raspberry"
84 Set system `root` password. It's **STRONGLY** recommended that you choose a custom password.
83 Set system `root` password. It's **STRONGLY** recommended that you choose a custom password.
85
84
86 ##### `USER_PASSWORD`="raspberry"
85 ##### `USER_PASSWORD`="raspberry"
87 Set password for the created non-root user `USER_NAME`=pi. Ignored if `ENABLE_USER`=false. It's **STRONGLY** recommended that you choose a custom password.
86 Set password for the created non-root user `USER_NAME`=pi. Ignored if `ENABLE_USER`=false. It's **STRONGLY** recommended that you choose a custom password.
88
87
89 ##### `DEFLOCAL`="en_US.UTF-8"
88 ##### `DEFLOCAL`="en_US.UTF-8"
90 Set default system locale. This setting can also be changed inside the running OS using the `dpkg-reconfigure locales` command. Please note that on using this parameter the script will automatically install the required packages `locales`, `keyboard-configuration` and `console-setup`.
89 Set default system locale. This setting can also be changed inside the running OS using the `dpkg-reconfigure locales` command. Please note that on using this parameter the script will automatically install the required packages `locales`, `keyboard-configuration` and `console-setup`.
91
90
92 ##### `TIMEZONE`="Europe/Berlin"
91 ##### `TIMEZONE`="Europe/Berlin"
93 Set default system timezone. All available timezones can be found in the `/usr/share/zoneinfo/` directory. This setting can also be changed inside the running OS using the `dpkg-reconfigure tzdata` command.
92 Set default system timezone. All available timezones can be found in the `/usr/share/zoneinfo/` directory. This setting can also be changed inside the running OS using the `dpkg-reconfigure tzdata` command.
94
93
95 ##### `EXPANDROOT`=true
94 ##### `EXPANDROOT`=true
96 Expand the root partition and filesystem automatically on first boot.
95 Expand the root partition and filesystem automatically on first boot.
97
96
98 ---
97 ---
99
98
100 #### Keyboard settings:
99 #### Keyboard settings:
101 These options are used to configure keyboard layout in `/etc/default/keyboard` for console and Xorg. These settings can also be changed inside the running OS using the `dpkg-reconfigure keyboard-configuration` command.
100 These options are used to configure keyboard layout in `/etc/default/keyboard` for console and Xorg. These settings can also be changed inside the running OS using the `dpkg-reconfigure keyboard-configuration` command.
102
101
103 ##### `XKB_MODEL`=""
102 ##### `XKB_MODEL`=""
104 Set the name of the model of your keyboard type.
103 Set the name of the model of your keyboard type.
105
104
106 ##### `XKB_LAYOUT`=""
105 ##### `XKB_LAYOUT`=""
107 Set the supported keyboard layout(s).
106 Set the supported keyboard layout(s).
108
107
109 ##### `XKB_VARIANT`=""
108 ##### `XKB_VARIANT`=""
110 Set the supported variant(s) of the keyboard layout(s).
109 Set the supported variant(s) of the keyboard layout(s).
111
110
112 ##### `XKB_OPTIONS`=""
111 ##### `XKB_OPTIONS`=""
113 Set extra xkb configuration options.
112 Set extra xkb configuration options.
114
113
115 ---
114 ---
116
115
117 #### Networking settings (DHCP):
116 #### Networking settings (DHCP):
118 This parameter is used to set up networking auto configuration in `/etc/systemd/network/eth.network`. The default location of network configuration files in the Debian `stretch` release was changed to `/lib/systemd/network`.`
117 This parameter is used to set up networking auto configuration in `/etc/systemd/network/eth.network`. The default location of network configuration files in the Debian `stretch` release was changed to `/lib/systemd/network`.`
119
118
120 ##### `ENABLE_DHCP`=true
119 ##### `ENABLE_DHCP`=true
121 Set the system to use DHCP. This requires an DHCP server.
120 Set the system to use DHCP. This requires an DHCP server.
122
121
123 ---
122 ---
124
123
125 #### Networking settings (static):
124 #### Networking settings (static):
126 These parameters are used to set up a static networking configuration in `/etc/systemd/network/eth.network`. The following static networking parameters are only supported if `ENABLE_DHCP` was set to `false`. The default location of network configuration files in the Debian `stretch` release was changed to `/lib/systemd/network`.
125 These parameters are used to set up a static networking configuration in `/etc/systemd/network/eth.network`. The following static networking parameters are only supported if `ENABLE_DHCP` was set to `false`. The default location of network configuration files in the Debian `stretch` release was changed to `/lib/systemd/network`.
127
126
128 ##### `NET_ADDRESS`=""
127 ##### `NET_ADDRESS`=""
129 Set a static IPv4 or IPv6 address and its prefix, separated by "/", eg. "192.169.0.3/24".
128 Set a static IPv4 or IPv6 address and its prefix, separated by "/", eg. "192.169.0.3/24".
130
129
131 ##### `NET_GATEWAY`=""
130 ##### `NET_GATEWAY`=""
132 Set the IP address for the default gateway.
131 Set the IP address for the default gateway.
133
132
134 ##### `NET_DNS_1`=""
133 ##### `NET_DNS_1`=""
135 Set the IP address for the first DNS server.
134 Set the IP address for the first DNS server.
136
135
137 ##### `NET_DNS_2`=""
136 ##### `NET_DNS_2`=""
138 Set the IP address for the second DNS server.
137 Set the IP address for the second DNS server.
139
138
140 ##### `NET_DNS_DOMAINS`=""
139 ##### `NET_DNS_DOMAINS`=""
141 Set the default DNS search domains to use for non fully qualified host names.
140 Set the default DNS search domains to use for non fully qualified host names.
142
141
143 ##### `NET_NTP_1`=""
142 ##### `NET_NTP_1`=""
144 Set the IP address for the first NTP server.
143 Set the IP address for the first NTP server.
145
144
146 ##### `NET_NTP_2`=""
145 ##### `NET_NTP_2`=""
147 Set the IP address for the second NTP server.
146 Set the IP address for the second NTP server.
148
147
149 ---
148 ---
150
149
151 #### Basic system features:
150 #### Basic system features:
152 ##### `ENABLE_CONSOLE`=true
151 ##### `ENABLE_CONSOLE`=true
153 Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system.
152 Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system.
154
153
155 ##### `ENABLE_I2C`=false
154 ##### `ENABLE_I2C`=false
156 Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](http://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
155 Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](http://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
157
156
158 ##### `ENABLE_SPI`=false
157 ##### `ENABLE_SPI`=false
159 Enable SPI interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](http://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
158 Enable SPI interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](http://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
160
159
161 ##### `ENABLE_IPV6`=true
160 ##### `ENABLE_IPV6`=true
162 Enable IPv6 support. The network interface configuration is managed via systemd-networkd.
161 Enable IPv6 support. The network interface configuration is managed via systemd-networkd.
163
162
164 ##### `ENABLE_SSHD`=true
163 ##### `ENABLE_SSHD`=true
165 Install and enable OpenSSH service. The default configuration of the service doesn't allow `root` to login. Please use the user `pi` instead and `su -` or `sudo` to execute commands as root.
164 Install and enable OpenSSH service. The default configuration of the service doesn't allow `root` to login. Please use the user `pi` instead and `su -` or `sudo` to execute commands as root.
166
165
167 ##### `ENABLE_NONFREE`=false
166 ##### `ENABLE_NONFREE`=false
168 Allow the installation of non-free Debian packages that do not comply with the DFSG. This is required to install closed-source firmware binary blobs.
167 Allow the installation of non-free Debian packages that do not comply with the DFSG. This is required to install closed-source firmware binary blobs.
169
168
170 ##### `ENABLE_WIRELESS`=false
169 ##### `ENABLE_WIRELESS`=false
171 Download and install the [closed-source firmware binary blob](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm) that is required to run the internal wireless interface of the Raspberry Pi model `3`. This parameter is ignored if the specified `RPI_MODEL` is not `3`.
170 Download and install the [closed-source firmware binary blob](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm) that is required to run the internal wireless interface of the Raspberry Pi model `3`. This parameter is ignored if the specified `RPI_MODEL` is not `3`.
172
171
173 ##### `ENABLE_RSYSLOG`=true
172 ##### `ENABLE_RSYSLOG`=true
174 If set to false, disable and uninstall rsyslog (so logs will be available only
173 If set to false, disable and uninstall rsyslog (so logs will be available only
175 in journal files)
174 in journal files)
176
175
177 ##### `ENABLE_SOUND`=true
176 ##### `ENABLE_SOUND`=true
178 Enable sound hardware and install Advanced Linux Sound Architecture.
177 Enable sound hardware and install Advanced Linux Sound Architecture.
179
178
180 ##### `ENABLE_HWRANDOM`=true
179 ##### `ENABLE_HWRANDOM`=true
181 Enable Hardware Random Number Generator. Strong random numbers are important for most network based communications that use encryption. It's recommended to be enabled.
180 Enable Hardware Random Number Generator. Strong random numbers are important for most network based communications that use encryption. It's recommended to be enabled.
182
181
183 ##### `ENABLE_MINGPU`=false
182 ##### `ENABLE_MINGPU`=false
184 Minimize the amount of shared memory reserved for the GPU. It doesn't seem to be possible to fully disable the GPU.
183 Minimize the amount of shared memory reserved for the GPU. It doesn't seem to be possible to fully disable the GPU.
185
184
186 ##### `ENABLE_DBUS`=true
185 ##### `ENABLE_DBUS`=true
187 Install and enable D-Bus message bus. Please note that systemd should work without D-bus but it's recommended to be enabled.
186 Install and enable D-Bus message bus. Please note that systemd should work without D-bus but it's recommended to be enabled.
188
187
189 ##### `ENABLE_XORG`=false
188 ##### `ENABLE_XORG`=false
190 Install Xorg open-source X Window System.
189 Install Xorg open-source X Window System.
191
190
192 ##### `ENABLE_WM`=""
191 ##### `ENABLE_WM`=""
193 Install a user defined window manager for the X Window System. To make sure all X related package dependencies are getting installed `ENABLE_XORG` will automatically get enabled if `ENABLE_WM` is used. The `rpi23-gen-image.sh` script has been tested with the following list of window managers: `blackbox`, `openbox`, `fluxbox`, `jwm`, `dwm`, `xfce4`, `awesome`.
192 Install a user defined window manager for the X Window System. To make sure all X related package dependencies are getting installed `ENABLE_XORG` will automatically get enabled if `ENABLE_WM` is used. The `rpi23-gen-image.sh` script has been tested with the following list of window managers: `blackbox`, `openbox`, `fluxbox`, `jwm`, `dwm`, `xfce4`, `awesome`.
194
193
195 ---
194 ---
196
195
197 #### Advanced system features:
196 #### Advanced system features:
198 ##### `ENABLE_MINBASE`=false
197 ##### `ENABLE_MINBASE`=false
199 Use debootstrap script variant `minbase` which only includes essential packages and apt. This will reduce the disk usage by about 65 MB.
198 Use debootstrap script variant `minbase` which only includes essential packages and apt. This will reduce the disk usage by about 65 MB.
200
199
201 ##### `ENABLE_REDUCE`=false
200 ##### `ENABLE_REDUCE`=false
202 Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information.
201 Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information.
203
202
204 ##### `ENABLE_UBOOT`=false
203 ##### `ENABLE_UBOOT`=false
205 Replace the default RPi2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](http://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol.
204 Replace the default RPi2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](http://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol.
206
205
207 ##### `UBOOTSRC_DIR`=""
206 ##### `UBOOTSRC_DIR`=""
208 Path to a directory (`u-boot`) of [U-Boot bootloader sources](http://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot.
207 Path to a directory (`u-boot`) of [U-Boot bootloader sources](http://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot.
209
208
210 ##### `ENABLE_FBTURBO`=false
209 ##### `ENABLE_FBTURBO`=false
211 Install and enable the [hardware accelerated Xorg video driver](https://github.com/ssvb/xf86-video-fbturbo) `fbturbo`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling.
210 Install and enable the [hardware accelerated Xorg video driver](https://github.com/ssvb/xf86-video-fbturbo) `fbturbo`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling.
212
211
213 ##### `FBTURBOSRC_DIR`=""
212 ##### `FBTURBOSRC_DIR`=""
214 Path to a directory (`xf86-video-fbturbo`) of [hardware accelerated Xorg video driver sources](https://github.com/ssvb/xf86-video-fbturbo) that will be copied, configured, build and installed inside the chroot.
213 Path to a directory (`xf86-video-fbturbo`) of [hardware accelerated Xorg video driver sources](https://github.com/ssvb/xf86-video-fbturbo) that will be copied, configured, build and installed inside the chroot.
215
214
216 ##### `ENABLE_IPTABLES`=false
215 ##### `ENABLE_IPTABLES`=false
217 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
216 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
218
217
219 ##### `ENABLE_USER`=true
218 ##### `ENABLE_USER`=true
220 Create non-root user with password `USER_PASSWORD`=raspberry. Unless overridden with `USER_NAME`=user, username will be `pi`.
219 Create non-root user with password `USER_PASSWORD`=raspberry. Unless overridden with `USER_NAME`=user, username will be `pi`.
221
220
222 ##### `USER_NAME`=pi
221 ##### `USER_NAME`=pi
223 Non-root user to create. Ignored if `ENABLE_USER`=false
222 Non-root user to create. Ignored if `ENABLE_USER`=false
224
223
225 ##### `ENABLE_ROOT`=false
224 ##### `ENABLE_ROOT`=false
226 Set root user password so root login will be enabled
225 Set root user password so root login will be enabled
227
226
228 ##### `ENABLE_HARDNET`=false
227 ##### `ENABLE_HARDNET`=false
229 Enable IPv4/IPv6 network stack hardening settings.
228 Enable IPv4/IPv6 network stack hardening settings.
230
229
231 ##### `ENABLE_SPLITFS`=false
230 ##### `ENABLE_SPLITFS`=false
232 Enable having root partition on an USB drive by creating two image files: one for the `/boot/firmware` mount point, and another for `/`.
231 Enable having root partition on an USB drive by creating two image files: one for the `/boot/firmware` mount point, and another for `/`.
233
232
234 ##### `CHROOT_SCRIPTS`=""
233 ##### `CHROOT_SCRIPTS`=""
235 Path to a directory with scripts that should be run in the chroot before the image is finally built. Every executable file in this directory is run in lexicographical order.
234 Path to a directory with scripts that should be run in the chroot before the image is finally built. Every executable file in this directory is run in lexicographical order.
236
235
237 ##### `ENABLE_INITRAMFS`=false
236 ##### `ENABLE_INITRAMFS`=false
238 Create an initramfs that that will be loaded during the Linux startup process. `ENABLE_INITRAMFS` will automatically get enabled if `ENABLE_CRYPTFS`=true. This parameter will be ignored if `BUILD_KERNEL`=false.
237 Create an initramfs that that will be loaded during the Linux startup process. `ENABLE_INITRAMFS` will automatically get enabled if `ENABLE_CRYPTFS`=true. This parameter will be ignored if `BUILD_KERNEL`=false.
239
238
240 ##### `ENABLE_IFNAMES`=true
239 ##### `ENABLE_IFNAMES`=true
241 Enable automatic assignment of predictable, stable network interface names for all local Ethernet, WLAN interfaces. This might create complex and long interface names. This parameter is only supported if the Debian releases `stretch` or `buster` are used.
240 Enable automatic assignment of predictable, stable network interface names for all local Ethernet, WLAN interfaces. This might create complex and long interface names. This parameter is only supported if the Debian releases `stretch` or `buster` are used.
242
241
243 ##### `DISABLE_UNDERVOLT_WARNINGS`=
242 ##### `DISABLE_UNDERVOLT_WARNINGS`=
244 Disable RPi2/3 under-voltage warnings and overlays. Setting the parameter to `1` will disable the warning overlay. Setting it to `2` will additionally allow RPi2/3 turbo mode when low-voltage is present.
243 Disable RPi2/3 under-voltage warnings and overlays. Setting the parameter to `1` will disable the warning overlay. Setting it to `2` will additionally allow RPi2/3 turbo mode when low-voltage is present.
245
244
246 ---
245 ---
247
246
248 #### SSH settings:
247 #### SSH settings:
249 ##### `SSH_ENABLE_ROOT`=false
248 ##### `SSH_ENABLE_ROOT`=false
250 Enable password root login via SSH. This may be a security risk with default password, use only in trusted environments. `ENABLE_ROOT` must be set to `true`.
249 Enable password root login via SSH. This may be a security risk with default password, use only in trusted environments. `ENABLE_ROOT` must be set to `true`.
251
250
252 ##### `SSH_DISABLE_PASSWORD_AUTH`=false
251 ##### `SSH_DISABLE_PASSWORD_AUTH`=false
253 Disable password based SSH authentication. Only public key based SSH (v2) authentication will be supported.
252 Disable password based SSH authentication. Only public key based SSH (v2) authentication will be supported.
254
253
255 ##### `SSH_LIMIT_USERS`=false
254 ##### `SSH_LIMIT_USERS`=false
256 Limit the users that are allowed to login via SSH. Only allow user `USER_NAME`=pi and root if `SSH_ENABLE_ROOT`=true to login. This parameter will be ignored if `dropbear` SSH is used (`REDUCE_SSHD`=true).
255 Limit the users that are allowed to login via SSH. Only allow user `USER_NAME`=pi and root if `SSH_ENABLE_ROOT`=true to login. This parameter will be ignored if `dropbear` SSH is used (`REDUCE_SSHD`=true).
257
256
258 ##### `SSH_ROOT_PUB_KEY`=""
257 ##### `SSH_ROOT_PUB_KEY`=""
259 Add SSH (v2) public key(s) from specified file to `authorized_keys` file to enable public key based SSH (v2) authentication of user `root`. The specified file can also contain multiple SSH (v2) public keys. SSH protocol version 1 is not supported. `ENABLE_ROOT` **and** `SSH_ENABLE_ROOT` must be set to `true`.
258 Add SSH (v2) public key(s) from specified file to `authorized_keys` file to enable public key based SSH (v2) authentication of user `root`. The specified file can also contain multiple SSH (v2) public keys. SSH protocol version 1 is not supported. `ENABLE_ROOT` **and** `SSH_ENABLE_ROOT` must be set to `true`.
260
259
261 ##### `SSH_USER_PUB_KEY`=""
260 ##### `SSH_USER_PUB_KEY`=""
262 Add SSH (v2) public key(s) from specified file to `authorized_keys` file to enable public key based SSH (v2) authentication of user `USER_NAME`=pi. The specified file can also contain multiple SSH (v2) public keys. SSH protocol version 1 is not supported.
261 Add SSH (v2) public key(s) from specified file to `authorized_keys` file to enable public key based SSH (v2) authentication of user `USER_NAME`=pi. The specified file can also contain multiple SSH (v2) public keys. SSH protocol version 1 is not supported.
263
262
264 ---
263 ---
265
264
266 #### Kernel compilation:
265 #### Kernel compilation:
267 ##### `BUILD_KERNEL`=false
266 ##### `BUILD_KERNEL`=false
268 Build and install the latest RPi2/3 Linux kernel. Currently only the default RPi2/3 kernel configuration is used. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` is used.
267 Build and install the latest RPi2/3 Linux kernel. Currently only the default RPi2/3 kernel configuration is used. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` is used.
269
268
270 ##### `CROSS_COMPILE`="arm-linux-gnueabihf-"
269 ##### `CROSS_COMPILE`="arm-linux-gnueabihf-"
271 This sets the cross compile enviornment for the compiler.
270 This sets the cross compile enviornment for the compiler.
272
271
273 ##### `KERNEL_ARCH`="arm"
272 ##### `KERNEL_ARCH`="arm"
274 This sets the kernel architecture for the compiler.
273 This sets the kernel architecture for the compiler.
275
274
276 ##### `KERNEL_IMAGE`="kernel7.img"
275 ##### `KERNEL_IMAGE`="kernel7.img"
277 Name of the image file in the boot partition. If not set, `KERNEL_IMAGE` will be set to "kernel8.img" automatically if building for arm64.
276 Name of the image file in the boot partition. If not set, `KERNEL_IMAGE` will be set to "kernel8.img" automatically if building for arm64.
278
277
279 ##### `KERNEL_BRANCH`=""
278 ##### `KERNEL_BRANCH`=""
280 Name of the requested branch from the GIT location for the RPi Kernel. Default is using the current default branch from the GIT site.
279 Name of the requested branch from the GIT location for the RPi Kernel. Default is using the current default branch from the GIT site.
281
280
282 ##### `QEMU_BINARY`="/usr/bin/qemu-arm-static"
281 ##### `QEMU_BINARY`="/usr/bin/qemu-arm-static"
283 Sets the QEMU enviornment for the Debian archive. If not set, `QEMU_BINARY` will be set to "/usr/bin/qemu-aarch64-static" automatically if building for arm64.
282 Sets the QEMU enviornment for the Debian archive. If not set, `QEMU_BINARY` will be set to "/usr/bin/qemu-aarch64-static" automatically if building for arm64.
284
283
285 ##### `KERNEL_DEFCONFIG`="bcm2709_defconfig"
284 ##### `KERNEL_DEFCONFIG`="bcm2709_defconfig"
286 Sets the default config for kernel compiling. If not set, `KERNEL_DEFCONFIG` will be set to "bcmrpi3\_defconfig" automatically if building for arm64.
285 Sets the default config for kernel compiling. If not set, `KERNEL_DEFCONFIG` will be set to "bcmrpi3\_defconfig" automatically if building for arm64.
287
286
288 ##### `KERNEL_REDUCE`=false
287 ##### `KERNEL_REDUCE`=false
289 Reduce the size of the generated kernel by removing unwanted device, network and filesystem drivers (experimental).
288 Reduce the size of the generated kernel by removing unwanted device, network and filesystem drivers (experimental).
290
289
291 ##### `KERNEL_THREADS`=1
290 ##### `KERNEL_THREADS`=1
292 Number of parallel kernel building threads. If the parameter is left untouched the script will automatically determine the number of CPU cores to set the number of parallel threads to speed the kernel compilation.
291 Number of parallel kernel building threads. If the parameter is left untouched the script will automatically determine the number of CPU cores to set the number of parallel threads to speed the kernel compilation.
293
292
294 ##### `KERNEL_HEADERS`=true
293 ##### `KERNEL_HEADERS`=true
295 Install kernel headers with built kernel.
294 Install kernel headers with built kernel.
296
295
297 ##### `KERNEL_MENUCONFIG`=false
296 ##### `KERNEL_MENUCONFIG`=false
298 Start `make menuconfig` interactive menu-driven kernel configuration. The script will continue after `make menuconfig` was terminated.
297 Start `make menuconfig` interactive menu-driven kernel configuration. The script will continue after `make menuconfig` was terminated.
299
298
300 ##### `KERNEL_REMOVESRC`=true
299 ##### `KERNEL_REMOVESRC`=true
301 Remove all kernel sources from the generated OS image after it was built and installed.
300 Remove all kernel sources from the generated OS image after it was built and installed.
302
301
303 ##### `KERNELSRC_DIR`=""
302 ##### `KERNELSRC_DIR`=""
304 Path to a directory (`linux`) of [RaspberryPi Linux kernel sources](https://github.com/raspberrypi/linux) that will be copied, configured, build and installed inside the chroot.
303 Path to a directory (`linux`) of [RaspberryPi Linux kernel sources](https://github.com/raspberrypi/linux) that will be copied, configured, build and installed inside the chroot.
305
304
306 ##### `KERNELSRC_CLEAN`=false
305 ##### `KERNELSRC_CLEAN`=false
307 Clean the existing kernel sources directory `KERNELSRC_DIR` (using `make mrproper`) after it was copied to the chroot and before the compilation of the kernel has started. This parameter will be ignored if no `KERNELSRC_DIR` was specified or if `KERNELSRC_PREBUILT`=true.
306 Clean the existing kernel sources directory `KERNELSRC_DIR` (using `make mrproper`) after it was copied to the chroot and before the compilation of the kernel has started. This parameter will be ignored if no `KERNELSRC_DIR` was specified or if `KERNELSRC_PREBUILT`=true.
308
307
309 ##### `KERNELSRC_CONFIG`=true
308 ##### `KERNELSRC_CONFIG`=true
310 Run `make bcm2709_defconfig` (and optional `make menuconfig`) to configure the kernel sources before building. This parameter is automatically set to `true` if no existing kernel sources directory was specified using `KERNELSRC_DIR`. This parameter is ignored if `KERNELSRC_PREBUILT`=true.
309 Run `make bcm2709_defconfig` (and optional `make menuconfig`) to configure the kernel sources before building. This parameter is automatically set to `true` if no existing kernel sources directory was specified using `KERNELSRC_DIR`. This parameter is ignored if `KERNELSRC_PREBUILT`=true.
311
310
312 ##### `KERNELSRC_USRCONFIG`=""
311 ##### `KERNELSRC_USRCONFIG`=""
313 Copy own config file to kernel `.config`. If `KERNEL_MENUCONFIG`=true then running after copy.
312 Copy own config file to kernel `.config`. If `KERNEL_MENUCONFIG`=true then running after copy.
314
313
315 ##### `KERNELSRC_PREBUILT`=false
314 ##### `KERNELSRC_PREBUILT`=false
316 With this parameter set to true the script expects the existing kernel sources directory to be already successfully cross-compiled. The parameters `KERNELSRC_CLEAN`, `KERNELSRC_CONFIG`, `KERNELSRC_USRCONFIG` and `KERNEL_MENUCONFIG` are ignored and no kernel compilation tasks are performed.
315 With this parameter set to true the script expects the existing kernel sources directory to be already successfully cross-compiled. The parameters `KERNELSRC_CLEAN`, `KERNELSRC_CONFIG`, `KERNELSRC_USRCONFIG` and `KERNEL_MENUCONFIG` are ignored and no kernel compilation tasks are performed.
317
316
318 ##### `RPI_FIRMWARE_DIR`=""
317 ##### `RPI_FIRMWARE_DIR`=""
319 The directory (`firmware`) containing a local copy of the firmware from the [RaspberryPi firmware project](https://github.com/raspberrypi/firmware). Default is to download the latest firmware directly from the project.
318 The directory (`firmware`) containing a local copy of the firmware from the [RaspberryPi firmware project](https://github.com/raspberrypi/firmware). Default is to download the latest firmware directly from the project.
320
319
321 ---
320 ---
322
321
323 #### Reduce disk usage:
322 #### Reduce disk usage:
324 The following list of parameters is ignored if `ENABLE_REDUCE`=false.
323 The following list of parameters is ignored if `ENABLE_REDUCE`=false.
325
324
326 ##### `REDUCE_APT`=true
325 ##### `REDUCE_APT`=true
327 Configure APT to use compressed package repository lists and no package caching files.
326 Configure APT to use compressed package repository lists and no package caching files.
328
327
329 ##### `REDUCE_DOC`=true
328 ##### `REDUCE_DOC`=true
330 Remove all doc files (harsh). Configure APT to not include doc files on future `apt-get` package installations.
329 Remove all doc files (harsh). Configure APT to not include doc files on future `apt-get` package installations.
331
330
332 ##### `REDUCE_MAN`=true
331 ##### `REDUCE_MAN`=true
333 Remove all man pages and info files (harsh). Configure APT to not include man pages on future `apt-get` package installations.
332 Remove all man pages and info files (harsh). Configure APT to not include man pages on future `apt-get` package installations.
334
333
335 ##### `REDUCE_VIM`=false
334 ##### `REDUCE_VIM`=false
336 Replace `vim-tiny` package by `levee` a tiny vim clone.
335 Replace `vim-tiny` package by `levee` a tiny vim clone.
337
336
338 ##### `REDUCE_BASH`=false
337 ##### `REDUCE_BASH`=false
339 Remove `bash` package and switch to `dash` shell (experimental).
338 Remove `bash` package and switch to `dash` shell (experimental).
340
339
341 ##### `REDUCE_HWDB`=true
340 ##### `REDUCE_HWDB`=true
342 Remove PCI related hwdb files (experimental).
341 Remove PCI related hwdb files (experimental).
343
342
344 ##### `REDUCE_SSHD`=true
343 ##### `REDUCE_SSHD`=true
345 Replace `openssh-server` with `dropbear`.
344 Replace `openssh-server` with `dropbear`.
346
345
347 ##### `REDUCE_LOCALE`=true
346 ##### `REDUCE_LOCALE`=true
348 Remove all `locale` translation files.
347 Remove all `locale` translation files.
349
348
350 ---
349 ---
351
350
352 #### Encrypted root partition:
351 #### Encrypted root partition:
353 ##### `ENABLE_CRYPTFS`=false
352 ##### `ENABLE_CRYPTFS`=false
354 Enable full system encryption with dm-crypt. Setup a fully LUKS encrypted root partition (aes-xts-plain64:sha512) and generate required initramfs. The /boot directory will not be encrypted. This parameter will be ignored if `BUILD_KERNEL`=false. `ENABLE_CRYPTFS` is experimental. SSH-to-initramfs is currently not supported but will be soon - feel free to help.
353 Enable full system encryption with dm-crypt. Setup a fully LUKS encrypted root partition (aes-xts-plain64:sha512) and generate required initramfs. The /boot directory will not be encrypted. This parameter will be ignored if `BUILD_KERNEL`=false. `ENABLE_CRYPTFS` is experimental. SSH-to-initramfs is currently not supported but will be soon - feel free to help.
355
354
356 ##### `CRYPTFS_PASSWORD`=""
355 ##### `CRYPTFS_PASSWORD`=""
357 Set password of the encrypted root partition. This parameter is mandatory if `ENABLE_CRYPTFS`=true.
356 Set password of the encrypted root partition. This parameter is mandatory if `ENABLE_CRYPTFS`=true.
358
357
359 ##### `CRYPTFS_MAPPING`="secure"
358 ##### `CRYPTFS_MAPPING`="secure"
360 Set name of dm-crypt managed device-mapper mapping.
359 Set name of dm-crypt managed device-mapper mapping.
361
360
362 ##### `CRYPTFS_CIPHER`="aes-xts-plain64:sha512"
361 ##### `CRYPTFS_CIPHER`="aes-xts-plain64:sha512"
363 Set cipher specification string. `aes-xts*` ciphers are strongly recommended.
362 Set cipher specification string. `aes-xts*` ciphers are strongly recommended.
364
363
365 ##### `CRYPTFS_XTSKEYSIZE`=512
364 ##### `CRYPTFS_XTSKEYSIZE`=512
366 Sets key size in bits. The argument has to be a multiple of 8.
365 Sets key size in bits. The argument has to be a multiple of 8.
367
366
368 ---
367 ---
369
368
370 #### Build settings:
369 #### Build settings:
371 ##### `BASEDIR`=$(pwd)/images/${RELEASE}
370 ##### `BASEDIR`=$(pwd)/images/${RELEASE}
372 Set a path to a working directory used by the script to generate an image.
371 Set a path to a working directory used by the script to generate an image.
373
372
374 ##### `IMAGE_NAME`=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}
373 ##### `IMAGE_NAME`=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}
375 Set a filename for the output file(s). Note: the script will create $IMAGE_NAME.img if `ENABLE_SPLITFS`=false or $IMAGE_NAME-frmw.img and $IMAGE_NAME-root.img if `ENABLE_SPLITFS`=true. Note 2: If the KERNEL_BRANCH is not set, the word "CURRENT" is used.
374 Set a filename for the output file(s). Note: the script will create $IMAGE_NAME.img if `ENABLE_SPLITFS`=false or $IMAGE_NAME-frmw.img and $IMAGE_NAME-root.img if `ENABLE_SPLITFS`=true. Note 2: If the KERNEL_BRANCH is not set, the word "CURRENT" is used.
376
375
377 ## Understanding the script
376 ## Understanding the script
378 The functions of this script that are required for the different stages of the bootstrapping are split up into single files located inside the `bootstrap.d` directory. During the bootstrapping every script in this directory gets executed in lexicographical order:
377 The functions of this script that are required for the different stages of the bootstrapping are split up into single files located inside the `bootstrap.d` directory. During the bootstrapping every script in this directory gets executed in lexicographical order:
379
378
380 | Script | Description |
379 | Script | Description |
381 | --- | --- |
380 | --- | --- |
382 | `10-bootstrap.sh` | Debootstrap basic system |
381 | `10-bootstrap.sh` | Debootstrap basic system |
383 | `11-apt.sh` | Setup APT repositories |
382 | `11-apt.sh` | Setup APT repositories |
384 | `12-locale.sh` | Setup Locales and keyboard settings |
383 | `12-locale.sh` | Setup Locales and keyboard settings |
385 | `13-kernel.sh` | Build and install RPi2/3 Kernel |
384 | `13-kernel.sh` | Build and install RPi2/3 Kernel |
386 | `14-fstab.sh` | Setup fstab and initramfs |
385 | `14-fstab.sh` | Setup fstab and initramfs |
387 | `15-rpi-config.sh` | Setup RPi2/3 config and cmdline |
386 | `15-rpi-config.sh` | Setup RPi2/3 config and cmdline |
388 | `20-networking.sh` | Setup Networking |
387 | `20-networking.sh` | Setup Networking |
389 | `21-firewall.sh` | Setup Firewall |
388 | `21-firewall.sh` | Setup Firewall |
390 | `30-security.sh` | Setup Users and Security settings |
389 | `30-security.sh` | Setup Users and Security settings |
391 | `31-logging.sh` | Setup Logging |
390 | `31-logging.sh` | Setup Logging |
392 | `32-sshd.sh` | Setup SSH and public keys |
391 | `32-sshd.sh` | Setup SSH and public keys |
393 | `41-uboot.sh` | Build and Setup U-Boot |
392 | `41-uboot.sh` | Build and Setup U-Boot |
394 | `42-fbturbo.sh` | Build and Setup fbturbo Xorg driver |
393 | `42-fbturbo.sh` | Build and Setup fbturbo Xorg driver |
395 | `50-firstboot.sh` | First boot actions |
394 | `50-firstboot.sh` | First boot actions |
396 | `99-reduce.sh` | Reduce the disk space usage |
395 | `99-reduce.sh` | Reduce the disk space usage |
397
396
398 All the required configuration files that will be copied to the generated OS image are located inside the `files` directory. It is not recommended to modify these configuration files manually.
397 All the required configuration files that will be copied to the generated OS image are located inside the `files` directory. It is not recommended to modify these configuration files manually.
399
398
400 | Directory | Description |
399 | Directory | Description |
401 | --- | --- |
400 | --- | --- |
402 | `apt` | APT management configuration files |
401 | `apt` | APT management configuration files |
403 | `boot` | Boot and RPi2/3 configuration files |
402 | `boot` | Boot and RPi2/3 configuration files |
404 | `dpkg` | Package Manager configuration |
403 | `dpkg` | Package Manager configuration |
405 | `etc` | Configuration files and rc scripts |
404 | `etc` | Configuration files and rc scripts |
406 | `firstboot` | Scripts that get executed on first boot |
405 | `firstboot` | Scripts that get executed on first boot |
407 | `initramfs` | Initramfs scripts |
406 | `initramfs` | Initramfs scripts |
408 | `iptables` | Firewall configuration files |
407 | `iptables` | Firewall configuration files |
409 | `locales` | Locales configuration |
408 | `locales` | Locales configuration |
410 | `modules` | Kernel Modules configuration |
409 | `modules` | Kernel Modules configuration |
411 | `mount` | Fstab configuration |
410 | `mount` | Fstab configuration |
412 | `network` | Networking configuration files |
411 | `network` | Networking configuration files |
413 | `sysctl.d` | Swapping and Network Hardening configuration |
412 | `sysctl.d` | Swapping and Network Hardening configuration |
414 | `xorg` | fbturbo Xorg driver configuration |
413 | `xorg` | fbturbo Xorg driver configuration |
415
414
416 ## Custom packages and scripts
415 ## Custom packages and scripts
417 Debian custom packages, i.e. those not in the debian repositories, can be installed by placing them in the `packages` directory. They are installed immediately after packages from the repositories are installed. Any dependencies listed in the custom packages will be downloaded automatically from the repositories. Do not list these custom packages in `APT_INCLUDES`.
416 Debian custom packages, i.e. those not in the debian repositories, can be installed by placing them in the `packages` directory. They are installed immediately after packages from the repositories are installed. Any dependencies listed in the custom packages will be downloaded automatically from the repositories. Do not list these custom packages in `APT_INCLUDES`.
418
417
419 Scripts in the custom.d directory will be executed after all other installation is complete but before the image is created.
418 Scripts in the custom.d directory will be executed after all other installation is complete but before the image is created.
420
419
421 ## Logging of the bootstrapping process
420 ## Logging of the bootstrapping process
422 All information related to the bootstrapping process and the commands executed by the `rpi23-gen-image.sh` script can easily be saved into a logfile. The common shell command `script` can be used for this purpose:
421 All information related to the bootstrapping process and the commands executed by the `rpi23-gen-image.sh` script can easily be saved into a logfile. The common shell command `script` can be used for this purpose:
423
422
424 ```shell
423 ```shell
425 script -c 'APT_SERVER=ftp.de.debian.org ./rpi23-gen-image.sh' ./build.log
424 script -c 'APT_SERVER=ftp.de.debian.org ./rpi23-gen-image.sh' ./build.log
426 ```
425 ```
427
426
428 ## Flashing the image file
427 ## Flashing the image file
429 After the image file was successfully created by the `rpi23-gen-image.sh` script it can be copied to the microSD card that will be used by the RPi2/3 computer. This can be performed by using the tools `bmaptool` or `dd`. Using `bmaptool` will probably speed-up the copy process because `bmaptool` copies more wisely than `dd`.
428 After the image file was successfully created by the `rpi23-gen-image.sh` script it can be copied to the microSD card that will be used by the RPi2/3 computer. This can be performed by using the tools `bmaptool` or `dd`. Using `bmaptool` will probably speed-up the copy process because `bmaptool` copies more wisely than `dd`.
430
429
431 ##### Flashing examples:
430 ##### Flashing examples:
432 ```shell
431 ```shell
433 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie.img /dev/mmcblk0
432 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie.img /dev/mmcblk0
434 dd bs=4M if=./images/jessie/2017-01-23-rpi3-jessie.img of=/dev/mmcblk0
433 dd bs=4M if=./images/jessie/2017-01-23-rpi3-jessie.img of=/dev/mmcblk0
435 ```
434 ```
436 If you have set `ENABLE_SPLITFS`, copy the `-frmw` image on the microSD card, then the `-root` one on the USB drive:
435 If you have set `ENABLE_SPLITFS`, copy the `-frmw` image on the microSD card, then the `-root` one on the USB drive:
437 ```shell
436 ```shell
438 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-frmw.img /dev/mmcblk0
437 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-frmw.img /dev/mmcblk0
439 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-root.img /dev/sdc
438 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-root.img /dev/sdc
440 ```
439 ```
441 ## Weekly image builds
440 ## Weekly image builds
442 The image files are provided by JRWR'S I/O PORT and are built once a Sunday at midnight UTC!
441 The image files are provided by JRWR'S I/O PORT and are built once a Sunday at midnight UTC!
443 * [Debian Stretch Raspberry Pi2/3 Weekly Image Builds](https://jrwr.io/doku.php?id=projects:debianpi)
442 * [Debian Stretch Raspberry Pi2/3 Weekly Image Builds](https://jrwr.io/doku.php?id=projects:debianpi)
444
443
445 ## External links and references
444 ## External links and references
446 * [Debian worldwide mirror sites](https://www.debian.org/mirror/list)
445 * [Debian worldwide mirror sites](https://www.debian.org/mirror/list)
447 * [Debian Raspberry Pi 2 Wiki](https://wiki.debian.org/RaspberryPi2)
446 * [Debian Raspberry Pi 2 Wiki](https://wiki.debian.org/RaspberryPi2)
448 * [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains)
447 * [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains)
449 * [Official Raspberry Pi Firmware on github](https://github.com/raspberrypi/firmware)
448 * [Official Raspberry Pi Firmware on github](https://github.com/raspberrypi/firmware)
450 * [Official Raspberry Pi Kernel on github](https://github.com/raspberrypi/linux)
449 * [Official Raspberry Pi Kernel on github](https://github.com/raspberrypi/linux)
451 * [U-BOOT git repository](http://git.denx.de/?p=u-boot.git;a=summary)
450 * [U-BOOT git repository](http://git.denx.de/?p=u-boot.git;a=summary)
452 * [Xorg DDX driver fbturbo](https://github.com/ssvb/xf86-video-fbturbo)
451 * [Xorg DDX driver fbturbo](https://github.com/ssvb/xf86-video-fbturbo)
453 * [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm)
452 * [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm)
454 * [Collabora RPi2 Kernel precompiled](https://repositories.collabora.co.uk/debian/)
453 * [Collabora RPi2 Kernel precompiled](https://repositories.collabora.co.uk/debian/)
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant