##// END OF EJS Templates
Merge pull request #25 from g-vidal/drtyhlpr-master...
Gérard Vidal -
r628:dc259c47f4af Fusion
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -1,549 +1,552
1 1 # rpi23-gen-image
2 2 ## Introduction
3 `rpi23-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for all Raspberry Pi computers. The script at this time supports the bootstrapping of the Debian (armhf/armel) releases `stretch` and `buster`. Raspberry Pi 0/1/2/3 images are generated for 32-bit mode only. Raspberry Pi 3 supports 64-bit images that can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.14.y```).
3
4
5 `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```).
6
4 7
5 8
6 9 ## Build dependencies
7 10 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.
8 11
9 12 ```debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo```
10 13
11 14 It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the Raspberry 3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf/armel) cross-compiler toolchain.
12 15
13 16 The script has been tested using the default `crossbuild-essential-armhf` and `crossbuild-essential-armel` toolchain meta packages on Debian Linux `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information.
14 17
15 18 ## Command-line parameters
16 19 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.
17 20
18 21 ##### Command-line examples:
19 22 ```shell
20 23 ENABLE_UBOOT=true ./rpi23-gen-image.sh
21 24 ENABLE_CONSOLE=false ENABLE_IPV6=false ./rpi23-gen-image.sh
22 25 ENABLE_WM=xfce4 ENABLE_FBTURBO=true ENABLE_MINBASE=true ./rpi23-gen-image.sh
23 26 ENABLE_HARDNET=true ENABLE_IPTABLES=true /rpi23-gen-image.sh
24 27 APT_SERVER=ftp.de.debian.org APT_PROXY="http://127.0.0.1:3142/" ./rpi23-gen-image.sh
25 28 ENABLE_MINBASE=true ./rpi23-gen-image.sh
26 29 BUILD_KERNEL=true ENABLE_MINBASE=true ENABLE_IPV6=false ./rpi23-gen-image.sh
27 30 BUILD_KERNEL=true KERNELSRC_DIR=/tmp/linux ./rpi23-gen-image.sh
28 31 ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
29 32 ENABLE_CRYPTFS=true CRYPTFS_PASSWORD=changeme EXPANDROOT=false ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ./rpi23-gen-image.sh
30 33 RELEASE=stretch BUILD_KERNEL=true ./rpi23-gen-image.sh
31 34 RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
32 35 RELEASE=stretch RPI_MODEL=3 ENABLE_WIRELESS=true ENABLE_MINBASE=true BUILD_KERNEL=true ./rpi23-gen-image.sh
33 36 ```
34 37
35 38 ## Configuration template files
36 39 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.
37 40
38 41 ##### Command-line examples:
39 42 ```shell
40 43 CONFIG_TEMPLATE=rpi3stretch ./rpi23-gen-image.sh
41 44 CONFIG_TEMPLATE=rpi2stretch ./rpi23-gen-image.sh
42 45 ```
43 46
44 47 ## Supported parameters and settings
45 48 #### APT settings:
46 49 ##### `APT_SERVER`="ftp.debian.org"
47 50 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.
48 51
49 52 ##### `APT_PROXY`=""
50 53 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. If `apt-cacher-ng` is running on default `http://127.0.0.1:3142` it is autodetected and you don't need to set this.
51 54
52 55 ##### `KEEP_APT_PROXY`=false
53 56 Keep the APT_PROXY settings used in the bootsrapping process in the generated image.
54 57
55 58 ##### `APT_INCLUDES`=""
56 59 A comma-separated list of additional packages to be installed by debootstrap during bootstrapping.
57 60
58 61 ##### `APT_INCLUDES_LATE`=""
59 62 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.
60 63
61 64 ---
62 65
63 66 #### General system settings:
64 67 ##### `SET_ARCH`=32
65 68 Set Architecture to default 32bit. If you want to compile 64-bit (RPI3 or RPI3+) set it to `64`. This option will set every needed cross-compiler or board specific option for a successful build.
66 69
67 70 ##### `RPI_MODEL`=2
68 71 Specify the target Raspberry Pi hardware model. The script at this time supports the following Raspberry Pi models:
69 72 - `0` = Raspberry Pi 0 and Raspberry Pi 0 W
70 73 - `1` = Raspberry Pi 1 model A and B
71 74 - `1P` = Raspberry Pi 1 model B+ and A+
72 75 - `2` = Raspberry Pi 2 model B
73 76 - `3` = Raspberry Pi 3 model B
74 77 - `3P` = Raspberry Pi 3 model B+
75 78
76 79 ##### `RELEASE`="buster"
77 80 Set the desired Debian release name. The script at this time supports the bootstrapping of the Debian releases `stretch` and `buster`.
78 81
79 82 ##### `RELEASE_ARCH`="armhf"
80 83 Set the desired Debian release architecture.
81 84
82 85 ##### `HOSTNAME`="rpi$RPI_MODEL-$RELEASE"
83 86 Set system hostname. It's recommended that the hostname is unique in the corresponding subnet.
84 87
85 88 ##### `PASSWORD`="raspberry"
86 89 Set system `root` password. It's **STRONGLY** recommended that you choose a custom password.
87 90
88 91 ##### `USER_PASSWORD`="raspberry"
89 92 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.
90 93
91 94 ##### `DEFLOCAL`="en_US.UTF-8"
92 95 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`.
93 96
94 97 ##### `TIMEZONE`="Europe/Berlin"
95 98 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.
96 99
97 100 ##### `EXPANDROOT`=true
98 101 Expand the root partition and filesystem automatically on first boot.
99 102
100 103 ##### `ENABLE_DPHYSSWAP`=true
101 104 Enable swap. The size of the swapfile is chosen relative to the size of the root partition. It'll use the `dphys-swapfile` package for that.
102 105
103 106 ##### `ENABLE_QEMU`=false
104 107 Generate kernel (`vexpress_defconfig`), file system image (`qcow2`) and DTB files that can be used for QEMU full system emulation (`vexpress-A15`). The output files are stored in the `$(pwd)/images/qemu` directory. You can find more information about running the generated image in the QEMU section of this readme file.
105 108
106 109 ---
107 110
108 111 #### Keyboard settings:
109 112 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.
110 113
111 114 ##### `XKB_MODEL`=""
112 115 Set the name of the model of your keyboard type.
113 116
114 117 ##### `XKB_LAYOUT`=""
115 118 Set the supported keyboard layout(s).
116 119
117 120 ##### `XKB_VARIANT`=""
118 121 Set the supported variant(s) of the keyboard layout(s).
119 122
120 123 ##### `XKB_OPTIONS`=""
121 124 Set extra xkb configuration options.
122 125
123 126 ---
124 127
125 128 #### Networking settings (DHCP):
126 129 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`.`
127 130
128 131 ##### `ENABLE_DHCP`=true
129 132 Set the system to use DHCP. This requires an DHCP server.
130 133
131 134 ---
132 135
133 136 #### Networking settings (static):
134 137 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`.
135 138
136 139 ##### `NET_ADDRESS`=""
137 140 Set a static IPv4 or IPv6 address and its prefix, separated by "/", eg. "192.169.0.3/24".
138 141
139 142 ##### `NET_GATEWAY`=""
140 143 Set the IP address for the default gateway.
141 144
142 145 ##### `NET_DNS_1`=""
143 146 Set the IP address for the first DNS server.
144 147
145 148 ##### `NET_DNS_2`=""
146 149 Set the IP address for the second DNS server.
147 150
148 151 ##### `NET_DNS_DOMAINS`=""
149 152 Set the default DNS search domains to use for non fully qualified hostnames.
150 153
151 154 ##### `NET_NTP_1`=""
152 155 Set the IP address for the first NTP server.
153 156
154 157 ##### `NET_NTP_2`=""
155 158 Set the IP address for the second NTP server.
156 159
157 160 ---
158 161
159 162 #### Basic system features:
160 163 ##### `ENABLE_CONSOLE`=true
161 164 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. On RPI `0` `3` `3P` the CPU speed is locked at lowest speed.
162 165
163 166 ##### `ENABLE_PRINTK`=false
164 167 Enables printing kernel messages to konsole. printk is `3 4 1 3` as in raspbian.
165 168
166 169 ##### `ENABLE_BLUETOOTH`=false
167 170 Enable onboard Bluetooth interface on the RPi0/3/3P. See: [Configuring the GPIO serial port on Raspbian jessie and stretch](https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/).
168 171
169 172 ##### `ENABLE_MINIUART_OVERLAY`=false
170 173 Enable Bluetooth to use this. Adds overlay to swap UART0 with UART1. Enabling (slower) Bluetooth and full speed serial console. - RPI `0` `3` `3P` have a fast `hardware UART0` (ttyAMA0) and a `mini UART1` (ttyS0)! RPI `1` `1P` `2` only have a `hardware UART0`. `UART0` is considered better, because is faster and more stable than `mini UART1`. By default the Bluetooth modem is mapped to the `hardware UART0` and `mini UART` is used for console. The `mini UART` is a problem for the serial console, because its baudrate depends on the CPU frequency, which is changing on runtime. Resulting in a volatile baudrate and thus in an unusable serial console.
171 174
172 175 ##### `ENABLE_TURBO`=false
173 176 Enable Turbo mode. This setting locks cpu at the highest frequency. As setting ENABLE_CONSOLE=true locks RPI to lowest CPU speed, this is can be used additionally to lock cpu hat max speed. Need a good power supply and probably cooling for the Raspberry PI.
174 177
175 178 ##### `ENABLE_I2C`=false
176 179 Enable I2C interface on the RPi 0/1/2/3. Please check the [RPi 0/1/2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
177 180
178 181 ##### `ENABLE_SPI`=false
179 182 Enable SPI interface on the RPi 0/1/2/3. Please check the [RPi 0/1/2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
180 183
181 184 ##### `ENABLE_IPV6`=true
182 185 Enable IPv6 support. The network interface configuration is managed via systemd-networkd.
183 186
184 187 ##### `ENABLE_SSHD`=true
185 188 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.
186 189
187 190 ##### `ENABLE_NONFREE`=false
188 191 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.
189 192
190 193 ##### `ENABLE_WIRELESS`=false
191 194 Download and install the [closed-source firmware binary blob](https://github.com/RPi-Distro/firmware-nonfree/raw/master/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`.
192 195
193 196 ##### `ENABLE_RSYSLOG`=true
194 197 If set to false, disable and uninstall rsyslog (so logs will be available only in journal files)
195 198
196 199 ##### `ENABLE_SOUND`=true
197 200 Enable sound hardware and install Advanced Linux Sound Architecture.
198 201
199 202 ##### `ENABLE_HWRANDOM`=true
200 203 Enable Hardware Random Number Generator. Strong random numbers are important for most network-based communications that use encryption. It's recommended to be enabled.
201 204
202 205 ##### `ENABLE_MINGPU`=false
203 206 Minimize the amount of shared memory reserved for the GPU. It doesn't seem to be possible to fully disable the GPU.
204 207
205 208 ##### `ENABLE_DBUS`=true
206 209 Install and enable D-Bus message bus. Please note that systemd should work without D-bus but it's recommended to be enabled.
207 210
208 211 ##### `ENABLE_XORG`=false
209 212 Install Xorg open-source X Window System.
210 213
211 214 ##### `ENABLE_WM`=""
212 215 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`.
213 216
214 217 ##### `ENABLE_SYSVINIT`=false
215 218 Support for halt,init,poweroff,reboot,runlevel,shutdown,telinit commands
216 219
217 220 ---
218 221
219 222 #### Advanced system features:
220 223 ##### `ENABLE_SYSTEMDSWAP`=false
221 224 Enables [Systemd-swap service](https://github.com/Nefelim4ag/systemd-swap). Usefull if `KERNEL_ZSWAP` is enabled.
222 225
223 226 ##### `ENABLE_MINBASE`=false
224 227 Use debootstrap script variant `minbase` which only includes essential packages and apt. This will reduce the disk usage by about 65 MB.
225 228
226 229 ##### `ENABLE_REDUCE`=false
227 230 Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information.
228 231
229 232 ##### `ENABLE_UBOOT`=false
230 233 Replace the default RPi 0/1/2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol.
231 234
232 235 ##### `UBOOTSRC_DIR`=""
233 236 Path to a directory (`u-boot`) of [U-Boot bootloader sources](https://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot.
234 237
235 238 ##### `ENABLE_FBTURBO`=false
236 239 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.
237 240
238 241 ##### `FBTURBOSRC_DIR`=""
239 242 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.
240 243
241 244 ##### `ENABLE_VIDEOCORE`=false
242 245 Install and enable the [ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) `vcgencmd`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling.
243 246
244 247 ##### `VIDEOCORESRC_DIR`=""
245 248 Path to a directory (`userland`) of [ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) that will be copied, configured, build and installed inside the chroot.
246 249
247 250 ##### `ENABLE_NEXMON`=false
248 251 Install and enable the [Source code for a C-based firmware patching framework for Broadcom/Cypress WiFi chips that enables you to write your own firmware patches, for example, to enable monitor mode with radiotap headers and frame injection](https://github.com/seemoo-lab/nexmon.git).
249 252
250 253 ##### `NEXMONSRC_DIR`=""
251 254 Path to a directory (`nexmon`) of [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) that will be copied, configured, build and installed inside the chroot.
252 255
253 256 ##### `ENABLE_IPTABLES`=false
254 257 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
255 258
256 259 ##### `ENABLE_USER`=true
257 260 Create non-root user with password `USER_PASSWORD`=raspberry. Unless overridden with `USER_NAME`=user, the username will be `pi`.
258 261
259 262 ##### `USER_NAME`=pi
260 263 Non-root user to create. Ignored if `ENABLE_USER`=false
261 264
262 265 ##### `ENABLE_ROOT`=false
263 266 Set root user password so root login will be enabled
264 267
265 268 ##### `ENABLE_HARDNET`=false
266 269 Enable IPv4/IPv6 network stack hardening settings.
267 270
268 271 ##### `ENABLE_SPLITFS`=false
269 272 Enable having root partition on an USB drive by creating two image files: one for the `/boot/firmware` mount point, and another for `/`.
270 273
271 274 ##### `CHROOT_SCRIPTS`=""
272 275 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.
273 276
274 277 ##### `ENABLE_INITRAMFS`=false
275 278 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.
276 279
277 280 ##### `ENABLE_IFNAMES`=true
278 281 Enable automatic assignment of predictable, stable network interface names for all local Ethernet, WLAN interfaces. This might create complex and long interface names.
279 282
280 283 ##### `ENABLE_SPLASH`=true
281 284 Enable default Raspberry Pi boot up rainbow splash screen.
282 285
283 286 ##### `ENABLE_LOGO`=true
284 287 Enable default Raspberry Pi console logo (image of four raspberries in the top left corner).
285 288
286 289 ##### `ENABLE_SILENT_BOOT`=false
287 290 Set the verbosity of console messages shown during boot up to a strict minimum.
288 291
289 292 ##### `DISABLE_UNDERVOLT_WARNINGS`=
290 293 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.
291 294
292 295 ---
293 296
294 297 #### SSH settings:
295 298 ##### `SSH_ENABLE_ROOT`=false
296 299 Enable password-based root login via SSH. This may be a security risk with the default password set, use only in trusted environments. `ENABLE_ROOT` must be set to `true`.
297 300
298 301 ##### `SSH_DISABLE_PASSWORD_AUTH`=false
299 302 Disable password-based SSH authentication. Only public key based SSH (v2) authentication will be supported.
300 303
301 304 ##### `SSH_LIMIT_USERS`=false
302 305 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).
303 306
304 307 ##### `SSH_ROOT_PUB_KEY`=""
305 308 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`.
306 309
307 310 ##### `SSH_USER_PUB_KEY`=""
308 311 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.
309 312
310 313 ---
311 314
312 315 #### Kernel compilation:
313 316 ##### `BUILD_KERNEL`=true
314 317 Build and install the latest RPi 0/1/2/3 Linux kernel. Currently only the default RPi 0/1/2/3 kernel configuration is used.
315 318
316 319 ##### `CROSS_COMPILE`="arm-linux-gnueabihf-"
317 320 This sets the cross-compile environment for the compiler.
318 321
319 322 ##### `KERNEL_ARCH`="arm"
320 323 This sets the kernel architecture for the compiler.
321 324
322 325 ##### `KERNEL_IMAGE`="kernel7.img"
323 326 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.
324 327
325 328 ##### `KERNEL_BRANCH`=""
326 329 Name of the requested branch from the GIT location for the RPi Kernel. Default is using the current default branch from the GIT site.
327 330
328 331 ##### `QEMU_BINARY`="/usr/bin/qemu-arm-static"
329 332 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.
330 333
331 334 ##### `KERNEL_DEFCONFIG`="bcm2709_defconfig"
332 335 Sets the default config for kernel compiling. If not set, `KERNEL_DEFCONFIG` will be set to "bcmrpi3\_defconfig" automatically if building for arm64.
333 336
334 337 ##### `KERNEL_REDUCE`=false
335 338 Reduce the size of the generated kernel by removing unwanted devices, network and filesystem drivers (experimental).
336 339
337 340 ##### `KERNEL_THREADS`=1
338 341 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.
339 342
340 343 ##### `KERNEL_HEADERS`=true
341 344 Install kernel headers with the built kernel.
342 345
343 346 ##### `KERNEL_MENUCONFIG`=false
344 347 Start `make menuconfig` interactive menu-driven kernel configuration. The script will continue after `make menuconfig` was terminated.
345 348
346 349 ##### `KERNEL_OLDDEFCONFIG`=false
347 350 Run `make olddefconfig` to automatically set all new kernel configuration options to their recommended default values.
348 351
349 352 ##### `KERNEL_CCACHE`=false
350 353 Compile the kernel using ccache. This speeds up kernel recompilation by caching previous compilations and detecting when the same compilation is being done again.
351 354
352 355 ##### `KERNEL_REMOVESRC`=true
353 356 Remove all kernel sources from the generated OS image after it was built and installed.
354 357
355 358 ##### `KERNELSRC_DIR`=""
356 359 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.
357 360
358 361 ##### `KERNELSRC_CLEAN`=false
359 362 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.
360 363
361 364 ##### `KERNELSRC_CONFIG`=true
362 365 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.
363 366
364 367 ##### `KERNELSRC_USRCONFIG`=""
365 368 Copy own config file to kernel `.config`. If `KERNEL_MENUCONFIG`=true then running after copy.
366 369
367 370 ##### `KERNELSRC_PREBUILT`=false
368 371 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.
369 372
370 373 ##### `RPI_FIRMWARE_DIR`=""
371 374 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.
372 375
373 376 ##### `KERNEL_DEFAULT_GOV`="ONDEMAND"
374 377 Set the default cpu governor at kernel compilation. Supported values are: PERFORMANCE POWERSAVE USERSPACE ONDEMAND CONSERVATIVE SCHEDUTIL
375 378
376 379 ##### `KERNEL_NF`=false
377 380 Enable Netfilter modules as kernel modules
378 381
379 382 ##### `KERNEL_VIRT`=false
380 383 Enable Kernel KVM support (/dev/kvm)
381 384
382 385 ##### `KERNEL_ZSWAP`=false
383 386 Enable Kernel Zswap support. Best use on high RAM load and mediocre CPU load usecases
384 387
385 388 ##### `KERNEL_BPF`=true
386 389 Allow attaching eBPF programs to a cgroup using the bpf syscall (CONFIG_BPF_SYSCALL CONFIG_CGROUP_BPF) [systemd compilations about it - File /lib/systemd/system/systemd-journald.server:36 configures an IP firewall (IPAddressDeny=all), but the local system does not support BPF/cgroup based firewalls]
387 390
388 391 ##### `KERNEL_SECURITY`=false
389 392 Enables Apparmor, integrity subsystem, auditing.
390 393
391 394 ---
392 395
393 396 #### Reduce disk usage:
394 397 The following list of parameters is ignored if `ENABLE_REDUCE`=false.
395 398
396 399 ##### `REDUCE_APT`=true
397 400 Configure APT to use compressed package repository lists and no package caching files.
398 401
399 402 ##### `REDUCE_DOC`=true
400 403 Remove all doc files (harsh). Configure APT to not include doc files on future `apt-get` package installations.
401 404
402 405 ##### `REDUCE_MAN`=true
403 406 Remove all man pages and info files (harsh). Configure APT to not include man pages on future `apt-get` package installations.
404 407
405 408 ##### `REDUCE_VIM`=false
406 409 Replace `vim-tiny` package by `levee` a tiny vim clone.
407 410
408 411 ##### `REDUCE_BASH`=false
409 412 Remove `bash` package and switch to `dash` shell (experimental).
410 413
411 414 ##### `REDUCE_HWDB`=true
412 415 Remove PCI related hwdb files (experimental).
413 416
414 417 ##### `REDUCE_SSHD`=true
415 418 Replace `openssh-server` with `dropbear`.
416 419
417 420 ##### `REDUCE_LOCALE`=true
418 421 Remove all `locale` translation files.
419 422
420 423 ---
421 424
422 425 #### Encrypted root partition:
423 426 ##### `ENABLE_CRYPTFS`=false
424 427 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.
425 428
426 429 ##### `CRYPTFS_PASSWORD`=""
427 430 Set password of the encrypted root partition. This parameter is mandatory if `ENABLE_CRYPTFS`=true.
428 431
429 432 ##### `CRYPTFS_MAPPING`="secure"
430 433 Set name of dm-crypt managed device-mapper mapping.
431 434
432 435 ##### `CRYPTFS_CIPHER`="aes-xts-plain64:sha512"
433 436 Set cipher specification string. `aes-xts*` ciphers are strongly recommended.
434 437
435 438 ##### `CRYPTFS_XTSKEYSIZE`=512
436 439 Sets key size in bits. The argument has to be a multiple of 8.
437 440
438 441 ##### `CRYPTFS_DROPBEAR`=false
439 442 Enable Dropbear Initramfs support
440 443
441 444 ##### `CRYPTFS_DROPBEAR_PUBKEY`=""
442 445 Provide path to dropbear Public RSA-OpenSSH Key
443 446
444 447 ---
445 448
446 449 #### Build settings:
447 450 ##### `BASEDIR`=$(pwd)/images/${RELEASE}
448 451 Set a path to a working directory used by the script to generate an image.
449 452
450 453 ##### `IMAGE_NAME`=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}
451 454 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.
452 455
453 456 ## Understanding the script
454 457 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:
455 458
456 459 | Script | Description |
457 460 | --- | --- |
458 461 | `10-bootstrap.sh` | Debootstrap basic system |
459 462 | `11-apt.sh` | Setup APT repositories |
460 463 | `12-locale.sh` | Setup Locales and keyboard settings |
461 464 | `13-kernel.sh` | Build and install RPi 0/1/2/3 Kernel |
462 465 | `14-fstab.sh` | Setup fstab and initramfs |
463 466 | `15-rpi-config.sh` | Setup RPi 0/1/2/3 config and cmdline |
464 467 | `20-networking.sh` | Setup Networking |
465 468 | `21-firewall.sh` | Setup Firewall |
466 469 | `30-security.sh` | Setup Users and Security settings |
467 470 | `31-logging.sh` | Setup Logging |
468 471 | `32-sshd.sh` | Setup SSH and public keys |
469 472 | `41-uboot.sh` | Build and Setup U-Boot |
470 473 | `42-fbturbo.sh` | Build and Setup fbturbo Xorg driver |
471 474 | `43-videocore.sh` | Build and Setup videocore libraries |
472 475 | `50-firstboot.sh` | First boot actions |
473 476 | `99-reduce.sh` | Reduce the disk space usage |
474 477
475 478 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.
476 479
477 480 | Directory | Description |
478 481 | --- | --- |
479 482 | `apt` | APT management configuration files |
480 483 | `boot` | Boot and RPi 0/1/2/3 configuration files |
481 484 | `dpkg` | Package Manager configuration |
482 485 | `etc` | Configuration files and rc scripts |
483 486 | `firstboot` | Scripts that get executed on first boot |
484 487 | `initramfs` | Initramfs scripts |
485 488 | `iptables` | Firewall configuration files |
486 489 | `locales` | Locales configuration |
487 490 | `modules` | Kernel Modules configuration |
488 491 | `mount` | Fstab configuration |
489 492 | `network` | Networking configuration files |
490 493 | `sysctl.d` | Swapping and Network Hardening configuration |
491 494 | `xorg` | fbturbo Xorg driver configuration |
492 495
493 496 ## Custom packages and scripts
494 497 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`.
495 498
496 499 Scripts in the custom.d directory will be executed after all other installation is complete but before the image is created.
497 500
498 501 ## Logging of the bootstrapping process
499 502 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:
500 503
501 504 ```shell
502 505 script -c 'APT_SERVER=ftp.de.debian.org ./rpi23-gen-image.sh' ./build.log
503 506 ```
504 507
505 508 ## Flashing the image file
506 509 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 RPi 0/1/2/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`.
507 510
508 511 ##### Flashing examples:
509 512 ```shell
510 513 bmaptool copy ./images/buster/2017-01-23-rpi3-buster.img /dev/mmcblk0
511 514 dd bs=4M if=./images/buster/2017-01-23-rpi3-buster.img of=/dev/mmcblk0
512 515 ```
513 516 If you have set `ENABLE_SPLITFS`, copy the `-frmw` image on the microSD card, then the `-root` one on the USB drive:
514 517 ```shell
515 518 bmaptool copy ./images/buster/2017-01-23-rpi3-buster-frmw.img /dev/mmcblk0
516 519 bmaptool copy ./images/buster/2017-01-23-rpi3-buster-root.img /dev/sdc
517 520 ```
518 521
519 522 ## QEMU emulation
520 523 Start QEMU full system emulation:
521 524 ```shell
522 525 qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -kernel kernel7.img -no-reboot -dtb vexpress-v2p-ca15_a7.dtb -sd ${IMAGE_NAME}.qcow2 -append "root=/dev/mmcblk0p2 rw rootfstype=ext4 console=tty1"
523 526 ```
524 527
525 528 Start QEMU full system emulation and output to console:
526 529 ```shell
527 530 qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -kernel kernel7.img -no-reboot -dtb vexpress-v2p-ca15_a7.dtb -sd ${IMAGE_NAME}.qcow2 -append "root=/dev/mmcblk0p2 rw rootfstype=ext4 console=ttyAMA0,115200 init=/bin/systemd" -serial stdio
528 531 ```
529 532
530 533 Start QEMU full system emulation with SMP and output to console:
531 534 ```shell
532 535 qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -smp cpus=2,maxcpus=2 -kernel kernel7.img -no-reboot -dtb vexpress-v2p-ca15_a7.dtb -sd ${IMAGE_NAME}.qcow2 -append "root=/dev/mmcblk0p2 rw rootfstype=ext4 console=ttyAMA0,115200 init=/bin/systemd" -serial stdio
533 536 ```
534 537
535 538 Start QEMU full system emulation with cryptfs, initramfs and output to console:
536 539 ```shell
537 540 qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -kernel kernel7.img -no-reboot -dtb vexpress-v2p-ca15_a7.dtb -sd ${IMAGE_NAME}.qcow2 -initrd "initramfs-${KERNEL_VERSION}" -append "root=/dev/mapper/secure cryptdevice=/dev/mmcblk0p2:secure rw rootfstype=ext4 console=ttyAMA0,115200 init=/bin/systemd" -serial stdio
538 541 ```
539 542
540 543 ## External links and references
541 544 * [Debian worldwide mirror sites](https://www.debian.org/mirror/list)
542 545 * [Debian Raspberry Pi 2 Wiki](https://wiki.debian.org/RaspberryPi2)
543 546 * [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains)
544 547 * [Official Raspberry Pi Firmware on github](https://github.com/raspberrypi/firmware)
545 548 * [Official Raspberry Pi Kernel on github](https://github.com/raspberrypi/linux)
546 549 * [U-BOOT git repository](https://git.denx.de/?p=u-boot.git;a=summary)
547 550 * [Xorg DDX driver fbturbo](https://github.com/ssvb/xf86-video-fbturbo)
548 551 * [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm)
549 552 * [Collabora RPi2 Kernel precompiled](https://repositories.collabora.co.uk/debian/)
@@ -1,41 +1,48
1 1 #
2 2 # Debootstrap basic system
3 3 #
4 4
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 8 VARIANT=""
9 9 COMPONENTS="main"
10 10
11 11 # Use non-free Debian packages if needed
12 12 if [ "$ENABLE_NONFREE" = true ] ; then
13 13 COMPONENTS="main,non-free,contrib"
14 14 fi
15 15
16 16 # Use minbase bootstrap variant which only includes essential packages
17 17 if [ "$ENABLE_MINBASE" = true ] ; then
18 18 VARIANT="--variant=minbase"
19 19 fi
20 20
21
22 # Exclude packages if required by Debian release
23 if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
24 EXCLUDES="--exclude=init,systemd-sysv"
25 fi
26
27
21 28 # Base debootstrap (unpack only)
22 29 http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian"
23 30
24 31 # Copy qemu emulator binary to chroot
25 32 install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}"
26 33
27 34 # Copy debian-archive-keyring.pgp
28 35 mkdir -p "${R}/usr/share/keyrings"
29 36 install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg"
30 37
31 38 # Complete the bootstrapping process
32 39 chroot_exec /debootstrap/debootstrap --second-stage
33 40
34 41 # Mount required filesystems
35 42 mount -t proc none "${R}/proc"
36 43 mount -t sysfs none "${R}/sys"
37 44
38 45 # Mount pseudo terminal slave if supported by Debian release
39 46 if [ -d "${R}/dev/pts" ] ; then
40 47 mount --bind /dev/pts "${R}/dev/pts"
41 48 fi
@@ -1,40 +1,59
1 1 #
2 2 # Setup APT repositories
3 3 #
4 4
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 8 # Install and setup APT proxy configuration
9 9 if [ -z "$APT_PROXY" ] ; then
10 10 install_readonly files/apt/10proxy "${ETC_DIR}/apt/apt.conf.d/10proxy"
11 11 sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy"
12 12 fi
13 13
14 # Install APT sources.list
15 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
14 if [ "$BUILD_KERNEL" = false ] ; then
15 # Install APT pinning configuration for flash-kernel package
16 install_readonly files/apt/flash-kernel "${ETC_DIR}/apt/preferences.d/flash-kernel"
17
18 # Install APT sources.list
19 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
20 echo "deb ${COLLABORA_URL} ${RELEASE} rpi2" >> "${ETC_DIR}/apt/sources.list"
21
22 # Upgrade collabora package index and install collabora keyring
23 chroot_exec apt-get -qq -y update
24 # Removed --allow-unauthenticated as suggested after modification on _apt privileges
25 chroot_exec apt-get -qq -y install collabora-obs-archive-keyring
26 else # BUILD_KERNEL=true
27 # Install APT sources.list
28 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
29
30 # Use specified APT server and release
31 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
32 sed -i "s/ jessie/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
33 fi
34
16 35
17 36 # Use specified APT server and release
18 37 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
19 38 sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
20 39
21 40 # Upgrade package index and update all installed packages and changed dependencies
22 41 chroot_exec apt-get -qq -y update
23 42 chroot_exec apt-get -qq -y -u dist-upgrade
24 43
25 44 # Install additional packages
26 45 if [ "$APT_INCLUDES_LATE" ] ; then
27 46 chroot_exec apt-get -qq -y install $(echo "$APT_INCLUDES_LATE" |tr , ' ')
28 47 fi
29 48
30 49 # Install Debian custom packages
31 50 if [ -d packages ] ; then
32 51 for package in packages/*.deb ; do
33 52 cp "$package" "${R}"/tmp
34 53 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
35 54 done
36 55 fi
37 56
38 57 chroot_exec apt-get -qq -y -f install
39 58
40 59 chroot_exec apt-get -qq -y check
@@ -1,47 +1,53
1 1 #
2 2 # Build and Setup fbturbo Xorg driver
3 3 #
4 4
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 8 if [ "$ENABLE_FBTURBO" = true ] ; then
9 9 # Install c/c++ build environment inside the chroot
10 10 chroot_install_cc
11 11
12 12 # Copy existing fbturbo sources into chroot directory
13 13 if [ -n "$FBTURBOSRC_DIR" ] && [ -d "$FBTURBOSRC_DIR" ] ; then
14 14 # Copy local fbturbo sources
15 15 cp -r "${FBTURBOSRC_DIR}" "${R}/tmp"
16 16 else
17 17 # Create temporary directory for fbturbo sources
18 18 temp_dir=$(as_nobody mktemp -d)
19 19
20 20 # Fetch fbturbo sources
21 21 as_nobody git -C "${temp_dir}" clone "${FBTURBO_URL}"
22 22
23 23 # Move downloaded fbturbo sources
24 24 mv "${temp_dir}/xf86-video-fbturbo" "${R}/tmp/"
25 25
26 26 # Remove temporary directory for fbturbo sources
27 27 rm -fr "${temp_dir}"
28 28 fi
29 29
30 30 # Install Xorg build dependencies
31 chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
31
32 if [ "$RELEASE" = "jessie" ] || [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
33 chroot_exec apt-get -q -y --no-install-recommends install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
34 elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
35 chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
36 fi
37
32 38
33 39 # Build and install fbturbo driver inside chroot
34 40 chroot_exec /bin/bash -x <<'EOF'
35 41 cd /tmp/xf86-video-fbturbo
36 42 autoreconf -vi
37 43 ./configure --prefix=/usr
38 44 make
39 45 make install
40 46 EOF
41 47
42 48 # Install fbturbo driver Xorg configuration
43 49 install_readonly files/xorg/99-fbturbo.conf "${R}/usr/share/X11/xorg.conf.d/99-fbturbo.conf"
44 50
45 51 # Remove Xorg build dependencies
46 52 chroot_exec apt-get -qq -y --auto-remove purge xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
47 53 fi
@@ -1,116 +1,122
1 1 # This file contains utility functions used by rpi23-gen-image.sh
2 2
3 3 cleanup (){
4 4 set +x
5 5 set +e
6 6
7 7 # Remove exports from nexmon
8 8 unset KERNEL
9 9 unset ARCH
10 10 unset SUBARCH
11 11 unset CCPLUGIN
12 12 unset ZLIBFLATE
13 13 unset Q
14 14 unset NEXMON_SETUP_ENV
15 15 unset HOSTUNAME
16 16 unset PLATFORMUNAME
17 17
18 18 # Identify and kill all processes still using files
19 19 echo "killing processes using mount point ..."
20 20 fuser -k "${R}"
21 21 sleep 3
22 22 fuser -9 -k -v "${R}"
23 23
24 24 # Clean up temporary .password file
25 25 if [ -r ".password" ] ; then
26 26 shred -zu .password
27 27 fi
28 28
29 29 # Clean up all temporary mount points
30 30 echo "removing temporary mount points ..."
31 31 umount -l "${R}/proc" 2> /dev/null
32 32 umount -l "${R}/sys" 2> /dev/null
33 33 umount -l "${R}/dev/pts" 2> /dev/null
34 34 umount "$BUILDDIR/mount/boot/firmware" 2> /dev/null
35 35 umount "$BUILDDIR/mount" 2> /dev/null
36 36 cryptsetup close "${CRYPTFS_MAPPING}" 2> /dev/null
37 37 losetup -d "$ROOT_LOOP" 2> /dev/null
38 38 losetup -d "$FRMW_LOOP" 2> /dev/null
39 39 trap - 0 1 2 3 6
40 40 }
41 41
42 42 chroot_exec() {
43 43 # Exec command in chroot
44 44 LANG=C LC_ALL=C DEBIAN_FRONTEND=noninteractive chroot "${R}" "$@"
45 45 }
46 46
47 47 as_nobody() {
48 48 # Exec command as user nobody
49 49 sudo -E -u nobody LANG=C LC_ALL=C "$@"
50 50 }
51 51
52 52 install_readonly() {
53 53 # Install file with user read-only permissions
54 54 install -o root -g root -m 644 "$@"
55 55 }
56 56
57 57 install_exec() {
58 58 # Install file with root exec permissions
59 59 install -o root -g root -m 744 "$@"
60 60 }
61 61
62 62 use_template () {
63 63 # Test if configuration template file exists
64 64 if [ ! -r "./templates/${CONFIG_TEMPLATE}" ] ; then
65 65 echo "error: configuration template ${CONFIG_TEMPLATE} not found"
66 66 exit 1
67 67 fi
68 68
69 69 # Load template configuration parameters
70 70 . "./templates/${CONFIG_TEMPLATE}"
71 71 }
72 72
73 73 chroot_install_cc() {
74 74 # Install c/c++ build environment inside the chroot
75 75 if [ -z "${COMPILER_PACKAGES}" ] ; then
76 76 COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }')
77 # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot
78 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
77
78
79 if [ "$RELEASE" = "jessie" ] || [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
80 chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES}
81 elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
82 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
83 fi
84
79 85 fi
80 86 }
81 87
82 88 chroot_remove_cc() {
83 89 # Remove c/c++ build environment from the chroot
84 90 if [ -n "${COMPILER_PACKAGES}" ] ; then
85 91 chroot_exec apt-get -qq -y --auto-remove purge ${COMPILER_PACKAGES}
86 92 COMPILER_PACKAGES=""
87 93 fi
88 94 }
89 95
90 96 # https://serverfault.com/a/682849 - converts e.g. /24 to 255.255.255.0
91 97 cdr2mask ()
92 98 {
93 99 # Number of args to shift, 255..255, first non-255 byte, zeroes
94 100 set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
95 101 [ $1 -gt 1 ] && shift $1 || shift
96 102 echo ${1-0}.${2-0}.${3-0}.${4-0}
97 103 }
98 104
99 105 # GPL v2.0 - #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh
100 106 set_kernel_config() {
101 107 # flag as $1, value to set as $2, config must exist at "./.config"
102 108 TGT="CONFIG_${1#CONFIG_}"
103 109 REP="${2}"
104 110 if grep -q "^${TGT}[^_]" .config; then
105 111 sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" .config
106 112 else
107 113 echo "${TGT}"="${2}" >> .config
108 114 fi
109 115 }
110 116
111 117 # unset kernel config parameter
112 118 unset_kernel_config() {
113 119 # unsets flag with the value of $1, config must exist at "./.config"
114 120 TGT="CONFIG_${1#CONFIG_}"
115 121 sed -i "s/^${TGT}=.*/# ${TGT} is not set/" .config
116 122 } No newline at end of file
@@ -1,98 +1,181
1
2 Configuration file raspife2 Stretch IFÉ 2017/02/24
3 #
4 APT_SERVER=ftp.fr.debian.org
5 APT_INCLUDES="gnupg,gnupg2,firmware-realtek,firmware-linux-nonfree,firmware-linux,tightvncserver,build-essentia$
6 bison,libboost-all-dev,automake,autoconf,autogen,libtool,pkg-config,checkinstall,python3,python3-dev,menulibre,$
7 libnotify-bin,python,python-configobj,python-cheetah,python-imaging,python-serial,python-usb,python-dev,\
8 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,jed,i2c-tools,python-smbus,policykit-1,usbutils,\
9 pmount,python-pip,python3-pip,geany,geany-plugin-py,geany-plugin-markdown,firefox-esr,firefox-esr-l10n-fr,\
10 icedtea-8-plugin,openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,libqtwebkit-dev,libqt5webkit5-dev,\
11 libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\
12 lxsession,openbox-lxde-session,lxde"
13 #----------------------
14 RPI_MODEL=2
15 RELEASE="stretch"
16 HOSTNAME="raspife2"
17 PASSWORD="***********"
18 USER_PASSWORD="**************"
19 DEFLOCAL="fr_FR.UTF-8"
20 TIMEZONE="Europe/Paris"
21 EXPANDROOT=false
22 #-----------------------
23 XKB_MODEL="pc105"
24 XKB_LAYOUT="fr"
25 XKB_VARIANT="latin9"
26 XKB_OPTIONS=""
27 #------------------------
28 ENABLE_DHCP=true
29 #------------------------
30 ENABLE_CONSOLE=true
31 ENABLE_I2C=true
32 ENABLE_SPI=true
33 ENABLE_IPV6=true
34 ENABLE_SSHD=true
35 ENABLE_NONFREE=true
36 ENABLE_WIRELESS=false
37 ENABLE_RSYSLOG=true
38 ENABLE_SOUND=true
39 ENABLE_HWRANDOM=true
40 ENABLE_MINGPU=true
41 ENABLE_DBUS=true
42 ENABLE_XORG=true
43 ENABLE_WM="lxdm"
44 #------------------------
45 ENABLE_MINBASE=false
46 ENABLE_REDUCE=false
47 ENABLE_UBOOT=false
48 ENABLE_FBTURBO=true
49 ENABLE_IPTABLES=false
50 ENABLE_USER=true
51 USER_NAME=ens-ife
52 ENABLE_ROOT=true
53 ENABLE_HARDNET=true
54 ENABLE_INITRAMFS=true
55 ENABLE_IFNAMES=true
56 #------------------------
57 ENABLE_ROOT_SSH=false
58 SSH_LIMIT_USERS=false
59 SSH_ROOT_PUB_KEY="/home/********/.ssh/authorized_keys"
60 SSH_USER_PUB_KEY="/home/********/.ssh/authorized_keys"
61 #------------------------
62 BUILD_KERNEL=true
63 KERNEL_REDUCE=false
64 KERNEL_HEADERS=true
65 KERNEL_REMOVESRC=true
66 KERNELSRC_CLEAN=true
67 KERNELSRC_CONFIG=true
68 #------------------------
69 REDUCE_APT=false
70 REDUCE_DOC=true
71 REDUCE_MAN=false
72 REDUCE_HWDB=true
73 REDUCE_BASH=false
74 REDUCE_SSHD=false
75 REDUCE_LOCALE=false
76 #-------------------------
77 ENABLE_CRYPTFS=false
78 #-------------------------
79 BASEDIR=/media/********/images/${RELEASE}
80 DATE=date
81 +%Y-%m-%d
82 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}
83 =======
1 84 # Configuration file raspi2 Stretch IFÉ 2017/12/28
2 85 #
3 86 APT_SERVER=debian.mirrors.ovh.net
4 87 APT_INCLUDES=""
5 88 APT_INCLUDES_LATE="gnupg,firmware-linux-nonfree,firmware-linux,dh-autoreconf,\
6 89 gettext,build-essential,git,cmake,libjson-c-dev,unzip,usbutils,\
7 90 bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,\
8 91 pkg-config,checkinstall,menulibre,libnotify-bin,pandoc,\
9 92 python3,python3-dev,python3-pypandoc,python3-scipy,python3-tk,python3-pandocfilters,\
10 93 python3-geopy,python3-pip,\
11 94 python,python-dev,python-pypandoc,python-scipy,python-tk,python-pandocfilters,\
12 95 python-geopy,python-pip,python-tk,pandoc,\
13 96 python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\
14 97 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,python-smbus,policykit-1,\
15 98 pmount,ntpdate,ntp,rsync,\
16 99 texlive,texlive-xetex,nginx-extras,ffmpeg,wicd,wicd-gtk,console-data,keyboard-configuration,\
17 100 libqtwebkit-dev,libqt5webkit5-dev,\
18 101 libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\
19 102 nmap,libltdl-dev,dbus-user-session,debian-archive-keyring,\
20 103 xutils-dev,lxsession,openbox-lxde-session,lxde,x11proto-randr-dev,lxrandr,\
21 104 tightvncserver,geany,geany-plugin-py,firefox-esr,firefox-esr-l10n-fr,jed,terminator,automake"
22 105 #ca-certificates-java,icedtea-plugin,icedtea-netx,\
23 106 #openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,\
24 107 #openjdk-9-jdk,openjdk-9-jre,openjdk-9-jre-headless"
25 108 #----------------------
26 109 RPI_MODEL=2
27 110 RELEASE="stretch"
28 111 RELEASE_ARCH="armhf"
29 112 HOSTNAME="raspife2"
30 113 PASSWORD="*****"
31 114 USER_PASSWORD="*****"
32 115 DEFLOCAL="fr_FR.UTF-8"
33 116 TIMEZONE="Europe/Paris"
34 117 EXPANDROOT=false
35 118 #-----------------------
36 119 XKB_MODEL="pc105"
37 120 XKB_LAYOUT="fr"
38 121 XKB_VARIANT="latin9"
39 122 XKB_OPTIONS=""
40 123 #------------------------
41 124 ENABLE_DHCP=true
42 125 #------------------------
43 126 ENABLE_CONSOLE=false
44 127 ENABLE_I2C=true
45 128 ENABLE_SPI=true
46 129 ENABLE_IPV6=true
47 130 ENABLE_SSHD=true
48 131 ENABLE_NONFREE=true
49 132 ENABLE_WIRELESS=false
50 133 ENABLE_RSYSLOG=true
51 134 ENABLE_SOUND=true
52 135 ENABLE_HWRANDOM=true
53 136 ENABLE_MINGPU=true
54 137 ENABLE_DBUS=true
55 138 ENABLE_XORG=true
56 139 ENABLE_WM="lxdm"
57 140 #------------------------
58 141 ENABLE_MINBASE=false
59 142 ENABLE_REDUCE=false
60 143 ENABLE_UBOOT=false
61 144 ENABLE_FBTURBO=true
62 145 ENABLE_IPTABLES=false
63 146 ENABLE_USER=true
64 147 USER_NAME=ens-ife
65 148 ENABLE_ROOT=true
66 149 ENABLE_HARDNET=true
67 150 ENABLE_INITRAMFS=true
68 151 ENABLE_IFNAMES=true
69 152 #------------------------
70 153 ENABLE_ROOT_SSH=false
71 154 SSH_LIMIT_USERS=false
72 155 SSH_ROOT_PUB_KEY="/home/*****/.ssh/id_rsa.pub"
73 156 SSH_USER_PUB_KEY="/home/*****/.ssh/id_rsa.pub"
74 157 #------------------------
75 158 BUILD_KERNEL=true
76 159 KERNEL_BRANCH=rpi-4.13.y
77 160 KERNEL_REDUCE=false
78 161 KERNEL_HEADERS=true
79 162 KERNEL_REMOVESRC=true
80 163 KERNELSRC_CLEAN=true
81 164 KERNELSRC_CONFIG=true
82 165 #------------------------
83 166 REDUCE_APT=false
84 167 REDUCE_DOC=true
85 168 REDUCE_MAN=false
86 169 REDUCE_HWDB=true
87 170 REDUCE_BASH=false
88 171 REDUCE_SSHD=false
89 172 REDUCE_LOCALE=false
90 173 #-------------------------
91 174 ENABLE_CRYPTFS=false
92 175 #-------------------------
93 176 BASEDIR=/data/RpiGenImage/Images/${RELEASE}
94 177 #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE}
95 178 DATE=`date +%Y-%m-%d`
96 179 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}
97 180
98 181
@@ -1,98 +1,100
1 # Configuration file raspi3 Buster IFÉ 2017/12/28
1
2 # Configuration file raspi3 Buster IFÉ 2017/11/01
3
2 4 #
3 5 APT_SERVER=debian.mirrors.ovh.net
4 6 APT_INCLUDES=""
5 7 APT_INCLUDES_LATE="gnupg,firmware-linux-nonfree,firmware-linux,dh-autoreconf,\
6 8 gettext,build-essential,git,cmake,libjson-c-dev,unzip,usbutils,\
7 9 bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,\
8 pkg-config,menulibre,libnotify-bin,pandoc,\
10 pkg-config,checkinstall,menulibre,libnotify-bin,pandoc,\
9 11 python3,python3-dev,python3-pypandoc,python3-scipy,python3-tk,python3-pandocfilters,\
10 12 python3-geopy,python3-pip,\
11 13 python,python-dev,python-pypandoc,python-scipy,python-tk,python-pandocfilters,\
12 14 python-geopy,python-pip,python-tk,pandoc,\
13 15 python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\
14 16 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,python-smbus,policykit-1,\
15 17 pmount,ntpdate,ntp,rsync,\
16 18 texlive,texlive-xetex,nginx-extras,ffmpeg,wicd,wicd-gtk,console-data,keyboard-configuration,\
17 19 libqtwebkit-dev,libqt5webkit5-dev,\
18 20 libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\
19 21 nmap,libltdl-dev,dbus-user-session,debian-archive-keyring,\
20 22 xutils-dev,lxsession,openbox-lxde-session,lxde,x11proto-randr-dev,lxrandr,\
21 23 tightvncserver,geany,geany-plugin-py,firefox-esr,firefox-esr-l10n-fr,jed,terminator,automake"
22 24 #ca-certificates-java,icedtea-plugin,icedtea-netx,\
23 25 #openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,\
24 26 #openjdk-9-jdk,openjdk-9-jre,openjdk-9-jre-headless"
25 27 #----------------------
26 28 RPI_MODEL=3
27 29 RELEASE="buster"
28 30 RELEASE_ARCH="armhf"
29 31 HOSTNAME="raspife3"
30 PASSWORD="*****"
31 USER_PASSWORD="*****"
32 PASSWORD="***********"
33 USER_PASSWORD="*************"
32 34 DEFLOCAL="fr_FR.UTF-8"
33 35 TIMEZONE="Europe/Paris"
34 36 EXPANDROOT=false
35 37 #-----------------------
36 38 XKB_MODEL="pc105"
37 39 XKB_LAYOUT="fr"
38 40 XKB_VARIANT="latin9"
39 41 XKB_OPTIONS=""
40 42 #------------------------
41 43 ENABLE_DHCP=true
42 44 #------------------------
43 45 ENABLE_CONSOLE=false
44 46 ENABLE_I2C=true
45 47 ENABLE_SPI=true
46 48 ENABLE_IPV6=true
47 49 ENABLE_SSHD=true
48 50 ENABLE_NONFREE=true
49 51 ENABLE_WIRELESS=true
50 52 ENABLE_RSYSLOG=true
51 53 ENABLE_SOUND=true
52 54 ENABLE_HWRANDOM=true
53 55 ENABLE_MINGPU=true
54 56 ENABLE_DBUS=true
55 57 ENABLE_XORG=true
56 58 ENABLE_WM="lxdm"
57 59 #------------------------
58 60 ENABLE_MINBASE=false
59 61 ENABLE_REDUCE=false
60 62 ENABLE_UBOOT=false
61 63 ENABLE_FBTURBO=true
62 64 ENABLE_IPTABLES=false
63 65 ENABLE_USER=true
64 66 USER_NAME=ens-ife
65 67 ENABLE_ROOT=true
66 68 ENABLE_HARDNET=true
67 69 ENABLE_INITRAMFS=true
68 70 ENABLE_IFNAMES=true
69 71 #------------------------
70 72 ENABLE_ROOT_SSH=false
71 73 SSH_LIMIT_USERS=false
72 74 SSH_ROOT_PUB_KEY="/home/*****/.ssh/authorized_keys"
73 75 SSH_USER_PUB_KEY="/home/*****/.ssh/authorized_keys"
74 76 #------------------------
75 77 BUILD_KERNEL=true
76 78 KERNEL_BRANCH=rpi-4.13.y
77 79 KERNEL_REDUCE=false
78 80 KERNEL_HEADERS=true
79 81 KERNEL_REMOVESRC=true
80 82 KERNELSRC_CLEAN=true
81 83 KERNELSRC_CONFIG=true
82 84 #------------------------
83 85 REDUCE_APT=false
84 86 REDUCE_DOC=true
85 87 REDUCE_MAN=false
86 88 REDUCE_HWDB=true
87 89 REDUCE_BASH=false
88 90 REDUCE_SSHD=false
89 91 REDUCE_LOCALE=false
90 92 #-------------------------
91 93 ENABLE_CRYPTFS=false
92 94 #-------------------------
93 95 BASEDIR=/data/RpiGenImage/Images/${RELEASE}
94 96 #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE}
95 97 DATE=`date +%Y-%m-%d`
96 98 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}
97 99
98 100
@@ -1,99 +1,92
1 # Configuration file raspi3 Stretch IFÉ 2017/12/28
1
2 # Configuration file raspi3 Stretch IFÉ 2017/07/26
2 3 #
3 APT_SERVER=debian.mirrors.ovh.net
4 APT_INCLUDES=""
5 APT_INCLUDES_LATE="gnupg,firmware-linux-nonfree,firmware-linux,dh-autoreconf,\
4 APT_SERVER=ftp.fr.debian.org
5 APT_INCLUDES="gnupg,gnupg2,firmware-linux-nonfree,firmware-linux,dh-autoreconf,\
6 6 gettext,build-essential,git,cmake,libjson-c-dev,unzip,usbutils,\
7 7 bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,\
8 pkg-config,checkinstall,libnotify-bin,pandoc,\
8 pkg-config,checkinstall,menulibre,libnotify-bin,pandoc,\
9 9 python3,python3-dev,python3-pypandoc,python3-scipy,python3-tk,python3-pandocfilters,\
10 python3-geopy,python3-pip,\
11 10 python,python-dev,python-pypandoc,python-scipy,python-tk,python-pandocfilters,\
12 python-geopy,python-pip,python-tk,\
11 python3-geopy,python3-pip,\
12 python-geopy,python-pip,\
13 13 python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\
14 python-mysqldb,python-smbus,\
15 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,policykit-1,\
16 pmount,ntpdate,ntp,\
14 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,jed,i2c-tools,python-smbus,policykit-1,\
15 pmount,ntpdate,\
17 16 texlive,texlive-xetex,nginx-extras,ffmpeg,wicd,wicd-gtk,console-data,keyboard-configuration,\
18 libqtwebkit-dev,libqt5webkit5-dev,\
17 icedtea-8-plugin,openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,libqtwebkit-dev,libqt5webkit5-dev,\
19 18 libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\
20 19 nmap,libltdl-dev,dbus-user-session,debian-archive-keyring,\
21 menulibre,xutils-dev,lxsession,openbox-lxde-session,lxde,x11proto-randr-dev,lxrandr,\
22 tightvncserver,geany,geany-plugin-py,firefox-esr,firefox-esr-l10n-fr,jed,terminator,automake"
23 #ca-certificates-java,icedtea-plugin,icedtea-netx,\
24 #openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,\
25 #openjdk-9-jdk,openjdk-9-jre,openjdk-9-jre-headless"
20 xutils-dev,lxsession,openbox-lxde-session,lxde,x11proto-randr-dev,lxrandr,\
21 tightvncserver,geany,geany-plugin-py,geany-plugin-markdown,firefox-esr,firefox-esr-l10n-fr"
26 22 #----------------------
27 23 RPI_MODEL=3
28 RELEASE="stretch"
29 RELEASE_ARCH="armhf"
30 HOSTNAME="raspife3"
31 PASSWORD="*****"
32 USER_PASSWORD="*****"
24 RELEASE="stretch"
25 HOSTNAME="raspife3"
26 PASSWORD="**************"
27 USER_PASSWORD="***************
33 28 DEFLOCAL="fr_FR.UTF-8"
34 29 TIMEZONE="Europe/Paris"
35 30 EXPANDROOT=false
36 31 #-----------------------
37 32 XKB_MODEL="pc105"
38 XKB_LAYOUT="fr"
33 XKB_LAYOUT="fr"
39 34 XKB_VARIANT="latin9"
40 35 XKB_OPTIONS=""
41 36 #------------------------
42 37 ENABLE_DHCP=true
43 38 #------------------------
44 39 ENABLE_CONSOLE=false
45 40 ENABLE_I2C=true
46 41 ENABLE_SPI=true
47 42 ENABLE_IPV6=true
48 43 ENABLE_SSHD=true
49 44 ENABLE_NONFREE=true
50 45 ENABLE_WIRELESS=true
51 46 ENABLE_RSYSLOG=true
52 47 ENABLE_SOUND=true
53 48 ENABLE_HWRANDOM=true
54 49 ENABLE_MINGPU=true
55 50 ENABLE_DBUS=true
56 51 ENABLE_XORG=true
57 52 ENABLE_WM="lxdm"
58 53 #------------------------
59 54 ENABLE_MINBASE=false
60 55 ENABLE_REDUCE=false
61 56 ENABLE_UBOOT=false
62 57 ENABLE_FBTURBO=true
63 58 ENABLE_IPTABLES=false
64 59 ENABLE_USER=true
65 60 USER_NAME=ens-ife
66 61 ENABLE_ROOT=true
67 62 ENABLE_HARDNET=true
68 63 ENABLE_INITRAMFS=true
69 64 ENABLE_IFNAMES=true
70 65 #------------------------
71 66 ENABLE_ROOT_SSH=false
72 SSH_LIMIT_USERS=false
73 SSH_ROOT_PUB_KEY="/home/*****/.ssh/authorized_keys"
74 SSH_USER_PUB_KEY="/home/*****/.ssh/authorized_keys"
67 SSH_LIMIT_USERS=fal
68 SSH_ROOT_PUB_KEY="/home/*******/.ssh/authorized_keys"
69 SSH_USER_PUB_KEY="/home/*******/.ssh/authorized_keys"
75 70 #------------------------
76 71 BUILD_KERNEL=true
77 KERNEL_BRANCH=rpi-4.13.y
78 72 KERNEL_REDUCE=false
79 73 KERNEL_HEADERS=true
80 74 KERNEL_REMOVESRC=true
81 75 KERNELSRC_CLEAN=true
82 76 KERNELSRC_CONFIG=true
83 77 #------------------------
84 78 REDUCE_APT=false
85 79 REDUCE_DOC=true
86 80 REDUCE_MAN=false
87 81 REDUCE_HWDB=true
88 82 REDUCE_BASH=false
89 83 REDUCE_SSHD=false
90 84 REDUCE_LOCALE=false
91 85 #-------------------------
92 86 ENABLE_CRYPTFS=false
93 87 #-------------------------
94 88 BASEDIR=/data/RpiGenImage/Images/${RELEASE}
95 #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE}
96 89 DATE=`date +%Y-%m-%d`
97 90 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}
98 91
99 92
@@ -1,96 +1,91
1 # Configuration file raspi3 Stretch Weewx IFÉ 2017/12/28
1
2 # Configuration file raspi3 Stretch Weewx IFÉ 2017/07/26
2 3 #
3 APT_SERVER=debian.mirrors.ovh.net
4 APT_INCLUDES=""
5 APT_INCLUDES_LATE="gnupg,debian-keyring,gawk,\
6 build-essential,git,cmake,libjson-c-dev,unzip,usbutils,\
7 bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,\
8 pkg-config,checkinstall,libnotify-bin,pandoc,\
9 python3,python3-dev,python3-pypandoc,python3-scipy,python3-tk,python3-pandocfilters,\
10 python3-geopy,python3-pip,\
11 python,python-dev,python-pypandoc,python-scipy,python-tk,python-pandocfilters,\
12 python-geopy,python-pip,python-tk,\
13 python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\
14 python-mysqldb,python-smbus,\
15 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,policykit-1,\
16 pmount,ntpdate,rsync,\
17 libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\
18 nmap,libltdl-dev,debian-archive-keyring,texlive,texlive-xetex,nginx-extras"
19 #openjdk-8-jdk-headless,openjdk-8-jre-headless"
4 APT_SERVER=ftp.fr.debian.org
5 APT_INCLUDES="debian-archive-keyring,debian-keyring,automake,autoconf,autogen,gawk,gnupg,gnupg2,\
6 build-essential,git,cmake,libjson-c-dev,unzip,\
7 bison,libboost-all-dev,libtool,libtool-bin,pkg-config,checkinstall,libnotify-bin,pandoc,\
8 python3,python3-dev,python,python-dev,python-configobj,python-cheetah,python-mysqldb\
9 python-imaging,python-serial,python-usb,python-tk,python3-tk,python3-scipy,\
10 python-pypandoc,python3-pypandoc,python-pandocfilters,python3-pandocfilters,\
11 python-geopy,python3-geopy,python-pip,python3-pip,python-smbus,\
12 libudev-dev,libzzip-dev,zlib1g-dev,libnss-myhostname,libpng16-16,nmap,\
13 libltdl-dev,usbutils,pmount,ntpdate,texlive,texlive-xetex,nginx-extras,policykit-1,\
14 openjdk-8-jdk-headless,openjdk-8-jre-headless,\
15 pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools"
20 16 #----------------------
21 17 RPI_MODEL=3
22 RELEASE="stretch"
23 RELEASE_ARCH="armhf"
24 HOSTNAME="raspwife3"
25 PASSWORD="*****"
26 USER_PASSWORD="*****"
18 RELEASE="stretch"
19 HOSTNAME="raspwife3"
20 PASSWORD="************"
21 USER_PASSWORD="************"
22
27 23 DEFLOCAL="fr_FR.UTF-8"
28 24 TIMEZONE="Europe/Paris"
29 25 EXPANDROOT=false
30 26 #-----------------------
31 27 XKB_MODEL="pc105"
32 XKB_LAYOUT="fr"
28 XKB_LAYOUT="fr"
33 29 XKB_VARIANT="latin9"
34 30 XKB_OPTIONS=""
35 31 #------------------------
36 32 ENABLE_DHCP=false
37 33 NET_ADDRESS="192.168.***.***/24"
38 NET_GATEWAY="192.168.***.***"
39 NET_DNS_1="192.168.***.***"
34 NET_GATEWAY="192.168.***.1"
35 NET_DNS_1="192.168.***.1"
40 36 NET_DNS_2="8.8.8.8"
41 37 #------------------------
42 38 ENABLE_CONSOLE=false
43 39 ENABLE_I2C=true
44 40 ENABLE_SPI=true
45 41 ENABLE_IPV6=true
46 42 ENABLE_SSHD=true
47 43 ENABLE_NONFREE=true
48 44 ENABLE_WIRELESS=true
49 45 ENABLE_RSYSLOG=true
50 46 ENABLE_SOUND=true
51 47 ENABLE_HWRANDOM=true
52 48 ENABLE_MINGPU=true
53 49 ENABLE_DBUS=true
54 50 ENABLE_XORG=false
55 51 ENABLE_WM=""
56 52 #------------------------
57 53 ENABLE_MINBASE=false
58 54 ENABLE_REDUCE=false
59 55 ENABLE_UBOOT=false
60 56 ENABLE_FBTURBO=false
61 57 ENABLE_IPTABLES=false
62 58 ENABLE_USER=true
63 59 USER_NAME=ens-ife
64 60 ENABLE_ROOT=true
65 61 ENABLE_HARDNET=true
66 62 ENABLE_INITRAMFS=true
67 63 ENABLE_IFNAMES=true
68 64 #------------------------
69 65 ENABLE_ROOT_SSH=false
70 66 SSH_LIMIT_USERS=false
71 SSH_ROOT_PUB_KEY="/home/*****/.ssh/authorized_keys"
72 SSH_USER_PUB_KEY="/home/*****/.ssh/authorized_keys"
67 SSH_ROOT_PUB_KEY="/home/*******/.ssh/authorized_keys"
68 SSH_USER_PUB_KEY="/home/*******/.ssh/authorized_keys"
73 69 #------------------------
74 BUILD_KERNEL=true
75 KERNEL_BRANCH=rpi-4.13.y
70 BUILD_KERNEL=true
76 71 KERNEL_REDUCE=false
77 72 KERNEL_HEADERS=true
78 73 KERNEL_REMOVESRC=true
79 74 KERNELSRC_CLEAN=true
80 75 KERNELSRC_CONFIG=true
81 76 #------------------------
82 77 REDUCE_APT=false
83 78 REDUCE_DOC=true
84 79 REDUCE_MAN=false
85 80 REDUCE_HWDB=true
86 81 REDUCE_BASH=false
87 82 REDUCE_SSHD=false
88 83 REDUCE_LOCALE=false
89 84 #-------------------------
90 85 ENABLE_CRYPTFS=false
91 86 #-------------------------
92 87 BASEDIR=/data/RpiGenImage/Images/${RELEASE}
93 88 DATE=`date +%Y-%m-%d`
94 89 IMAGE_NAME=${BASEDIR}/${DATE}-rpiw${RPI_MODEL}-${RELEASE}
95 90
96 91
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant