├── .dockerignore ├── .gitignore ├── .gitlab-ci.yml ├── Dockerfile ├── LICENSE ├── README.md ├── build-docker.sh ├── build.sh ├── depends ├── export-image ├── 00-allow-rerun │ └── 00-run.sh ├── 01-user-rename │ ├── 00-packages │ └── 01-run.sh ├── 02-set-sources │ └── 01-run.sh ├── 03-network │ ├── 01-run.sh │ └── files │ │ └── resolv.conf ├── 04-set-partuuid │ └── 00-run.sh ├── 05-finalise │ └── 01-run.sh └── prerun.sh ├── export-noobs ├── 00-release │ ├── 00-run.sh │ └── files │ │ ├── OS.png │ │ ├── marketing │ │ └── slides_vga │ │ │ ├── A.png │ │ │ ├── B.png │ │ │ ├── C.png │ │ │ ├── D.png │ │ │ ├── E.png │ │ │ ├── F.png │ │ │ └── G.png │ │ ├── os.json │ │ ├── partition_setup.sh │ │ ├── partitions.json │ │ └── release_notes.txt └── prerun.sh ├── scripts ├── common ├── dependencies_check └── remove-comments.sed ├── stage0 ├── 00-configure-apt │ ├── 00-run.sh │ ├── 01-packages │ └── files │ │ ├── 51cache │ │ ├── raspberrypi.gpg.key │ │ ├── raspi.list │ │ └── sources.list ├── 01-locale │ ├── 00-debconf │ └── 00-packages ├── 02-firmware │ ├── 01-packages │ └── 02-run.sh ├── files │ └── raspberrypi.gpg └── prerun.sh ├── stage1 ├── 00-boot-files │ ├── 00-run.sh │ └── files │ │ ├── cmdline.txt │ │ └── config.txt ├── 01-sys-tweaks │ ├── 00-packages │ ├── 00-patches │ │ ├── 01-bashrc.diff │ │ └── series │ ├── 00-run.sh │ └── files │ │ └── fstab ├── 02-net-tweaks │ ├── 00-packages │ └── 00-run.sh ├── 03-install-packages │ └── 00-packages └── prerun.sh ├── stage2 ├── 00-copies-and-fills │ ├── 01-packages │ └── 02-run.sh ├── 01-sys-tweaks │ ├── 00-debconf │ ├── 00-packages │ ├── 00-packages-nr │ ├── 00-patches │ │ ├── 01-useradd.diff │ │ ├── 02-swap.diff │ │ ├── 04-inputrc.diff │ │ ├── 05-path.diff │ │ ├── 07-resize-init.diff │ │ └── series │ ├── 01-run.sh │ └── files │ │ ├── 50raspi │ │ ├── 90-qemu.rules │ │ ├── console-setup │ │ └── resize2fs_once ├── 02-net-tweaks │ ├── 00-packages │ └── 01-run.sh ├── 03-accept-mathematica-eula │ └── 00-debconf ├── 03-set-timezone │ └── 02-run.sh ├── EXPORT_IMAGE └── prerun.sh ├── stage3 ├── 00-install-packages │ ├── 00-packages │ ├── 00-packages-nr │ └── 01-run.sh └── prerun.sh ├── stage4 ├── 00-install-packages │ ├── 00-debconf │ ├── 00-packages │ ├── 00-packages-nr │ └── 02-packages ├── 01-console-autologin │ └── 00-run.sh ├── 02-extras │ └── 00-run.sh ├── 03-bookshelf │ ├── 00-run.sh │ └── files │ │ └── .gitignore ├── 04-enable-xcompmgr │ └── 00-run.sh ├── 05-print-support │ ├── 00-packages │ └── 01-run.sh ├── 06-enable-wayland │ └── 00-run.sh ├── EXPORT_IMAGE └── prerun.sh └── stage5 ├── 00-install-extras └── 00-packages ├── 00-install-libreoffice └── 00-packages ├── EXPORT_IMAGE └── prerun.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | output/ 2 | work/ 3 | deploy/ 4 | apt-cacher-ng/ 5 | .git/objects/* 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | deploy/* 2 | work/* 3 | config 4 | postrun.sh 5 | SKIP 6 | SKIP_IMAGES 7 | .pc 8 | *-pc 9 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: serge/pi-gen 3 | ref: ci 4 | file: 'pi-gen.yml' 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_IMAGE=debian:bullseye 2 | FROM ${BASE_IMAGE} 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | 6 | RUN apt-get -y update && \ 7 | apt-get -y install --no-install-recommends \ 8 | git vim parted \ 9 | quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ 10 | libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc \ 11 | binfmt-support ca-certificates fdisk gpg pigz arch-test \ 12 | && rm -rf /var/lib/apt/lists/* 13 | 14 | COPY . /pi-gen/ 15 | 16 | VOLUME [ "/pi-gen/work", "/pi-gen/deploy"] 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Raspberry Pi (Trading) Ltd. 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pi-gen 2 | 3 | Tool used to create Raspberry Pi OS images, and custom images based on Raspberry Pi OS, 4 | which was in turn derived from the Raspbian project. 5 | 6 | **Note**: Raspberry Pi OS 32 bit images are based primarily on Raspbian, while 7 | Raspberry Pi OS 64 bit images are based primarily on Debian. 8 | 9 | **Note**: 32 bit images should be built from the `master` branch. 10 | 64 bit images should be built from the `arm64` branch. 11 | 12 | ## Dependencies 13 | 14 | pi-gen runs on Debian-based operating systems released after 2017, and we 15 | always advise you use the latest OS for security reasons. 16 | 17 | On other Linux distributions it may be possible to use the Docker build described 18 | below. 19 | 20 | To install the required dependencies for `pi-gen` you should run: 21 | 22 | ```bash 23 | apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ 24 | dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \ 25 | gpg pigz xxd arch-test bmap-tools 26 | ``` 27 | 28 | The file `depends` contains a list of tools needed. The format of this 29 | package is `[:]`. 30 | 31 | ## Getting started with building your images 32 | 33 | Getting started is as simple as cloning this repository on your build machine. You 34 | can do so with: 35 | 36 | ```bash 37 | git clone https://github.com/RPI-Distro/pi-gen.git 38 | ``` 39 | 40 | `--depth 1` can be added after `git clone` to create a shallow clone, only containing 41 | the latest revision of the repository. Do not do this on your development machine. 42 | 43 | Also, be careful to clone the repository to a base path **NOT** containing spaces. 44 | This configuration is not supported by debootstrap and will lead to `pi-gen` not 45 | running. 46 | 47 | After cloning the repository, you can move to the next step and start configuring 48 | your build. 49 | 50 | ## Config 51 | 52 | Upon execution, `build.sh` will source the file `config` in the current 53 | working directory. This bash shell fragment is intended to set needed 54 | environment variables. 55 | 56 | The following environment variables are supported: 57 | 58 | * `IMG_NAME` (Default: `raspios-$RELEASE-$ARCH`, for example: `raspios-bookworm-armhf`) 59 | 60 | The name of the image to build with the current stage directories. Use this 61 | variable to set the root name of your OS, eg `IMG_NAME=Frobulator`. 62 | Export files in stages may add suffixes to `IMG_NAME`. 63 | 64 | * `PI_GEN_RELEASE` (Default: `Raspberry Pi reference`) 65 | 66 | The release name to use in `/etc/issue.txt`. The default should only be used 67 | for official Raspberry Pi builds. 68 | 69 | * `RELEASE` (Default: `bookworm`) 70 | 71 | The release version to build images against. Valid values are any supported 72 | Debian release. However, since different releases will have different sets of 73 | packages available, you'll need to either modify your stages accordingly, or 74 | checkout the appropriate branch. For example, if you'd like to build a 75 | `bullseye` image, you should do so from the `bullseye` branch. 76 | 77 | * `APT_PROXY` (Default: unset) 78 | 79 | If you require the use of an apt proxy, set it here. This proxy setting 80 | will not be included in the image, making it safe to use an `apt-cacher` or 81 | similar package for development. 82 | 83 | * `TEMP_REPO` (Default: unset) 84 | 85 | An additional temporary apt repo to be used during the build process. This 86 | could be useful if you require pre-release software to be included in the 87 | image. The variable should contain sources in [one-line-style format](https://manpages.debian.org/stable/apt/sources.list.5.en.html#ONE-LINE-STYLE_FORMAT). 88 | "RELEASE" will be replaced with the RELEASE variable. 89 | 90 | * `BASE_DIR` (Default: location of `build.sh`) 91 | 92 | **CAUTION**: Currently, changing this value will probably break build.sh 93 | 94 | Top-level directory for `pi-gen`. Contains stage directories, build 95 | scripts, and by default both work and deployment directories. 96 | 97 | * `WORK_DIR` (Default: `$BASE_DIR/work`) 98 | 99 | Directory in which `pi-gen` builds the target system. This value can be 100 | changed if you have a suitably large, fast storage location for stages to 101 | be built and cached. Note, `WORK_DIR` stores a complete copy of the target 102 | system for each build stage, amounting to tens of gigabytes in the case of 103 | Raspbian. 104 | 105 | **CAUTION**: If your working directory is on an NTFS partition you probably won't be able to build: make sure this is a proper Linux filesystem. 106 | 107 | * `DEPLOY_DIR` (Default: `$BASE_DIR/deploy`) 108 | 109 | Output directory for target system images and NOOBS bundles. 110 | 111 | * `DEPLOY_COMPRESSION` (Default: `zip`) 112 | 113 | Set to: 114 | * `none` to deploy the actual image (`.img`). 115 | * `zip` to deploy a zipped image (`.zip`). 116 | * `gz` to deploy a gzipped image (`.img.gz`). 117 | * `xz` to deploy a xzipped image (`.img.xz`). 118 | 119 | 120 | * `DEPLOY_ZIP` (Deprecated) 121 | 122 | This option has been deprecated in favor of `DEPLOY_COMPRESSION`. 123 | 124 | If `DEPLOY_ZIP=0` is still present in your config file, the behavior is the 125 | same as with `DEPLOY_COMPRESSION=none`. 126 | 127 | * `COMPRESSION_LEVEL` (Default: `6`) 128 | 129 | Compression level to be used when using `zip`, `gz` or `xz` for 130 | `DEPLOY_COMPRESSION`. From 0 to 9 (refer to the tool man page for more 131 | information on this. Usually 0 is no compression but very fast, up to 9 with 132 | the best compression but very slow ). 133 | 134 | * `USE_QEMU` (Default: `0`) 135 | 136 | Setting to '1' enables the QEMU mode - creating an image that can be mounted via QEMU for an emulated 137 | environment. These images include "-qemu" in the image file name. 138 | 139 | * `LOCALE_DEFAULT` (Default: 'en_GB.UTF-8' ) 140 | 141 | Default system locale. 142 | 143 | * `TARGET_HOSTNAME` (Default: 'raspberrypi' ) 144 | 145 | Setting the hostname to the specified value. 146 | 147 | * `KEYBOARD_KEYMAP` (Default: 'gb' ) 148 | 149 | Default keyboard keymap. 150 | 151 | To get the current value from a running system, run `debconf-show 152 | keyboard-configuration` and look at the 153 | `keyboard-configuration/xkb-keymap` value. 154 | 155 | * `KEYBOARD_LAYOUT` (Default: 'English (UK)' ) 156 | 157 | Default keyboard layout. 158 | 159 | To get the current value from a running system, run `debconf-show 160 | keyboard-configuration` and look at the 161 | `keyboard-configuration/variant` value. 162 | 163 | * `TIMEZONE_DEFAULT` (Default: 'Europe/London' ) 164 | 165 | Default time zone. 166 | 167 | To get the current value from a running system, look in 168 | `/etc/timezone`. 169 | 170 | * `FIRST_USER_NAME` (Default: `pi`) 171 | 172 | Username for the first user. This user only exists during the image creation process. Unless 173 | `DISABLE_FIRST_BOOT_USER_RENAME` is set to `1`, this user will be renamed on the first boot with 174 | a name chosen by the final user. This security feature is designed to prevent shipping images 175 | with a default username and help prevent malicious actors from taking over your devices. 176 | 177 | * `FIRST_USER_PASS` (Default: unset) 178 | 179 | Password for the first user. If unset, the account is locked. 180 | 181 | * `DISABLE_FIRST_BOOT_USER_RENAME` (Default: `0`) 182 | 183 | Disable the renaming of the first user during the first boot. This make it so `FIRST_USER_NAME` 184 | stays activated. `FIRST_USER_PASS` must be set for this to work. Please be aware of the implied 185 | security risk of defining a default username and password for your devices. 186 | 187 | * `WPA_COUNTRY` (Default: unset) 188 | 189 | Sets the default WLAN regulatory domain and unblocks WLAN interfaces. This should be a 2-letter ISO/IEC 3166 country Code, i.e. `GB` 190 | 191 | * `ENABLE_SSH` (Default: `0`) 192 | 193 | Setting to `1` will enable ssh server for remote log in. Note that if you are using a common password such as the defaults there is a high risk of attackers taking over you Raspberry Pi. 194 | 195 | * `PUBKEY_SSH_FIRST_USER` (Default: unset) 196 | 197 | Setting this to a value will make that value the contents of the FIRST_USER_NAME's ~/.ssh/authorized_keys. Obviously the value should 198 | therefore be a valid authorized_keys file. Note that this does not 199 | automatically enable SSH. 200 | 201 | * `PUBKEY_ONLY_SSH` (Default: `0`) 202 | 203 | * Setting to `1` will disable password authentication for SSH and enable 204 | public key authentication. Note that if SSH is not enabled this will take 205 | effect when SSH becomes enabled. 206 | 207 | * `SETFCAP` (Default: unset) 208 | 209 | * Setting to `1` will prevent pi-gen from dropping the "capabilities" 210 | feature. Generating the root filesystem with capabilities enabled and running 211 | it from a filesystem that does not support capabilities (like NFS) can cause 212 | issues. Only enable this if you understand what it is. 213 | 214 | * `STAGE_LIST` (Default: `stage*`) 215 | 216 | If set, then instead of working through the numeric stages in order, this list will be followed. For example setting to `"stage0 stage1 mystage stage2"` will run the contents of `mystage` before stage2. Note that quotes are needed around the list. An absolute or relative path can be given for stages outside the pi-gen directory. 217 | 218 | * `EXPORT_CONFIG_DIR` (Default: `$BASE_DIR/export-image`) 219 | 220 | If set, use this directory path as the location of scripts to run when generating images. An absolute or relative path can be given for a location outside the pi-gen directory. 221 | 222 | A simple example for building Raspberry Pi OS: 223 | 224 | ```bash 225 | IMG_NAME='raspios' 226 | ``` 227 | 228 | The config file can also be specified on the command line as an argument the `build.sh` or `build-docker.sh` scripts. 229 | 230 | ``` 231 | ./build.sh -c myconfig 232 | ``` 233 | 234 | This is parsed after `config` so can be used to override values set there. 235 | 236 | ## How the build process works 237 | 238 | The following process is followed to build images: 239 | 240 | * Iterate through all of the stage directories in alphanumeric order 241 | 242 | * Bypass a stage directory if it contains a file called 243 | "SKIP" 244 | 245 | * Run the script `prerun.sh` which is generally just used to copy the build 246 | directory between stages. 247 | 248 | * In each stage directory iterate through each subdirectory and then run each of the 249 | install scripts it contains, again in alphanumeric order. **These need to be named 250 | with a two digit padded number at the beginning.** 251 | There are a number of different files and directories which can be used to 252 | control different parts of the build process: 253 | 254 | - **00-run.sh** - A unix shell script. Needs to be made executable for it to run. 255 | 256 | - **00-run-chroot.sh** - A unix shell script which will be run in the chroot 257 | of the image build directory. Needs to be made executable for it to run. 258 | 259 | - **00-debconf** - Contents of this file are passed to debconf-set-selections 260 | to configure things like locale, etc. 261 | 262 | - **00-packages** - A list of packages to install. Can have more than one, space 263 | separated, per line. 264 | 265 | - **00-packages-nr** - As 00-packages, except these will be installed using 266 | the `--no-install-recommends -y` parameters to apt-get. 267 | 268 | - **00-patches** - A directory containing patch files to be applied, using quilt. 269 | If a file named 'EDIT' is present in the directory, the build process will 270 | be interrupted with a bash session, allowing an opportunity to create/revise 271 | the patches. 272 | 273 | * If the stage directory contains files called "EXPORT_NOOBS" or "EXPORT_IMAGE" then 274 | add this stage to a list of images to generate 275 | 276 | * Generate the images for any stages that have specified them 277 | 278 | It is recommended to examine build.sh for finer details. 279 | 280 | 281 | ## Docker Build 282 | 283 | Docker can be used to perform the build inside a container. This partially isolates 284 | the build from the host system, and allows using the script on non-debian based 285 | systems (e.g. Fedora Linux). The isolation is not complete due to the need to use 286 | some kernel level services for arm emulation (binfmt) and loop devices (losetup). 287 | 288 | To build: 289 | 290 | ```bash 291 | vi config # Edit your config file. See above. 292 | ./build-docker.sh 293 | ``` 294 | 295 | If everything goes well, your finished image will be in the `deploy/` folder. 296 | You can then remove the build container with `docker rm -v pigen_work` 297 | 298 | If you encounter errors during the build, you can edit the corresponding scripts, and 299 | continue: 300 | 301 | ```bash 302 | CONTINUE=1 ./build-docker.sh 303 | ``` 304 | 305 | To examine the container after a failure you can enter a shell within it using: 306 | 307 | ```bash 308 | sudo docker run -it --privileged --volumes-from=pigen_work pi-gen /bin/bash 309 | ``` 310 | 311 | After successful build, the build container is by default removed. This may be undesired when making incremental changes to a customized build. To prevent the build script from remove the container add 312 | 313 | ```bash 314 | PRESERVE_CONTAINER=1 ./build-docker.sh 315 | ``` 316 | 317 | There is a possibility that even when running from a docker container, the 318 | installation of `qemu-user-static` will silently fail when building the image 319 | because `binfmt-support` _must be enabled on the underlying kernel_. An easy 320 | fix is to ensure `binfmt-support` is installed on the host machine before 321 | starting the `./build-docker.sh` script (or using your own docker build 322 | solution). 323 | 324 | ### Passing arguments to Docker 325 | 326 | When the docker image is run various required command line arguments are provided. For example the system mounts the `/dev` directory to the `/dev` directory within the docker container. If other arguments are required they may be specified in the PIGEN_DOCKER_OPTS environment variable. For example setting `PIGEN_DOCKER_OPTS="--add-host foo:192.168.0.23"` will add '192.168.0.23 foo' to the `/etc/hosts` file in the container. The `--name` 327 | and `--privileged` options are already set by the script and should not be redefined. 328 | 329 | ## Stage Anatomy 330 | 331 | ### Raspbian Stage Overview 332 | 333 | The build of Raspbian is divided up into several stages for logical clarity 334 | and modularity. This causes some initial complexity, but it simplifies 335 | maintenance and allows for more easy customization. 336 | 337 | - **Stage 0** - bootstrap. The primary purpose of this stage is to create a 338 | usable filesystem. This is accomplished largely through the use of 339 | `debootstrap`, which creates a minimal filesystem suitable for use as a 340 | base.tgz on Debian systems. This stage also configures apt settings and 341 | installs `raspberrypi-bootloader` which is missed by debootstrap. The 342 | minimal core is installed but not configured. As a result, this stage will not boot. 343 | 344 | - **Stage 1** - truly minimal system. This stage makes the system bootable by 345 | installing system files like `/etc/fstab`, configures the bootloader, makes 346 | the network operable, and installs packages like raspi-config. At this 347 | stage the system should boot to a local console from which you have the 348 | means to perform basic tasks needed to configure and install the system. 349 | 350 | - **Stage 2** - lite system. This stage produces the Raspberry Pi OS Lite image. 351 | Stage 2 installs some optimized memory functions, sets timezone and charmap 352 | defaults, installs fake-hwclock and ntp, wireless LAN and bluetooth support, 353 | dphys-swapfile, and other basics for managing the hardware. It also 354 | creates necessary groups and gives the pi user access to sudo and the 355 | standard console hardware permission groups. 356 | 357 | Note: Raspberry Pi OS Lite contains a number of tools for development, 358 | including `Python`, `Lua` and the `build-essential` package. If you are 359 | creating an image to deploy in products, be sure to remove extraneous development 360 | tools before deployment. 361 | 362 | - **Stage 3** - desktop system. Here's where you get the full desktop system 363 | with X11 and LXDE, web browsers, git for development, Raspberry Pi OS custom UI 364 | enhancements, etc. This is a base desktop system, with some development 365 | tools installed. 366 | 367 | - **Stage 4** - Normal Raspberry Pi OS image. System meant to fit on a 4GB card. 368 | This is the stage that installs most things that make Raspberry Pi OS friendly 369 | to new users - e.g. system documentation. 370 | 371 | - **Stage 5** - The Raspberry Pi OS Full image. More development 372 | tools, an email client, learning tools like Scratch, specialized packages 373 | like sonic-pi, office productivity, etc. 374 | 375 | ### Stage specification 376 | 377 | If you wish to build up to a specified stage (such as building up to stage 2 378 | for a lite system), place an empty file named `SKIP` in each of the `./stage` 379 | directories you wish not to include. 380 | 381 | Then add an empty file named `SKIP_IMAGES` to `./stage4` and `./stage5` (if building up to stage 2) or 382 | to `./stage2` (if building a minimal system). 383 | 384 | ```bash 385 | # Example for building a lite system 386 | echo "IMG_NAME='raspios'" > config 387 | touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP 388 | touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES 389 | sudo ./build.sh # or ./build-docker.sh 390 | ``` 391 | 392 | If you wish to build further configurations upon (for example) the lite 393 | system, you can also delete the contents of `./stage3` and `./stage4` and 394 | replace with your own contents in the same format. 395 | 396 | 397 | ## Skipping stages to speed up development 398 | 399 | If you're working on a specific stage the recommended development process is as 400 | follows: 401 | 402 | * Add a file called SKIP_IMAGES into the directories containing EXPORT_* files 403 | (currently stage2, stage4 and stage5) 404 | * Add SKIP files to the stages you don't want to build. For example, if you're 405 | basing your image on the lite image you would add these to stages 3, 4 and 5. 406 | * Run build.sh to build all stages 407 | * Add SKIP files to the earlier successfully built stages 408 | * Modify the last stage 409 | * Rebuild just the last stage using `sudo CLEAN=1 ./build.sh` (or, for docker builds 410 | `PRESERVE_CONTAINER=1 CONTINUE=1 CLEAN=1 ./build-docker.sh`) 411 | * Once you're happy with the image you can remove the SKIP_IMAGES files and 412 | export your image to test 413 | 414 | # Troubleshooting 415 | 416 | ## `64 Bit Systems` 417 | A 64 bit image can be generated from the `arm64` branch in this repository. Just 418 | replace the command from [this section](#getting-started-with-building-your-images) 419 | by the one below, and follow the rest of the documentation: 420 | ```bash 421 | git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git 422 | ``` 423 | 424 | If you want to generate a 64 bits image from a Raspberry Pi running a 32 bits 425 | version, you need to add `arm_64bit=1` to your `config.txt` file and reboot your 426 | machine. This will restart your machine with a 64 bits kernel. This will only 427 | work from a Raspberry Pi with a 64-bit capable processor (i.e. Raspberry Pi Zero 428 | 2, Raspberry Pi 3 or Raspberry Pi 4). 429 | 430 | 431 | ## `binfmt_misc` 432 | 433 | Linux is able to execute binaries from other architectures, meaning that it should be 434 | possible to make use of `pi-gen` on an x86_64 system, even though it will be running 435 | ARM binaries. This requires support from the [`binfmt_misc`](https://en.wikipedia.org/wiki/Binfmt_misc) 436 | kernel module. 437 | 438 | You may see one of the following errors: 439 | 440 | ``` 441 | update-binfmts: warning: Couldn't load the binfmt_misc module. 442 | ``` 443 | ``` 444 | W: Failure trying to run: chroot "/pi-gen/work/test/stage0/rootfs" /bin/true 445 | and/or 446 | chroot: failed to run command '/bin/true': Exec format error 447 | ``` 448 | 449 | To resolve this, ensure that the following files are available (install them if necessary): 450 | 451 | ``` 452 | /lib/modules/$(uname -r)/kernel/fs/binfmt_misc.ko 453 | /usr/bin/qemu-arm-static 454 | ``` 455 | 456 | You may also need to load the module by hand - run `modprobe binfmt_misc`. 457 | 458 | If you are using WSL to build you may have to enable the service `sudo update-binfmts --enable` 459 | -------------------------------------------------------------------------------- /build-docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Note: Avoid usage of arrays as MacOS users have an older version of bash (v3.x) which does not supports arrays 3 | set -eu 4 | 5 | DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)" 6 | 7 | BUILD_OPTS="$*" 8 | 9 | # Allow user to override docker command 10 | DOCKER=${DOCKER:-docker} 11 | 12 | # Ensure that default docker command is not set up in rootless mode 13 | if \ 14 | ! ${DOCKER} ps >/dev/null 2>&1 || \ 15 | ${DOCKER} info 2>/dev/null | grep -q rootless \ 16 | ; then 17 | DOCKER="sudo ${DOCKER}" 18 | fi 19 | if ! ${DOCKER} ps >/dev/null; then 20 | echo "error connecting to docker:" 21 | ${DOCKER} ps 22 | exit 1 23 | fi 24 | 25 | CONFIG_FILE="" 26 | if [ -f "${DIR}/config" ]; then 27 | CONFIG_FILE="${DIR}/config" 28 | fi 29 | 30 | while getopts "c:" flag 31 | do 32 | case "${flag}" in 33 | c) 34 | CONFIG_FILE="${OPTARG}" 35 | ;; 36 | *) 37 | ;; 38 | esac 39 | done 40 | 41 | # Ensure that the configuration file is an absolute path 42 | if test -x /usr/bin/realpath; then 43 | CONFIG_FILE=$(realpath -s "$CONFIG_FILE" || realpath "$CONFIG_FILE") 44 | fi 45 | 46 | # Ensure that the confguration file is present 47 | if test -z "${CONFIG_FILE}"; then 48 | echo "Configuration file need to be present in '${DIR}/config' or path passed as parameter" 49 | exit 1 50 | else 51 | # shellcheck disable=SC1090 52 | source ${CONFIG_FILE} 53 | fi 54 | 55 | CONTAINER_NAME=${CONTAINER_NAME:-pigen_work} 56 | CONTINUE=${CONTINUE:-0} 57 | PRESERVE_CONTAINER=${PRESERVE_CONTAINER:-0} 58 | PIGEN_DOCKER_OPTS=${PIGEN_DOCKER_OPTS:-""} 59 | 60 | if [ -z "${IMG_NAME}" ]; then 61 | echo "IMG_NAME not set in 'config'" 1>&2 62 | echo 1>&2 63 | exit 1 64 | fi 65 | 66 | # Ensure the Git Hash is recorded before entering the docker container 67 | GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} 68 | 69 | CONTAINER_EXISTS=$(${DOCKER} ps -a --filter name="${CONTAINER_NAME}" -q) 70 | CONTAINER_RUNNING=$(${DOCKER} ps --filter name="${CONTAINER_NAME}" -q) 71 | if [ "${CONTAINER_RUNNING}" != "" ]; then 72 | echo "The build is already running in container ${CONTAINER_NAME}. Aborting." 73 | exit 1 74 | fi 75 | if [ "${CONTAINER_EXISTS}" != "" ] && [ "${CONTINUE}" != "1" ]; then 76 | echo "Container ${CONTAINER_NAME} already exists and you did not specify CONTINUE=1. Aborting." 77 | echo "You can delete the existing container like this:" 78 | echo " ${DOCKER} rm -v ${CONTAINER_NAME}" 79 | exit 1 80 | fi 81 | 82 | # Modify original build-options to allow config file to be mounted in the docker container 83 | BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" 84 | 85 | # Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead 86 | case "$(uname -m)" in 87 | x86_64|aarch64) 88 | BASE_IMAGE=i386/debian:bookworm 89 | ;; 90 | *) 91 | BASE_IMAGE=debian:bookworm 92 | ;; 93 | esac 94 | ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" 95 | 96 | if [ "${CONTAINER_EXISTS}" != "" ]; then 97 | DOCKER_CMDLINE_NAME="${CONTAINER_NAME}_cont" 98 | DOCKER_CMDLINE_PRE="--rm" 99 | DOCKER_CMDLINE_POST="--volumes-from=${CONTAINER_NAME}" 100 | else 101 | DOCKER_CMDLINE_NAME="${CONTAINER_NAME}" 102 | DOCKER_CMDLINE_PRE="" 103 | DOCKER_CMDLINE_POST="" 104 | fi 105 | 106 | # Check if binfmt_misc is required 107 | binfmt_misc_required=1 108 | case $(uname -m) in 109 | aarch64) 110 | binfmt_misc_required=0 111 | ;; 112 | arm*) 113 | binfmt_misc_required=0 114 | ;; 115 | esac 116 | 117 | # Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present 118 | if [[ "${binfmt_misc_required}" == "1" ]]; then 119 | if ! qemu_arm=$(which qemu-arm-static) ; then 120 | echo "qemu-arm-static not found (please install qemu-user-static)" 121 | exit 1 122 | fi 123 | if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then 124 | echo "binfmt_misc required but not mounted, trying to mount it..." 125 | if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then 126 | echo "mounting binfmt_misc failed" 127 | exit 1 128 | fi 129 | echo "binfmt_misc mounted" 130 | fi 131 | if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then 132 | # Register qemu-arm for binfmt_misc 133 | reg="echo ':qemu-arm-rpi:M::"\ 134 | "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\ 135 | "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\ 136 | "${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register" 137 | echo "Registering qemu-arm for binfmt_misc..." 138 | sudo bash -c "${reg}" 2>/dev/null || true 139 | fi 140 | fi 141 | 142 | trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM 143 | time ${DOCKER} run \ 144 | $DOCKER_CMDLINE_PRE \ 145 | --name "${DOCKER_CMDLINE_NAME}" \ 146 | --privileged \ 147 | ${PIGEN_DOCKER_OPTS} \ 148 | --volume "${CONFIG_FILE}":/config:ro \ 149 | -e "GIT_HASH=${GIT_HASH}" \ 150 | $DOCKER_CMDLINE_POST \ 151 | pi-gen \ 152 | bash -e -o pipefail -c " 153 | dpkg-reconfigure qemu-user-static && 154 | # binfmt_misc is sometimes not mounted with debian bookworm image 155 | (mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) && 156 | cd /pi-gen; ./build.sh ${BUILD_OPTS} && 157 | rsync -av work/*/build.log deploy/ 158 | " & 159 | wait "$!" 160 | 161 | # Ensure that deploy/ is always owned by calling user 162 | echo "copying results from deploy/" 163 | ${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf - 164 | 165 | echo "copying log from container ${CONTAINER_NAME} to deploy/" 166 | ${DOCKER} logs --timestamps "${CONTAINER_NAME}" &>deploy/build-docker.log 167 | 168 | ls -lah deploy 169 | 170 | # cleanup 171 | if [ "${PRESERVE_CONTAINER}" != "1" ]; then 172 | ${DOCKER} rm -v "${CONTAINER_NAME}" 173 | fi 174 | 175 | echo "Done! Your image(s) should be in deploy/" 176 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # shellcheck disable=SC2119 4 | run_sub_stage() 5 | { 6 | log "Begin ${SUB_STAGE_DIR}" 7 | pushd "${SUB_STAGE_DIR}" > /dev/null 8 | for i in {00..99}; do 9 | if [ -f "${i}-debconf" ]; then 10 | log "Begin ${SUB_STAGE_DIR}/${i}-debconf" 11 | on_chroot << EOF 12 | debconf-set-selections < /dev/null 42 | if [ "${CLEAN}" = "1" ]; then 43 | rm -rf .pc 44 | rm -rf ./*-pc 45 | fi 46 | QUILT_PATCHES="${SUB_STAGE_DIR}/${i}-patches" 47 | SUB_STAGE_QUILT_PATCH_DIR="$(basename "$SUB_STAGE_DIR")-pc" 48 | mkdir -p "$SUB_STAGE_QUILT_PATCH_DIR" 49 | ln -snf "$SUB_STAGE_QUILT_PATCH_DIR" .pc 50 | quilt upgrade 51 | if [ -e "${SUB_STAGE_DIR}/${i}-patches/EDIT" ]; then 52 | echo "Dropping into bash to edit patches..." 53 | bash 54 | fi 55 | RC=0 56 | quilt push -a || RC=$? 57 | case "$RC" in 58 | 0|2) 59 | ;; 60 | *) 61 | false 62 | ;; 63 | esac 64 | popd > /dev/null 65 | log "End ${SUB_STAGE_DIR}/${i}-patches" 66 | fi 67 | if [ -x ${i}-run.sh ]; then 68 | log "Begin ${SUB_STAGE_DIR}/${i}-run.sh" 69 | ./${i}-run.sh 70 | log "End ${SUB_STAGE_DIR}/${i}-run.sh" 71 | fi 72 | if [ -f ${i}-run-chroot.sh ]; then 73 | log "Begin ${SUB_STAGE_DIR}/${i}-run-chroot.sh" 74 | on_chroot < ${i}-run-chroot.sh 75 | log "End ${SUB_STAGE_DIR}/${i}-run-chroot.sh" 76 | fi 77 | done 78 | popd > /dev/null 79 | log "End ${SUB_STAGE_DIR}" 80 | } 81 | 82 | 83 | run_stage(){ 84 | log "Begin ${STAGE_DIR}" 85 | STAGE="$(basename "${STAGE_DIR}")" 86 | 87 | pushd "${STAGE_DIR}" > /dev/null 88 | 89 | STAGE_WORK_DIR="${WORK_DIR}/${STAGE}" 90 | ROOTFS_DIR="${STAGE_WORK_DIR}"/rootfs 91 | 92 | unmount "${WORK_DIR}/${STAGE}" 93 | 94 | if [ ! -f SKIP_IMAGES ]; then 95 | if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ]; then 96 | EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}" 97 | fi 98 | fi 99 | if [ ! -f SKIP ]; then 100 | if [ "${CLEAN}" = "1" ]; then 101 | if [ -d "${ROOTFS_DIR}" ]; then 102 | rm -rf "${ROOTFS_DIR}" 103 | fi 104 | fi 105 | if [ -x prerun.sh ]; then 106 | log "Begin ${STAGE_DIR}/prerun.sh" 107 | ./prerun.sh 108 | log "End ${STAGE_DIR}/prerun.sh" 109 | fi 110 | for SUB_STAGE_DIR in "${STAGE_DIR}"/*; do 111 | if [ -d "${SUB_STAGE_DIR}" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP" ]; then 112 | run_sub_stage 113 | fi 114 | done 115 | fi 116 | 117 | unmount "${WORK_DIR}/${STAGE}" 118 | 119 | PREV_STAGE="${STAGE}" 120 | PREV_STAGE_DIR="${STAGE_DIR}" 121 | PREV_ROOTFS_DIR="${ROOTFS_DIR}" 122 | popd > /dev/null 123 | log "End ${STAGE_DIR}" 124 | } 125 | 126 | term() { 127 | if [ "$?" -ne 0 ]; then 128 | log "Build failed" 129 | else 130 | log "Build finished" 131 | fi 132 | unmount "${STAGE_WORK_DIR}" 133 | if [ "$STAGE" = "export-image" ]; then 134 | for img in "${STAGE_WORK_DIR}/"*.img; do 135 | unmount_image "$img" 136 | done 137 | fi 138 | } 139 | 140 | if [ "$(id -u)" != "0" ]; then 141 | echo "Please run as root" 1>&2 142 | exit 1 143 | fi 144 | 145 | BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 146 | 147 | if [[ $BASE_DIR = *" "* ]]; then 148 | echo "There is a space in the base path of pi-gen" 149 | echo "This is not a valid setup supported by debootstrap." 150 | echo "Please remove the spaces, or move pi-gen directory to a base path without spaces" 1>&2 151 | exit 1 152 | fi 153 | 154 | export BASE_DIR 155 | 156 | if [ -f config ]; then 157 | # shellcheck disable=SC1091 158 | source config 159 | fi 160 | 161 | while getopts "c:" flag 162 | do 163 | case "$flag" in 164 | c) 165 | EXTRA_CONFIG="$OPTARG" 166 | # shellcheck disable=SC1090 167 | source "$EXTRA_CONFIG" 168 | ;; 169 | *) 170 | ;; 171 | esac 172 | done 173 | 174 | export PI_GEN=${PI_GEN:-pi-gen} 175 | export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen} 176 | export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference} 177 | 178 | export ARCH=armhf 179 | export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh 180 | export IMG_NAME="${IMG_NAME:-raspios-$RELEASE-$ARCH}" 181 | 182 | export USE_QEMU="${USE_QEMU:-0}" 183 | export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" 184 | export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}" 185 | export ARCHIVE_FILENAME="${ARCHIVE_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" 186 | 187 | export SCRIPT_DIR="${BASE_DIR}/scripts" 188 | export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_NAME}"}" 189 | export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"} 190 | 191 | # DEPLOY_ZIP was deprecated in favor of DEPLOY_COMPRESSION 192 | # This preserve the old behavior with DEPLOY_ZIP=0 where no archive was created 193 | if [ -z "${DEPLOY_COMPRESSION}" ] && [ "${DEPLOY_ZIP:-1}" = "0" ]; then 194 | echo "DEPLOY_ZIP has been deprecated in favor of DEPLOY_COMPRESSION" 195 | echo "Similar behavior to DEPLOY_ZIP=0 can be obtained with DEPLOY_COMPRESSION=none" 196 | echo "Please update your config file" 197 | DEPLOY_COMPRESSION=none 198 | fi 199 | export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-zip} 200 | export COMPRESSION_LEVEL=${COMPRESSION_LEVEL:-6} 201 | export LOG_FILE="${WORK_DIR}/build.log" 202 | 203 | export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} 204 | 205 | export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} 206 | export FIRST_USER_PASS 207 | export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0} 208 | export WPA_COUNTRY 209 | export ENABLE_SSH="${ENABLE_SSH:-0}" 210 | export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}" 211 | 212 | export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_GB.UTF-8}" 213 | 214 | export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-gb}" 215 | export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}" 216 | 217 | export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}" 218 | 219 | export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} 220 | 221 | export PUBKEY_SSH_FIRST_USER 222 | 223 | export CLEAN 224 | export APT_PROXY 225 | export TEMP_REPO 226 | 227 | export STAGE 228 | export STAGE_DIR 229 | export STAGE_WORK_DIR 230 | export PREV_STAGE 231 | export PREV_STAGE_DIR 232 | export ROOTFS_DIR 233 | export PREV_ROOTFS_DIR 234 | export IMG_SUFFIX 235 | export NOOBS_NAME 236 | export NOOBS_DESCRIPTION 237 | export EXPORT_DIR 238 | export EXPORT_ROOTFS_DIR 239 | 240 | export QUILT_PATCHES 241 | export QUILT_NO_DIFF_INDEX=1 242 | export QUILT_NO_DIFF_TIMESTAMPS=1 243 | export QUILT_REFRESH_ARGS="-p ab" 244 | 245 | # shellcheck source=scripts/common 246 | source "${SCRIPT_DIR}/common" 247 | # shellcheck source=scripts/dependencies_check 248 | source "${SCRIPT_DIR}/dependencies_check" 249 | 250 | if [ "$SETFCAP" != "1" ]; then 251 | export CAPSH_ARG="--drop=cap_setfcap" 252 | fi 253 | 254 | mkdir -p "${WORK_DIR}" 255 | trap term EXIT INT TERM 256 | 257 | dependencies_check "${BASE_DIR}/depends" 258 | 259 | 260 | PAGESIZE=$(getconf PAGESIZE) 261 | if [ "$ARCH" == "armhf" ] && [ "$PAGESIZE" != "4096" ]; then 262 | echo 263 | echo "ERROR: Building an $ARCH image requires a kernel with a 4k page size (current: $PAGESIZE)" 264 | echo "On Raspberry Pi OS (64-bit), you can switch to a suitable kernel by adding the following to /boot/firmware/config.txt and rebooting:" 265 | echo 266 | echo "kernel=kernel8.img" 267 | echo "initramfs initramfs8 followkernel" 268 | echo 269 | exit 1 270 | fi 271 | 272 | echo "Checking native $ARCH executable support..." 273 | if ! arch-test -n "$ARCH"; then 274 | echo "WARNING: Only a native build environment is supported. Checking emulated support..." 275 | if ! arch-test "$ARCH"; then 276 | echo "No fallback mechanism found. Ensure your OS has binfmt_misc support enabled and configured." 277 | exit 1 278 | fi 279 | fi 280 | 281 | #check username is valid 282 | if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then 283 | echo "Invalid FIRST_USER_NAME: $FIRST_USER_NAME" 284 | exit 1 285 | fi 286 | 287 | if [[ "$DISABLE_FIRST_BOOT_USER_RENAME" == "1" ]] && [ -z "${FIRST_USER_PASS}" ]; then 288 | echo "To disable user rename on first boot, FIRST_USER_PASS needs to be set" 289 | echo "Not setting FIRST_USER_PASS makes your system vulnerable and open to cyberattacks" 290 | exit 1 291 | fi 292 | 293 | if [[ "$DISABLE_FIRST_BOOT_USER_RENAME" == "1" ]]; then 294 | echo "User rename on the first boot is disabled" 295 | echo "Be advised of the security risks linked to shipping a device with default username/password set." 296 | fi 297 | 298 | if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then 299 | echo "Could not reach APT_PROXY server: ${APT_PROXY}" 300 | exit 1 301 | fi 302 | 303 | if [[ -n "${WPA_PASSWORD}" && ${#WPA_PASSWORD} -lt 8 || ${#WPA_PASSWORD} -gt 63 ]] ; then 304 | echo "WPA_PASSWORD" must be between 8 and 63 characters 305 | exit 1 306 | fi 307 | 308 | if [[ "${PUBKEY_ONLY_SSH}" = "1" && -z "${PUBKEY_SSH_FIRST_USER}" ]]; then 309 | echo "Must set 'PUBKEY_SSH_FIRST_USER' to a valid SSH public key if using PUBKEY_ONLY_SSH" 310 | exit 1 311 | fi 312 | 313 | log "Begin ${BASE_DIR}" 314 | 315 | STAGE_LIST=${STAGE_LIST:-${BASE_DIR}/stage*} 316 | export STAGE_LIST 317 | 318 | EXPORT_CONFIG_DIR=$(realpath "${EXPORT_CONFIG_DIR:-"${BASE_DIR}/export-image"}") 319 | if [ ! -d "${EXPORT_CONFIG_DIR}" ]; then 320 | echo "EXPORT_CONFIG_DIR invalid: ${EXPORT_CONFIG_DIR} does not exist" 321 | exit 1 322 | fi 323 | export EXPORT_CONFIG_DIR 324 | 325 | for STAGE_DIR in $STAGE_LIST; do 326 | STAGE_DIR=$(realpath "${STAGE_DIR}") 327 | run_stage 328 | done 329 | 330 | CLEAN=1 331 | for EXPORT_DIR in ${EXPORT_DIRS}; do 332 | STAGE_DIR=${EXPORT_CONFIG_DIR} 333 | # shellcheck source=/dev/null 334 | source "${EXPORT_DIR}/EXPORT_IMAGE" 335 | EXPORT_ROOTFS_DIR=${WORK_DIR}/$(basename "${EXPORT_DIR}")/rootfs 336 | run_stage 337 | if [ "${USE_QEMU}" != "1" ]; then 338 | if [ -e "${EXPORT_DIR}/EXPORT_NOOBS" ]; then 339 | # shellcheck source=/dev/null 340 | source "${EXPORT_DIR}/EXPORT_NOOBS" 341 | STAGE_DIR="${BASE_DIR}/export-noobs" 342 | run_stage 343 | fi 344 | fi 345 | done 346 | 347 | if [ -x "${BASE_DIR}/postrun.sh" ]; then 348 | log "Begin postrun.sh" 349 | cd "${BASE_DIR}" 350 | ./postrun.sh 351 | log "End postrun.sh" 352 | fi 353 | 354 | log "End ${BASE_DIR}" 355 | -------------------------------------------------------------------------------- /depends: -------------------------------------------------------------------------------- 1 | quilt 2 | parted 3 | realpath:coreutils 4 | qemu-arm-static:qemu-user-static 5 | debootstrap 6 | zerofree 7 | zip 8 | mkdosfs:dosfstools 9 | capsh:libcap2-bin 10 | bsdtar:libarchive-tools 11 | grep 12 | rsync 13 | xz:xz-utils 14 | curl 15 | xxd 16 | file 17 | git 18 | lsmod:kmod 19 | bc 20 | gpg 21 | pigz 22 | arch-test 23 | -------------------------------------------------------------------------------- /export-image/00-allow-rerun/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then 4 | mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" 5 | fi 6 | -------------------------------------------------------------------------------- /export-image/01-user-rename/00-packages: -------------------------------------------------------------------------------- 1 | userconf-pi 2 | -------------------------------------------------------------------------------- /export-image/01-user-rename/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [[ "${DISABLE_FIRST_BOOT_USER_RENAME}" == "0" ]]; then 4 | on_chroot <<- EOF 5 | SUDO_USER="${FIRST_USER_NAME}" rename-user -f -s 6 | EOF 7 | else 8 | rm -f "${ROOTFS_DIR}/etc/xdg/autostart/piwiz.desktop" 9 | fi 10 | -------------------------------------------------------------------------------- /export-image/02-set-sources/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 4 | rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" 5 | find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete 6 | on_chroot << EOF 7 | apt-get update 8 | apt-get -y dist-upgrade --auto-remove --purge 9 | apt-get clean 10 | EOF 11 | -------------------------------------------------------------------------------- /export-image/03-network/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 644 files/resolv.conf "${ROOTFS_DIR}/etc/" 4 | -------------------------------------------------------------------------------- /export-image/03-network/files/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 8.8.8.8 2 | -------------------------------------------------------------------------------- /export-image/04-set-partuuid/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | 5 | IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')" 6 | 7 | BOOT_PARTUUID="${IMGID}-01" 8 | ROOT_PARTUUID="${IMGID}-02" 9 | 10 | sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" 11 | sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" 12 | 13 | sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/firmware/cmdline.txt" 14 | -------------------------------------------------------------------------------- /export-image/05-finalise/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info" 5 | SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom" 6 | BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap" 7 | 8 | on_chroot << EOF 9 | update-initramfs -k all -c 10 | if [ -x /etc/init.d/fake-hwclock ]; then 11 | /etc/init.d/fake-hwclock stop 12 | fi 13 | if hash hardlink 2>/dev/null; then 14 | hardlink -t /usr/share/doc 15 | fi 16 | EOF 17 | 18 | if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then 19 | sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" 20 | sed -i 's/^MODULES=.*/MODULES=dep/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" 21 | fi 22 | 23 | if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then 24 | chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" 25 | fi 26 | 27 | rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static" 28 | 29 | if [ "${USE_QEMU}" != "1" ]; then 30 | if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then 31 | mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload" 32 | fi 33 | fi 34 | 35 | rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old" 36 | 37 | rm -f "${ROOTFS_DIR}/etc/apt/sources.list~" 38 | rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~" 39 | 40 | rm -f "${ROOTFS_DIR}/etc/passwd-" 41 | rm -f "${ROOTFS_DIR}/etc/group-" 42 | rm -f "${ROOTFS_DIR}/etc/shadow-" 43 | rm -f "${ROOTFS_DIR}/etc/gshadow-" 44 | rm -f "${ROOTFS_DIR}/etc/subuid-" 45 | rm -f "${ROOTFS_DIR}/etc/subgid-" 46 | 47 | rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old 48 | rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old 49 | 50 | rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache 51 | 52 | rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id" 53 | 54 | true > "${ROOTFS_DIR}/etc/machine-id" 55 | 56 | ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab" 57 | 58 | find "${ROOTFS_DIR}/var/log/" -type f -exec cp /dev/null {} \; 59 | 60 | rm -f "${ROOTFS_DIR}/root/.vnc/private.key" 61 | rm -f "${ROOTFS_DIR}/etc/vnc/updateid" 62 | 63 | update_issue "$(basename "${EXPORT_DIR}")" 64 | install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/firmware/issue.txt" 65 | if ! [ -L "${ROOTFS_DIR}/boot/issue.txt" ]; then 66 | ln -s firmware/issue.txt "${ROOTFS_DIR}/boot/issue.txt" 67 | fi 68 | 69 | cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" 70 | 71 | { 72 | if [ -f "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" ]; then 73 | firmware=$(zgrep "firmware as of" \ 74 | "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ 75 | head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') 76 | printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" 77 | 78 | kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" 79 | printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" 80 | 81 | uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" 82 | printf "Uname string: %s\n" "$uname" 83 | fi 84 | 85 | printf "\nPackages:\n" 86 | dpkg -l --root "$ROOTFS_DIR" 87 | } >> "$INFO_FILE" 88 | 89 | if hash syft 2>/dev/null; then 90 | syft scan dir:"${ROOTFS_DIR}" \ 91 | --base-path="${ROOTFS_DIR}" \ 92 | --source-name="${IMG_NAME}${IMG_SUFFIX}" \ 93 | --source-version="${IMG_DATE}" \ 94 | -o spdx-json="${SBOM_FILE}" 95 | fi 96 | 97 | ROOT_DEV="$(awk "\$2 == \"${ROOTFS_DIR}\" {print \$1}" /etc/mtab)" 98 | 99 | unmount "${ROOTFS_DIR}" 100 | zerofree "${ROOT_DEV}" 101 | 102 | unmount_image "${IMG_FILE}" 103 | 104 | if hash bmaptool 2>/dev/null; then 105 | bmaptool create \ 106 | -o "${BMAP_FILE}" \ 107 | "${IMG_FILE}" 108 | fi 109 | 110 | mkdir -p "${DEPLOY_DIR}" 111 | 112 | rm -f "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.*" 113 | rm -f "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 114 | 115 | case "${DEPLOY_COMPRESSION}" in 116 | zip) 117 | pushd "${STAGE_WORK_DIR}" > /dev/null 118 | zip -"${COMPRESSION_LEVEL}" \ 119 | "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.zip" "$(basename "${IMG_FILE}")" 120 | popd > /dev/null 121 | ;; 122 | gz) 123 | pigz --force -"${COMPRESSION_LEVEL}" "$IMG_FILE" --stdout > \ 124 | "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.img.gz" 125 | ;; 126 | xz) 127 | xz --compress --force --threads 0 --memlimit-compress=50% -"${COMPRESSION_LEVEL}" \ 128 | --stdout "$IMG_FILE" > "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.img.xz" 129 | ;; 130 | none | *) 131 | cp "$IMG_FILE" "$DEPLOY_DIR/" 132 | ;; 133 | esac 134 | 135 | if [ -f "${SBOM_FILE}" ]; then 136 | xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/$(basename "${SBOM_FILE}").xz" 137 | fi 138 | if [ -f "${BMAP_FILE}" ]; then 139 | cp "$BMAP_FILE" "$DEPLOY_DIR/" 140 | fi 141 | cp "$INFO_FILE" "$DEPLOY_DIR/" 142 | -------------------------------------------------------------------------------- /export-image/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | 5 | unmount_image "${IMG_FILE}" 6 | 7 | rm -f "${IMG_FILE}" 8 | 9 | rm -rf "${ROOTFS_DIR}" 10 | mkdir -p "${ROOTFS_DIR}" 11 | 12 | BOOT_SIZE="$((512 * 1024 * 1024))" 13 | ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) 14 | 15 | # All partition sizes and starts will be aligned to this size 16 | ALIGN="$((8 * 1024 * 1024))" 17 | # Add this much space to the calculated file size. This allows for 18 | # some overhead (since actual space usage is usually rounded up to the 19 | # filesystem block size) and gives some free space on the resulting 20 | # image. 21 | ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)" 22 | 23 | BOOT_PART_START=$((ALIGN)) 24 | BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN)) 25 | ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE)) 26 | ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN)) 27 | IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE)) 28 | 29 | truncate -s "${IMG_SIZE}" "${IMG_FILE}" 30 | 31 | parted --script "${IMG_FILE}" mklabel msdos 32 | parted --script "${IMG_FILE}" unit B mkpart primary fat32 "${BOOT_PART_START}" "$((BOOT_PART_START + BOOT_PART_SIZE - 1))" 33 | parted --script "${IMG_FILE}" unit B mkpart primary ext4 "${ROOT_PART_START}" "$((ROOT_PART_START + ROOT_PART_SIZE - 1))" 34 | 35 | echo "Creating loop device..." 36 | cnt=0 37 | until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do 38 | if [ $cnt -lt 5 ]; then 39 | cnt=$((cnt + 1)) 40 | echo "Error in losetup. Retrying..." 41 | sleep 5 42 | else 43 | echo "ERROR: losetup failed; exiting" 44 | exit 1 45 | fi 46 | done 47 | 48 | ensure_loopdev_partitions "$LOOP_DEV" 49 | BOOT_DEV="${LOOP_DEV}p1" 50 | ROOT_DEV="${LOOP_DEV}p2" 51 | 52 | ROOT_FEATURES="^huge_file" 53 | for FEATURE in 64bit; do 54 | if grep -q "$FEATURE" /etc/mke2fs.conf; then 55 | ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES" 56 | fi 57 | done 58 | 59 | if [ "$BOOT_SIZE" -lt 134742016 ]; then 60 | FAT_SIZE=16 61 | else 62 | FAT_SIZE=32 63 | fi 64 | 65 | mkdosfs -n bootfs -F "$FAT_SIZE" -s 4 -v "$BOOT_DEV" > /dev/null 66 | mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null 67 | 68 | mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4 69 | mkdir -p "${ROOTFS_DIR}/boot/firmware" 70 | mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat 71 | 72 | rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/" 73 | rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/" 74 | -------------------------------------------------------------------------------- /export-noobs/00-release/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}" 4 | 5 | install -v -m 744 files/partition_setup.sh "${NOOBS_DIR}/" 6 | install -v files/partitions.json "${NOOBS_DIR}/" 7 | install -v files/os.json "${NOOBS_DIR}/" 8 | install -v files/OS.png "${NOOBS_DIR}/" 9 | install -v files/release_notes.txt "${NOOBS_DIR}/" 10 | 11 | tar -v -c -C files/marketing -f "${NOOBS_DIR}/marketing.tar" . 12 | 13 | BOOT_SHASUM="$(sha256sum "${NOOBS_DIR}/boot.tar.xz" | cut -f1 -d' ')" 14 | ROOT_SHASUM="$(sha256sum "${NOOBS_DIR}/root.tar.xz" | cut -f1 -d' ')" 15 | 16 | BOOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/boot.tar.xz" | grep totals | cut -f 5)" 17 | ROOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/root.tar.xz" | grep totals | cut -f 5)" 18 | 19 | BOOT_SIZE="$(( BOOT_SIZE / 1024 / 1024 + 1))" 20 | ROOT_SIZE="$(( ROOT_SIZE / 1024 / 1024 + 1))" 21 | 22 | BOOT_NOM="256" 23 | ROOT_NOM="$(echo "$ROOT_SIZE" | awk '{printf "%.0f", (($1 + 400) * 1.2) + 0.5 }')" 24 | 25 | mv "${NOOBS_DIR}/OS.png" "${NOOBS_DIR}/${NOOBS_NAME// /_}.png" 26 | 27 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_SHASUM|${BOOT_SHASUM}|" 28 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_SHASUM|${ROOT_SHASUM}|" 29 | 30 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_SIZE|${BOOT_SIZE}|" 31 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_SIZE|${ROOT_SIZE}|" 32 | 33 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_NOM|${BOOT_NOM}|" 34 | sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_NOM|${ROOT_NOM}|" 35 | 36 | sed "${NOOBS_DIR}/os.json" -i -e "s|UNRELEASED|${IMG_DATE}|" 37 | sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_NAME|${NOOBS_NAME}|" 38 | sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_DESCRIPTION|${NOOBS_DESCRIPTION}|" 39 | sed "${NOOBS_DIR}/os.json" -i -e "s|RELEASE|${RELEASE}|" 40 | sed "${NOOBS_DIR}/os.json" -i -e "s|KERNEL|$(cat "${STAGE_WORK_DIR}/kernel_version")|" 41 | 42 | sed "${NOOBS_DIR}/release_notes.txt" -i -e "s|UNRELEASED|${IMG_DATE}|" 43 | 44 | cp -a "${NOOBS_DIR}" "${DEPLOY_DIR}/" 45 | -------------------------------------------------------------------------------- /export-noobs/00-release/files/OS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/OS.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/A.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/B.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/C.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/D.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/E.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/F.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/marketing/slides_vga/G.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/export-noobs/00-release/files/marketing/slides_vga/G.png -------------------------------------------------------------------------------- /export-noobs/00-release/files/os.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "NOOBS_DESCRIPTION", 3 | "feature_level": 35120124, 4 | "kernel": "KERNEL", 5 | "name": "NOOBS_NAME", 6 | "password": "raspberry", 7 | "release_date": "UNRELEASED", 8 | "supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082", 9 | "supported_models": [ 10 | "Pi Model", 11 | "Pi 2", 12 | "Pi Zero", 13 | "Pi 3", 14 | "Pi Compute Module 3", 15 | "Pi 4" 16 | ], 17 | "url": "http://www.raspbian.org/", 18 | "username": "pi", 19 | "version": "RELEASE" 20 | } 21 | -------------------------------------------------------------------------------- /export-noobs/00-release/files/partition_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #supports_backup in PINN 3 | 4 | set -ex 5 | 6 | # shellcheck disable=SC2154 7 | if [ -z "$part1" ] || [ -z "$part2" ]; then 8 | printf "Error: missing environment variable part1 or part2\n" 1>&2 9 | exit 1 10 | fi 11 | 12 | mkdir -p /tmp/1 /tmp/2 13 | 14 | mount "$part1" /tmp/1 15 | mount "$part2" /tmp/2 16 | 17 | sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|" 18 | sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2} / |" 19 | sed /tmp/2/etc/fstab -i -e "s|^[^#].* /boot |${part1} /boot |" 20 | 21 | # shellcheck disable=SC2154 22 | if [ -z "$restore" ]; then 23 | if [ -f /mnt/ssh ]; then 24 | cp /mnt/ssh /tmp/1/ 25 | fi 26 | 27 | if [ -f /mnt/ssh.txt ]; then 28 | cp /mnt/ssh.txt /tmp/1/ 29 | fi 30 | 31 | if [ -f /settings/wpa_supplicant.conf ]; then 32 | cp /settings/wpa_supplicant.conf /tmp/1/ 33 | fi 34 | 35 | if ! grep -q resize /proc/cmdline; then 36 | if ! grep -q splash /tmp/1/cmdline.txt; then 37 | sed -i "s| quiet||g" /tmp/1/cmdline.txt 38 | fi 39 | sed -i 's| init=/usr/lib/raspi-config/init_resize.sh||' /tmp/1/cmdline.txt 40 | else 41 | sed -i '1 s|.*|& sdhci.debug_quirks2=4|' /tmp/1/cmdline.txt 42 | fi 43 | fi 44 | 45 | umount /tmp/1 46 | umount /tmp/2 47 | -------------------------------------------------------------------------------- /export-noobs/00-release/files/partitions.json: -------------------------------------------------------------------------------- 1 | { 2 | "partitions": [ 3 | { 4 | "filesystem_type": "FAT", 5 | "label": "boot", 6 | "mkfs_options": "-F 32 -s 4", 7 | "partition_size_nominal": BOOT_NOM, 8 | "uncompressed_tarball_size": BOOT_SIZE, 9 | "want_maximised": false, 10 | "sha256sum": "BOOT_SHASUM" 11 | }, 12 | { 13 | "filesystem_type": "ext4", 14 | "label": "root", 15 | "mkfs_options": "-O ^huge_file", 16 | "partition_size_nominal": ROOT_NOM, 17 | "uncompressed_tarball_size": ROOT_SIZE, 18 | "want_maximised": true, 19 | "sha256sum": "ROOT_SHASUM" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /export-noobs/00-release/files/release_notes.txt: -------------------------------------------------------------------------------- 1 | UNRELEASED: 2 | * 3 | 2025-05-13: 4 | * Setting touchscreen in Screen Configuration does not delete default associations for greeter 5 | * Bug fix - wizard keyboard setting correctly transferred into desktop 6 | * Chromium updated to 136.0.7103.92 7 | * Raspberry Pi firmware bc7f439c234e19371115e07b57c366df59cc1bc7 8 | * Linux kernel 6.12.25 - 3dd2c2c507c271d411fab2e82a2b3b7e0b6d3f16 9 | 2025-05-06: 10 | * New mouse and keyboard settings application, rasputin, to replace lxinput 11 | * New printer application, rpinters, to replace system-config-printer 12 | * Added swaylock screen lock application for labwc - use ctrl-alt-L to lock, or access via new option in Shutdown Options 13 | * Added separate settings for console and desktop autologin to raspi-config and Raspberry Pi Configuration 14 | * New command-line password prompt application, sudopwd, to replace zenity password prompts 15 | * New command-line dialog tool, zenoty, to replace zenity error, information, warning and question dialogs 16 | * labwc updated to version 0.8.1 17 | * wf-panel-pi startup optimised - now starts much faster 18 | * Network manager plugin updated from latest upstream code 19 | * Busy indication (watch cursor) added to first boot wizard 20 | * uBlock Origin Lite now installed by default in Chromium, as it is no longer possible to preinstall uBlock Origin 21 | * Added compatibility with recent kernel to GPU plugin and task manager 22 | * Added more default touchscreen associations 23 | * Added ability to select mouse emulation or multitouch mode for touchscreens in Screen Configuration 24 | * Added ability to set monitor on which squeekboard on-screen keyboard is shown in Raspberry Pi Configuration 25 | * Plugins for lxpanel and wf-panel-pi restructured to build from shared projects for each, to reduce any divergence between them 26 | * Apperance Settings and Raspberry Pi Configuration reviewed - various minor inconsistencies between X and Wayland addressed 27 | * HackSpace removed from Bookshelf application 28 | * Bug fix - correctly position panel menus on secondary monitor under X 29 | * Bug fix - prevent desktop pictures overflowing bounds of monitors 30 | * Bug fix - squeekboard not starting unless a specific monitor had been set for it 31 | * Bug fix - some application icons, including Chromium web apps, were incorrect on the taskbar 32 | * Bug fix - greeter keyboard layout was being reset on updates 33 | * Bug fix - main menu submenus were not scrollable if they didn't fit the screen 34 | * Bug fix - Connect plugin now more accurately detects when Connect is installed and uninstalled 35 | * Bug fix - modified wfpanelctl to work correctly when called via PackageKit 36 | * Various other minor tweaks and updates 37 | * Chromium updated to 135.0.7049.84 38 | * Firefox updated to 138.0 39 | * Raspberry Pi firmware bc7f439c234e19371115e07b57c366df59cc1bc7 40 | * Linux kernel 6.12.25 - 3dd2c2c507c271d411fab2e82a2b3b7e0b6d3f16 41 | 2024-10-22: 42 | * labwc compositor now used as the default on all models of Raspberry Pi 43 | * wf-panel-pi now loads plugins dynamically at runtime 44 | * New raindrop screen configuration tool to replace arandr 45 | * squeekboard on-screen keyboard installed; will automatically run on systems 46 | with touchscreens, and can be manually enabled in rc-gui for others 47 | * Improved support for touchscreens - long press for right-click, and 48 | double-tap for double-click 49 | * Update installer moved out of panel code into separate gui-updater package 50 | * Missing cursors added to icon theme 51 | * Wizard no longer auto-pairs Bluetooth HID devices by default - create the 52 | file "/boot/firmware/btautopair" to enable, or reboot wizard after first run 53 | * Modified handling of Pi 5 power button to reduce CPU load when in shutdown 54 | dialog 55 | * Raspberry Pi Connect now controlled by dedicated panel plugin instead of 56 | system tray icon and option in rc-gui 57 | * Screen sharing in Raspberry Pi Connect now available as soon as a running 58 | WayVNC server is detected 59 | * Safety info URL added to main menu 60 | * Chromium package renamed from chromium-browser to chromium 61 | * Various memory leaks in pcmanfm fixed 62 | * Bug fix - crash when running Appearance Settings on headless systems 63 | * Bug fix - crash when opening icon chooser in application properties dialog 64 | * Translations updated 65 | * Chromium updated to 130.0.6723.58 66 | * Firefox updated to 131.0.3 67 | * Raspberry Pi firmware a2e586ba98ce68f7d11b1c717ad8329b95dcb3b6 68 | * Linux kernel 6.6.51 - 5aeecea9f4a45248bcf564dec924965e066a7bfd 69 | 2024-07-04: 70 | * pipanel - allow customisation of more than 2 desktops 71 | * pipanel - add customisation for labwc 72 | * gui-pkinst - add whitelist to restrict installation to specified packages only 73 | * pixflat-theme - add theme settings for labwc 74 | * pishutdown - revert to original use of pkill to close desktop 75 | * piclone - fix for potential buffer overflow vulnerability (that would never have actually happened…) 76 | * lp-connection-editor - fix dialog icons on taskbar 77 | * rp-prefapps - add Raspberry Pi Connect; remove SmartSim 78 | * piwiz - add page to enable / disable Raspberry Pi Connect 79 | * wf-panel-pi - constrain main menu to fit on small screens 80 | * wf-panel-pi - fix dialog icons on taskbar 81 | * wf-panel-pi - fix keyboard handling and icon highlighting for taskbar buttons 82 | * raspberrypi-ui-mods - add configuration for labwc 83 | * raspberrypi-ui-mods - add support for new touchscreens 84 | * raspberrypi-ui-mods - systemd-inhibit used to override hardware power key on Pi 5 85 | * rc-gui - add configuration of alternate keyboard layout 86 | * rc-gui - add switching for Raspberry Pi Connect 87 | * arandr - add brightness control for DSI displays 88 | * arandr - more reliable method to detect virtual displays 89 | * raspi-config - add setting of keyboard options 90 | * raspi-config - add setting of PCIe speed 91 | * raspi-config - add switching for Raspberry Pi Connect 92 | * wayvnc - better handling for virtual displays 93 | * wayvnc - improved encryption support 94 | * GTK-3 - add keyboard shortcuts in combo boxes 95 | * pcmanfm - allow customisation of more than 2 desktops 96 | * pcmanfm - fix bug causing crash and inconsistent behaviour on certain drag and drop operations 97 | * raspberrypi-sys-mods - add udev rule to allow backlight change 98 | * raspberrypi-sys-mods - increase swapfile size 99 | * raspberrypi-sys-mods - remove symlinks from paths in initramfs scripts 100 | * wayfire - fix for crash when opening multiple Xwayland windows 101 | * wayfire - fix for touchscreen bug when touching areas without windows 102 | * labwc compositor installed as an alternative to wayfire; can be enabled in raspi-config 103 | * various small bug fixes and tweaks 104 | * Chromium updated to 125.0.6422.133 105 | * Firefox updated to 126.0 106 | * Raspberry Pi firmware 3590de0c181d433af368a95f15bc480bdaff8b47 107 | * Linux kernel 6.6.31 - c1432b4bae5b6582f4d32ba381459f33c34d1424 108 | 2024-03-15: 109 | * Audio streams will now not be interrupted when other audio devices are connected or disconnected 110 | * Keyboard shortcut to install Orca no longer prompts for password, and will now wait for clock synchronisation rather than failing silently 111 | * Orca screen reader updated to version 45 with various additional small bug fixes 112 | * Obsolete fbturbo video driver removed 113 | * Bug fix - saved display resolution settings not reloading under X 114 | * Raspberry Pi firmware 6e0ae774407d68659b50cfbeb9f493ed16718866 115 | * Linux kernel 6.6.20 - 6f16847710cc0502450788b9f12f0a14d3429668 116 | 2024-03-12: 117 | * Added setting of headless resolution to Screen Configuration 118 | * Removed setting of headless resolution for Wayland from Raspberry Pi Configuration 119 | * Improved handling of power button on Raspberry Pi 5 120 | * Popover windows from taskbar replaced with conventional windows 121 | * Shutdown assistant now closes all user processes when logging out 122 | * Wayvnc updated to improve compatibility with various VNC clients 123 | * Wayvnc now controlled by systemd 124 | * Audio icon on taskbar hidden if no audio devices connected 125 | * Alternative mouse cursor shown during drag-and-drop operations 126 | * raspi-config now allows EEPROM to be upgraded 127 | * Speed improvement when opening bluetooth and network menus 128 | * Tweaks to display of some widgets under dark theme 129 | * Improved compatibility with alternative window managers 130 | * Bug fix - prevent multiple file manager confirm dialogs being overlaid 131 | * Bug fix - drag-and-drop in file manager causing incorrect files to move 132 | * Bug fix - memory leaks in volume and bluetooth menus 133 | * Bug fix - GPU load sometimes not correctly reported in plugin and task manager 134 | * Bug fix - crash when closing windows with non-GTK headerbars 135 | * Bug fix - spurious button hover highlights on touchscreens 136 | * Bug fix - windows on other monitors being hidden from taskbar 137 | * Bug fix - corrected power monitoring brownout detection 138 | * Bug fix - wayfire keyboard layout settings sometimes not loading 139 | * Removed fbturbo xorg video driver as it is no longer useful 140 | * Chromium updated to 122.0.6261.89 141 | * Firefox updated to 123.0 142 | * Raspberry Pi firmware 6e0ae774407d68659b50cfbeb9f493ed16718866 143 | * Linux kernel 6.6.20 - 6f16847710cc0502450788b9f12f0a14d3429668 144 | 2023-12-11: 145 | * Fix Raspberry Pi Imager's WLAN configuration for lite images 146 | 2023-12-05: 147 | * Serial port switching in rc_gui and raspi-config modified to support Raspberry Pi 5 148 | * Touch screens now identified with unique per-device strings to enable correct association with display devices 149 | * Compatibility with RP1 displays added 150 | * Theme files monitored by pixdecor plugin to load changes on the fly 151 | * Main menu shortcut to The Magpi website restored 152 | * GTK+2 theme harmonised with GTK+3 theme to enable more uniform theming of Qt applications 153 | * Battery monitor plugin enabled 154 | * Taskbar Preferences menu item added to panel right-click menu 155 | * Better reloading of on-the-fly theme changes 156 | * Various improvements to Wayfire rendering 157 | * Dark GTK theme added 158 | * Bug fix - suppressed warning notifications when removing USB devices without mounted filesystems 159 | * Bug fix - volume keyboard shortcuts locked up on some devices 160 | * Bug fix - correctly handling multiple USB audio devices with same name 161 | * Bug fix - some translations not loading in panel plugins 162 | * Bug fix - window titlebars disappearing when tiled 163 | * Bug fix - local installer service failing to install local deb files 164 | * Bug fix - wizard not correctly setting locale when explicit UTF-8 character set required 165 | * Bug fix - system updates could fail if an update required the removal of an installed package 166 | * Bug fix - prevent file manager windows opening larger than screen size 167 | * Bug fix - GPU plugin displaying load percentage as -1 168 | * Bug fix - various window manager crashes associated with shadows on certain window types 169 | * Bug fix - allow VNC to be enabled if either RealVNC or WayVNC are installed 170 | * WayVNC - improved support for encrypted connections 171 | * Mathematica now works on Raspberry Pi 5 and 64-bit 172 | * Scratch 3 now works on Raspberry Pi 5 and 64-bit 173 | * Thonny updated to version 4.1.4 174 | * Chromium updated to 119.0.6045.171 175 | * Firefox updated to 119.0 176 | * gpiod binary tools included in lite images 177 | * python3-venv included in lite images 178 | * Japanese translations updated 179 | * German translation added to Appearance Settings 180 | * Raspberry Pi firmware 12af703dd07d7721c1f2f58c6f71d9fe66270838 181 | * Linux kernel 6.1.63 182 | 2023-10-10: 183 | * Based on Debian bookworm release 184 | * Support for Raspberry Pi 5 185 | * Desktop now runs on the Wayfire Wayland compositing window manager on Raspberry Pi 4 and 5 platforms; on X11 using the openbox window manager on older platforms 186 | * lxpanel replaced with new wf-panel-pi application when running Wayland; existing lxpanel plugins migrated; gpu performance and power plugins added 187 | * pcmanfm modified to use Wayland backend when running on Wayland 188 | * PipeWire used instead of PulseAudio as audio control subsystem; various changes made to volume control plugin to support this 189 | * NetworkManager used instead of dhcpcd as networking interface; various changes made to networking plugin to support this 190 | * Firefox browser added as alternative to Chromium; selection of default browser added to Raspberry Pi Configuration tool 191 | * WayVNC VNC server used instead of RealVNC when running on Wayland 192 | * All customisation and configuration applications modified to customise Wayfire environment as appropriate 193 | * grim used as screenshot tool instead of scrot when running on Wayland 194 | * eom image viewer used instead of gpicview 195 | * evince document viewer used instead of qpdfview 196 | * Chromium web browser updated to version 116 197 | * VLC media player updated to version 3.0.18 198 | * Magnifier program not available when running Wayland; Wayfire includes screen zoom capabilities 199 | * CustomPC and Wireframe removed from Bookshelf 200 | * Numerous small changes and bug fixes 201 | * Switched from raspberrypi-kernel to Debian-based kernel packaging (linux-image-rpi-*) 202 | * Switched from raspberrypi-bootloader to Debian based firmware packaging (raspi-firmware) 203 | * /boot mount point moved to /boot/firmware 204 | 2023-05-03: 205 | * 64-bit Mathematica added to rp-prefapps 206 | * Bug fix - occasional segfault in CPU temperature plugin 207 | * Bug fix - X server crash when changing screen orientation 208 | * Bug fix - X server DPMS not working 209 | * Mathematica updated to 13.2.1 210 | * Matlab updated to 23.1.0 211 | * Chromium updated to 113.0.5672.59 212 | * Raspberry Pi Imager updated to 1.7.4 213 | * RealVNC server updated to 7.0.1.49073 214 | * RealVNC viewer updated to 7.0.1.48981 215 | * Updated VLC HW acceleration patch 216 | * libcamera 217 | - Add generalised statistics handling. 218 | - Fix overflow that would cause incorrect calculations in the AGC algorithm. 219 | - Improve IMX296 sensor tuning. 220 | * libcamera-apps 221 | - Improve handling of audio resampling and encoding using libav 222 | - Improve performance of QT preview window rendering 223 | - Add support for 16-bit Bayer in the DNG writer 224 | - Fix for encoder lockup when framerate is set to 0 225 | - Improved thumbnail rendering 226 | * picamera2 227 | - MJPEG server example that uses the hardware MJPEG encoder. 228 | - Example showing preview from two cameras in a single Qt app. 229 | - H264 encoder accepts frame time interval for SPS headers. 230 | - H264 encoder should advertise correct profile/level. 231 | - H264 encoder supports constant quality parameter. 232 | - Exif DateTime and DateTimeOriginal tags are now added. 233 | - Various bug fixes (check Picamera2 release notes for more details). 234 | * Some translations added 235 | * Raspberry Pi firmware 055e044d5359ded1aacc5a17a8e35365373d0b8b 236 | * Linux kernel 6.1.21 237 | 2023-02-21: 238 | * glamor now disabled on all platforms other than Raspberry Pi 4 with legacy video driver 239 | * msdri3 video driver support added 240 | * KiCad added to Recommended Software 241 | * Support for new touchscreen driver added to Screen Resolution tool; minor UI tweaks 242 | * GTK message dialogs shown with right-justified buttons 243 | * Bug fix - updater plugin now does not clear icon when an update has failed 244 | * Bug fix - keyboard highlight now shown on GTK switch control 245 | * Some Korean and Brazilian translations added 246 | * Fix rpi-imager hidden ssid configuration 247 | * Install kms++-utils 248 | * Raspberry Pi firmware 78852e166b4cf3ebb31d051e996d54792f0994b0 249 | * Linux kernel 5.15.84 250 | 2022-09-22: 251 | * NodeRED removed from Recommended Software and full image - should only be installed via apt 252 | * Improved speed of startup of lxpanel network controller plugins 253 | * Improved detection of Bluetooth HID devices in first-boot wizard 254 | * Bug fix - splash screen version number and date incorrect 255 | * Bug fix - text entry in searchable main menu ignored while caps or num lock active 256 | * Bug fix - keyboard shortcuts to open Wi-fi and Bluetooth plugin menus not working in 64-bit builds 257 | * Bug fix - typo in Bluetooth device menu 258 | * Bug fix - crash when cycling windows in mutter 259 | * Bug fix - spurious text output in raspi-config network configuration selection 260 | * Bug fix - firstboot script skipped further steps if rootfs resize failed 261 | * Bug fix - firstboot script inadvertently wrote /test.log 262 | * Bug fix - typo in raspi-config resulted in empty file /2 being created 263 | * Raspberry Pi firmware 48cd70fe84432c5d050637b61e4b7b9c831c98bf 264 | * Linux kernel 5.15.61 265 | 2022-09-06: 266 | * lxpanel - new main menu plugin with text search 267 | * lxpanel - new separate audio input plugin with microphone volume and input select 268 | * lxpanel - keyboard shortcuts to open wifi and bluetooth plugins added 269 | * lxpanel - notifications now shown with short delay after startup and between each 270 | * rc_gui - only allows valid hostnames to be set 271 | * piwiz - no longer allows "root" as a user name 272 | * gtk3 - menus can now be resized after being drawn 273 | * raspi-config - option to switch between dhcpcd and Network Manager added 274 | * lxpanel - new network plugin compatible with Network Manager added 275 | * piwiz - compatibility with Network Manager added 276 | * Bug fix - 100% CPU usage in file manager when desktop item unmounted 277 | * Bug fix - window manager was preventing switching between international keyboard layouts 278 | * Bug fix - system tray redrawing made more robust 279 | * Bug fix - translations not being shown in various lxpanel plugins 280 | * Bug fix - updater plugin failing on x86 images 281 | * Bug fix - force power on for Bluetooth hardware when unblocked with rfkill 282 | * Bug fix - message boxes in rc_gui not centred correctly 283 | * Bug fix - switching sessions between Wayland and X11 made more robust 284 | * Bug fix - switching of ALSA devices in raspi-config made compatible with third-party devices 285 | * Install NetworkManager (disabled) 286 | * Install OpenJDK 17 rather than OpenJDK 11 on full images 287 | * Install picamera2 288 | * Format the root partition with the metadata_csum option 289 | * Format the boot partition with 4 sectors per cluster for a slight performance boost 290 | * Remove 'flush' mount option from the boot partition 291 | * Raspberry Pi firmware 48cd70fe84432c5d050637b61e4b7b9c831c98bf 292 | * Linux kernel 5.15.61 293 | 2022-04-04: 294 | * Default "pi" user has been removed; the first-boot wizard enforces the creation of a new user account 295 | * rename-user script added to allow existing users to be renamed by temporarily rebooting to cut-down first-boot wizard 296 | * Overscan now managed by xrandr under KMS, can be set independently for both monitors, and takes effect on the fly rather than requiring reboot 297 | * GTK3 switch control now used in place of paired radio buttons throughout 298 | * piwiz - first-boot wizard now runs in a separate session as a different user with different graphics 299 | * piwiz - first-boot wizard now has automatic pairing for discoverable Bluetooth mice and keyboards 300 | * lxinput - keyboard delay and repeat settings now persist across reboots under mutter 301 | * raspi-config / rc_gui - removed pixel doubling option when KMS driver in use 302 | * raspi-config - removed composition manager option when legacy driver in use 303 | * arandr - restored support for interlaced displays 304 | * mutter - implemented more intuitive window and application cycling behaviour 305 | * pi-greeter - rebuilt for GTK3 306 | * Bug fix - graphical corruption in system tray icons 307 | * Bug fix - desktop items vanishing when dragged 308 | * Bug fix - terminal windows not focussed correctly when launched 309 | * Bug fix - crash after multiple update checks in updater plugin 310 | * Bug fix - Raspberry Pi keyboard auto-detect by wizard was broken in previous release 311 | * Bug fix - spurious "connected" dialog box shown when reconnecting to Bluetooth LE devices on boot 312 | * Support for experimental Wayland backend added - can be enabled as an advanced option in raspi-config 313 | * Various small bug fixes and graphical tweaks 314 | * Chromium upgraded to version 98.0.4758.106 315 | * FFmpeg HW acceleration improved 316 | * OpenJDK 17 now defaults to 'client' JVM for ARMv6 compatibility 317 | * Raspberry Pi firmware 69277bc713133a54a1d20554d79544da1ae2b6ca 318 | * Linux kernel 5.15.30 319 | 2022-01-28: 320 | * Policykit CVE-2021-4034 fix 321 | * rc_gui - add combo box to allow resolution to be set for VNC connections 322 | * rc_gui - camera interface switch removed 323 | * lxpanel - remove appearance settings from preferences dialog; instead add menu option to open general Appearance Settings application 324 | * lxpanel - add ellipses to menu items which open dialogs 325 | * lxinput - read current mouse acceleration directly from xinput 326 | * lxinput - use device IDs rather than names to cope with devices changing when powered-down 327 | * lxinput - remove redundant changes to openbox config file 328 | * plymouth - set KillMode to mixed to suppress warning message 329 | * raspi-config - add option to switch composite video 330 | * raspi-config - add option to switch to legacy camera mode 331 | * raspi-config - add option to set resolution for headless connections 332 | * raspberrypi-ui-mods - disable mutter when VNC server is running and fall back to openbox 333 | * pipanel - add command-line option to open on arbitrary tab 334 | * lxplug-network - suppress ’scan received’ logging message 335 | * raspberrypi-ui-mods - set hover colour for taskbar items based on taskbar colour, not system highlight colour 336 | * Legacy camera applications and libraries reinstalled (32-bit only) 337 | * Bug fix - lxinput - lxsession config file not being written on first attempt 338 | * Bug fix - lxinput - set timer for file write to prevent slider slowing down 339 | * Bug fix - lxinput - write values to gsettings as well as xinput and xsettings to take effect within mutter 340 | * Bug fix - lxinput - fix failure to parse and write non-English numeric formats 341 | * Bug fix - arandr - various fixes to parsing of non-standard EDID blocks to enable model and serial to be correctly extracted 342 | * Bug fix - arandr - refresh rate calculated to 3 decimal places for monitors which require it 343 | * Bug fix - arandr - enable setting of left and right orientation 344 | * Bug fix - arandr - add compatibility with new touchscreen driver 345 | * Bug fix - arandr - apply settings correctly to DSI and composite displays 346 | * Bug fix - lxplug-magnifier - fix crash when opening preferences without required magnifier package installed 347 | * Bug fix - piwiz - launch screen reader install prompt as a new process to prevent audio lockups crashing wizard 348 | * Bug fix - lxpanel - not loading some plugins (cpufreq, minimise all windows) due to icon loading code not compatible with GTK+3 349 | * Bug fix - gtk+3 - disabled new GDK touch events to enable double-clicks to be detected on touchscreen 350 | * Bug fix - xrdp - included backports from bookworm version of xrdp and xorgxrdp to restore window frames with mutter over xrdp connections 351 | * Update various translations 352 | * udisks2 added to lite image 353 | * mkvtoolnix added to lite image 354 | * 7z and zip support added to lite image 355 | * gnome-keyring added to desktop images 356 | * Raspberry Pi firmware c6d56567ff6ef17fd85159770f22abcf2c5953ed 357 | * Linux kernel 5.10.92 358 | 2021-10-30: 359 | * Based on Debian version 11 (bullseye) 360 | * Desktop components (lxpanel and all plugins, libfm, pcmanfm) now built against GTK+3 361 | * Applications (piwiz, pipanel, rc_gui, lxinput) now built against GTK+3 362 | * PiXflat GTK+3 theme updated with numerous changes to support the above 363 | * GTK+3 : toolbar icon size setting added 364 | * GTK+3 : ability to request client-side decoration on windows added 365 | * GTK+3 : setting for indent for frame labels in custom style added 366 | * mutter window manager used instead of openbox on devices with 2GB or more of RAM 367 | * mutter : title bar icon behaviour and appearance modified to match openbox 368 | * mutter : additional keyboard shortcuts added 369 | * mutter : various performance enhancements 370 | * mutter compatibility added to screen magnifier 371 | * Numerous changes to Appearance Settings application to support GTK+3 and mutter 372 | * Updater plugin added to lxpanel to detect and install software updates 373 | * File manager view options simplified to either list or icons, with separate menu option for thumbnails 374 | * New file manager toolbar icons 375 | * KMS used as default display driver 376 | * Modifications to HDMI audio output selection to support the above 377 | * xcompmgr enabled when openbox is running under KMS 378 | * New default camera subsystem based on libcamera 379 | * New camera demo applications (libcamera-still and libcamera-vid) have replaced raspistill and raspivid 380 | * Legacy camera subsystem removed from 64-bit RPi OS (still available on 32-bit) 381 | * Chromium upgraded to version 92.0.4515.98 382 | * VLC media player upgraded to version 3.0.16 383 | * Spurious drive removal warning after use of SD card copier removed 384 | * Bookshelf application now includes Custom PC magazine 385 | * Various translation updates - Italian, Korean, Polish, German, Armenian 386 | * Startup wizard now installs Japanese fonts if needed 387 | * Progress and information dialog boxes for lxpanel plugins now common to lxpanel, rather than in individual plugins 388 | * Icon handling code for lxpanel plugins now common to lxpanel 389 | * Package with 4K version of Raspberry Pi wallpaper added to Recommended Software 390 | * Python Games and Minecraft removed from Recommended Software - neither is compatible with bullseye 391 | * Bluetooth pairing and connection dialogs updated for compatibility with more devices 392 | * Bluetooth devices always disconnected before removal to speed up removal process 393 | * Bluetooth pairing dialog now only shows devices which offer services which are usable by Pi 394 | * Separate Bluetooth unpair dialog removed - unpair now an option for each individual device 395 | * Bug fix - mutter : header bar colours not updating when theme is changed 396 | * Bug fix - GTK+3 : tooltips being displayed incorrectly at bottom of screen 397 | * Bug fix - lxpanel : crash when using keyboard shortcut to enable magnifier when magnifier not installed 398 | * Bug fix - lxpanel : lockup in Bluetooth plugin when connecting to certain devices 399 | * Bug fix - lxpanel : discoverable mode icon could get out of sync with underlying Bluetooth system state 400 | * Bug fix - piwiz : missing cities in timezone list 401 | * Bug fix - piwiz : country-specific language packages not being installed 402 | * Bug fix - bookshelf : now waits for longer between packets before timing out 403 | * Bug fix - accented characters now displayed correctly in localisation dialogs 404 | * Raspberry Pi firmware e2bab29767e51c683a312df20014e3277275b8a6 405 | * Linux kernel 5.10.63 406 | 2021-05-07: 407 | * Chromium upgraded to version 88.0.4324.187 408 | * NuScratch upgraded to version 20210507 409 | * Node-RED upgraded to version 1.3.4 410 | * pigpio upgraded to version 1.79 411 | * Thonny upgraded to version 3.3.6 412 | * Icelandic and Italian translations updated for several packages 413 | * piclone: Remove hiding of application in other desktops 414 | * agnostics: Remove hiding of app in other desktops 415 | * rp-bookshelf: 416 | - Remove hiding of app in other desktops 417 | - GTK+3 version 418 | * lxplug-bluetooth: 419 | - Fix some memory leaks 420 | - Add authorisation dialog required by some BT-LE pairings 421 | * alsa-utils: Add custom init files for bcm2835 on Raspberry Pi to set volume correctly 422 | * rp-prefapps: Remove hiding of app in other desktops 423 | * OpenSSH and OpenSSL speed improvements 424 | * Install gpiozero in lite images 425 | * Raspberry Pi firmware 518ee7c871aaa9aaa88116953d57e73787ee6e43 426 | * Linux kernel 5.10.17 427 | 2021-03-04: 428 | * Thonny upgraded to version 3.3.5 429 | * SD Card Copier made compatible with NVMe devices; now built against GTK+3 toolkit 430 | * Composite video options removed from Raspberry Pi 4 in Raspberry Pi Configuration 431 | * Boot order options in raspi-config adjusted for more flexibility 432 | * Recommended Software now built against GTK+3 toolkit 433 | * Fix for crash in volume plugin when using keyboard could push value out of range 434 | * Fix for focus changing between windows in file manager when using keyboard to navigate directory view 435 | * Fix for Raspberry Pi 400 keyboard country not being read correctly in startup wizard 436 | * Armenian and Japanese translations added to several packages 437 | * Automatically load aes-neon-bs on ARM64 to speed up OpenSSL 438 | * Raspberry Pi firmware fcf8d2f7639ad8d0330db9c8db9b71bd33eaaa28 439 | * Linux kernel 5.10.17 440 | 2021-01-11: 441 | * Chromium version 86.0.4240.197 included 442 | * Screen reader support enabled in Chromium 443 | * Adobe have end-of-lifed Flash Player, so it has been removed 444 | * Scratch 2 required Flash, so it has been removed 445 | * Added Epson printer drivers 446 | * Added timeout to hide messages from USB device monitor after 5 seconds 447 | * Bug fix - PulseAudio output was in mono 448 | * Bug fix - brief audio interruptions at start of playback in VLC 449 | * Bug fix - old ALSA output settings being used instead of PulseAudio settings by some applications 450 | * Bug fix - crash in PulseAudio volume controller when used on multichannel devices 451 | * Bug fix - battery monitor failing to load on x86 platforms 452 | * Bug fix - setting of password in startup wizard failed if language was changed 453 | * Bug fix - Chromium video playback lockup on small number of devices 454 | * Bug fix - Chromium Google Maps 3D view artefacts 455 | * Slovak, Italian and Norwegian translations updated 456 | * Added Epson printer drivers 457 | * Raspberry Pi firmware 70f1581eec2c036b7e9309f1af41c651fb125447 458 | * Linux kernel 5.4.83 459 | 2020-12-02: 460 | * PulseAudio now included and running by default 461 | * Bluealsa Bluetooth interface removed - Bluetooth audio is now handled by PulseAudio 462 | * LXPanel volume control plugin replaced with PulseAudio version 463 | * Version 84.0.4147.105 of Chromium web browser included 464 | * Version 3.3.0 of Thonny included 465 | * Version 32.0.0.453 of Flash player included - note that this will be the final release of Flash, as it is end-of-lifed at the end of 2020 466 | * CUPS printer system included, along with system-config-printer CUPS GUI and HP printer drivers 467 | * raspi-config menu structure rearranged to match Raspberry Pi Configuration tabs 468 | * Control for GPIO-connected fans added to raspi-config and Raspberry Pi Configuration 469 | * Control for power / activity LED on Pi 400 and Pi Zero added to raspi-config and Raspberry Pi Configuration 470 | * Improved screen reader voice prompts in several applications 471 | * Added ctrl-alt-space shortcut to install Orca screen reader at any point 472 | * Low voltage warnings added to battery monitor plugin 473 | * Magnifier plugin zoom can now be changed with scroll wheel when pointer is over icon 474 | * Change to notification popups - now will only close when clicked on directly, not by clicking anywhere 475 | * Bookshelf now made compatible with translated versions of books and magazines, and will offer translated versions where available, based on system language setting 476 | * Bug fix - crash in CPU temperature plugin when throttling detection fails 477 | * Bug fix - if Orca is running, shutdown commands and shutdown dialog will force kill it to prevent it locking up the reboot or shutdown process 478 | * Various additional language translations added 479 | * Various minor bug fixes and UI tweaks 480 | * Raspberry Pi firmware b324aea801f669b6ab18441f970e74a5a7346684 481 | * Linux kernel 5.4.79 482 | 2020-08-20: 483 | * raspi-config - added selection of boot device order 484 | * raspi-config - added selection of boot EEPROM version 485 | * SD Card Copier - copy is now immediately aborted if drives are connected or disconnected while copying 486 | * Version 32.0.0.414 of Flash player included 487 | * User feedback survey removed from first run of Chromium 488 | * Recommended Software - now allows multiple install and reinstall operations without having to close between each one 489 | * Bug fix - misleading file browser from panel menu icon selection dialog - icons must now be in icon theme rather than arbitrary files 490 | * Bug fix - items in main menu not being translated 491 | * Bug fix - raspi-config not detecting audio devices in non-English locales 492 | * Bug fix - Bookshelf claiming no disk space in non-English locales 493 | * Bug fix - failed installation of both 32 and 64 bit versions of packages by Recommended Software on 64-bit images 494 | * Italian translations added (thanks to Emanuele Goldoni and the Italian translation team) 495 | * Raspberry Pi firmware ef72c17bcaaeb89093d87bcf71f3228e1b5e1fff 496 | * Linux kernel 5.4.51 497 | 2020-05-27: 498 | * Added Bookshelf application 499 | * Added Raspberry Pi Diagnostics application 500 | * Added magnifier plugin to taskbar - needs magnifier application installed from Recommended Software to enable 501 | * Added Magnifier application to Recommended Software 502 | * Added marketing questionnaire as initial Chromium tab 503 | * Version 0.25 of Scratch 2 included - uses external application to access IMU on SenseHAT 504 | * Version 1.0.5 of Scratch 3 included - uses external application to access IMU on SenseHAT 505 | * Version 32.0.0.371 of Flash player included 506 | * Version 1.0.6 of Node-RED included 507 | * Version 6.7.1 of VNC Server included 508 | * Version 6.20.113 of VNC Client included 509 | * Internal audio outputs enabled as separate ALSA devices 510 | * MagPi preinstall removed and replaced with Beginner’s Guide 511 | * MagPi weblink removed from main menu 512 | * Chromium made default application for PDF files 513 | * Common icon loading code for lxpanel plugins used 514 | * Italian translations added 515 | * Initial move of mouse pointer to menu button disabled 516 | * Padding at left of menu button removed 517 | * Focus behaviour changed so that focus moves to desktop if no windows are opened - improves reliability of Orca screen reader 518 | * Bug fix - focus bug in volume plugin 519 | * Bug fix - keyboard repeat interval bug in Mouse & Keyboard Settings 520 | * Bug fix - battery detection bug in battery plugin 521 | * Bug fix - spurious active areas on taskbar when plugins are hidden 522 | * Bug fix - occasional crash in file manager on file selection 523 | * Disk ID is now regenerated on first boot 524 | * Updated udev rules 525 | - Remove unused argon rule 526 | - Add vcsm-cma to video group 527 | - Add pwm to gpio group 528 | * i2cprobe: More flexible I2C/SPI alias mapping 529 | * Raspberry Pi firmware 21e1fe3477ffb708a5736ed61a924fd650031136 530 | * Linux kernel 4.19.118 531 | 2020-02-13: 532 | * Raspberry Pi Configuration - screen blanking setting disabled if Xscreensaver is installed 533 | * Bug fix - switch to turn off VNC server in Raspberry Pi Configuration has no effect 534 | * Bug fix - fix %20 characters in file names 535 | * Linux kernel 4.19.97 536 | * Raspberry Pi firmware 9a34efbf2fc6a27231607ce91a7cb6bf3bdbc0c5 537 | - gencmd: Fix measure_clock name for CLOCK_OUTPUT_108 538 | - mmal isp: Remote alignment requirements for RGB24 formats 539 | - Add missing flags for VC_IMAGE_PROP_YUVUV_4K_CHROMA_ALIGN 540 | - platform: Compromise on gpu overclock settings 541 | 2020-02-05: 542 | * Version 3.2.6 of Thonny included - significant improvements in speed, particularly when debugging 543 | * Version 1.0.4 of Scratch 3 included - adds new "display stage" and "display sprite" blocks to SenseHAT extension, and loading of files from command line 544 | * Version 32.0.0.314 of Flash player included 545 | * Version 1.0.3 of NodeRED included 546 | * Version 6.6.0 of RealVNC Server and version 6.19.923 of RealVNC Viewer included - adds support for audio 547 | * Version 78.0.3904.108 of Chromium included 548 | * Mesa updated to 19.3.2 for OpenGL ES 3.1 conformance 549 | * Pixel doubling option added in Raspberry Pi Configuration on platforms using FKMS display driver 550 | * Orca screen reader added to Recommended Software 551 | * Code The Classics Python games added to Recommended Software 552 | * File manager - new "places" pane added at top of sidebar to show mounted drives in simplified view; "new folder" icon added to taskbar; expanders in directory browser now correctly show state of subfolders 553 | * Multiple monitor support improved - alignment of icons on second desktop corrected, Appearance Settings opens on correct tab when launched from context menu 554 | * Raspberry Pi Touchscreen correctly aligned with display 555 | * System clock synchronised before installing new packages in startup wizard and Recommended Software 556 | * Mixer dialogs added to taskbar volume plugin; separate Audio Preferences application removed 557 | * Raspberry Pi Configuration - separate tab added for display options; screen blanking control added 558 | * Volume taskbar plugin and raspi-config modified to support separate ALSA devices for internal audio outputs (analogue and HDMI 1 and 2) 559 | * Robustness improvements in volume, ejecter and battery taskbar plugins 560 | * Movement of mouse pointer to menu button on startup now controlled by point_at_menu parameter in Global section of lxpanel configuration file 561 | * Ctrl-Alt-Del and Ctrl-Alt-End shortcuts added to open shutdown options box 562 | * Ctrl-Shift-Esc shortcut added to open task manager 563 | * Enabled NEON routines in OpenSSL 564 | * Linux kernel 4.19.97 565 | * Raspberry Pi firmware 149cd7f0487e08e148efe604f8d4d359541cecf4 566 | 2019-09-26: 567 | * rpi-eeprom included 568 | - This will automatically update the SPI EEPROM on the Raspberry Pi 4 to the latest stable version. 569 | See https://rpf.io/eeprom for more information. 570 | * New icon theme for file manager icons 571 | * Appearance Settings - option for identical desktop on both monitors 572 | * Appearance Settings - option to show different desktop icons on both monitors 573 | * Taskbar automatically moved to monitor 0 if monitor 1 not found at boot 574 | * Switching of audio output between two HDMI devices added to volume plugin 575 | * Switching of audio input devices added to volume plugin 576 | * .asoundrc (ALSA config file) now uses 'plug' values to support more devices 577 | * Audio Settings tool modified to integrate more closely with volume plugin to reduce duplicated code 578 | * Screen Configuration tool now shows separate menus for resolution and refresh rate 579 | * Primary and active monitor settings removed from Screen Configuration tool 580 | * Overscan support added for FKMS driver 581 | * New keyboard shortcuts added - Ctrl-Alt-End brings up shutdown menu; Ctrl-Alt-M moves taskbar between monitors 582 | * Latest changes to Bluez ALSA interface integrated to improve connection to Bluetooth audio devices 583 | * Mousepad used as simple text editor instead of leafpad 584 | * Version 3.2 of Thonny added 585 | * Version 74 of Chromium added 586 | * Version 3.0.8 of VLC added 587 | * Version 32.0.0.255 of Flash player added 588 | * Version 6.5.0 of RealVNC Server added 589 | * Version 6.19.715 of RealVNC Viewer added (full image only) 590 | * Version 12.0.1 of Mathematica added (full image only) 591 | * Version 0.20.8 of NodeRED added (full image only) 592 | * Version 3.1.0 of Sonic Pi added (full image only) 593 | * Scratch 3 added (full image only) 594 | * Bug fix - URL handling in Terminal 595 | * Bug fix - octal values in SSIDs in network plugin 596 | * Bug fix - remaining value in progress bar when transferring files 597 | * Bug fix - integration of xarchiver tool with file manager 598 | * Bug fix - start menu opening on incorrect monitor 599 | * Bug fix - minimised applications wrongly displayed on taskbar on second monitor 600 | * Bug fix - Bluetooth icon disappearing on x86 platforms when Bluetooth turned off 601 | * Bug fix - Screen Configuration tool not shown on x86 platforms and settings not being saved 602 | * Various translation updates 603 | * Various minor bug fixes 604 | * Epiphany/Web removed 605 | * ntfs-3g included 606 | * pciutils added 607 | * Linux kernel 4.19.75 608 | * Raspberry Pi firmware 01508e81ec1e918448227ca864616d56c430b46d 609 | 2019-07-10: 610 | * Clearer options for switching of Pi 4 video output in Raspberry Pi Configuration 611 | * Option added to Appearance Settings to move taskbar to second monitor 612 | * Option added to Recommended Software to restrict package installs by architecture 613 | * New version of Adobe Flash player (32.0.0.223) 614 | * Selection of screen refresh rates added to Screen Configuration 615 | * Fix for missing text insertion cursor in LibreOffice on Pi 4 616 | * Fix for Wi-fi interruption when Wi-fi icon on taskbar is clicked 617 | * FIx for incorrect desktop background behind desktop login prompt 618 | * Fix for segmentation faults when launching obconf and lxapperarance 619 | * Fix for unclosed file pointer in Screen Configuration 620 | * Fix for Bluetooth plugin freeze when large numbers of devices detected 621 | * Fix for opening URLs not working in lxterminal 622 | * Fix for start menu opening on incorrect monitor when launched from keyboard 623 | * Fix for taskbar item not having [] removed when un-minimising on second monitor 624 | * Fix for Chromium video playback and WebGL performance on Pi 4 625 | * Remove 4kp60 option from Raspberry Pi Configuration 626 | * Rename hdmi_enable_4k to hdmi_enable_4kp60 in /boot/config.txt and raspi-config 627 | * Linux kernel 4.19.57 628 | * Raspberry Pi firmware 356f5c2880a3c7e8774025aa6fc934a617553e7b 629 | 2019-06-20: 630 | * Based on Debian Buster 631 | * Support for Raspberry Pi 4 hardware 632 | * FKMS OpenGL desktop graphics driver and xcompmgr compositing window manager used when running on Raspberry Pi 4 633 | * Screen Configuration application added for use with FKMS driver 634 | * Raspberry Pi 4 video output options added to Raspberry Pi Configuration 635 | * Uses new PiXflat UI theme for GTK and Openbox 636 | * CPU activity gauge plugin no longer shown on taskbar by default 637 | * CPU temperature gauge plugin added (not shown by default) 638 | * USB ejecter and Bluetooth taskbar icons hidden when not appropriate 639 | * Version 74.0.3729.157 of Chromium web browser included 640 | * Version 32.0.0.207 of Flash player included 641 | * IDLE Python IDE removed 642 | * Wolfram Mathematica removed temporarily due to incompatibility with Buster 643 | * Display of package sizes removed from Recommended Software 644 | * Appearance Settings modified to support independent settings for two monitors 645 | * Oracle Java 7 and 8 replaced with OpenJDK 11 646 | * Miscellaneous small bug fixes 647 | * On-board 5GHz WiFi blocked by rfkill by default 648 | The block is removed when taking one of the following actions: 649 | - Selecting a locale in the first run wizard 650 | - Setting the WiFi country in the Raspberry Pi Configuration tool or the Network Settings applet 651 | - Setting the WiFi country in raspi-config 652 | - Providing a wpa_supplicant.conf file through the boot partition 653 | - Running 'rfkill unblock wifi' 654 | * Boot partition size set to 256M 655 | * Linux kernel 4.19.50 656 | * Raspberry Pi firmware 88ca9081f5e51cdedd16d5dbc85ed12a25123201 657 | 2019-04-08: 658 | * Chromium browser updated to version 72 659 | * VLC media player updated to version 3.0.6 660 | * RealVNC Server updated to version 6.4.0 661 | * Flash player updated to version 32.0.0.156 662 | * Performance improvements to SDL library 663 | * Performance improvements to pixman library 664 | * Option to set display underscan added to startup wizard 665 | * Mounted external drives now displayed on desktop by default 666 | * Network plugin modified for improved compatibility with wpa_passphrase 667 | * SD Card Copier tweaks to reduce copy failures 668 | * Various minor bug fixes and appearance tweaks 669 | * Added ethtool 670 | * Added rng-tools 671 | * Add PINN restore support 672 | * Linux kernel 4.14.98 673 | * Raspberry Pi firmware f8939644f7bd3065068787f1f92b3f3c79cf3de9 674 | 2018-11-13: 675 | * Two versions of image created - "base" image has no optional software packages included; "full" image has all optional packages 676 | - Removed from "base" image - LibreOffice, Thonny, Scratch, Scratch 2, Sonic Pi, Minecraft, Python Games, SmartSim, SenseHAT Emulator 677 | - Added to "full" image - Mathematica, BlueJ, Greenfoot, Node-RED, Claws Mail, VNC Viewer 678 | * Python Games and SmartSim added to Recommended Software 679 | * VLC media player with VideoCore hardware acceleration included in image 680 | * Version 3.0.5 of Thonny included 681 | * Modifications to LXDE components to enable local configuration to override global configuration correctly 682 | * Modifications to Appearance Settings to support above configuration changes 683 | * Modifications to various initial config defaults and relevant package to support above configuration changes 684 | * Selecting default option in Appearance Settings now deletes relevant local configuration files 685 | * PiX theme modified so that all changes made in Appearance Settings are in override files rather than in theme files 686 | * Design of scrollbar buttons changed 687 | * Image Viewer moved into Graphics category on main menu 688 | * Recommended Software now installs LibreOffice language support files if needed, and suggests reboot if needed 689 | * Latest version of Pepper Flash plugin included 690 | * Chromium h264ify plugin permissions set correctly by default 691 | * Corrections to various MIME types so that files open in sensible default applications 692 | * Set default timezone to 'Europe/London' 693 | * Linux kernel 4.14.79 694 | * Raspberry Pi firmware 12e0bf86e08d6067372bc0a45d7e8a10d3113210 695 | 2018-10-09: 696 | * Raspberry Pi 3A+ support 697 | * In startup wizard, assign keyboard to country as per Debian installer recommendations 698 | * In startup wizard, add option to use US keyboard in preference to country-specific option 699 | * In startup wizard, show IP address on first page 700 | * In startup wizard, check for existing wifi network connection and show it if there is one 701 | * In startup wizard, install language support packages for LibreOffice and other applications 702 | * In startup wizard, improve operation with keyboard only and no mouse 703 | * Password change in Raspberry Pi Configuration and startup wizard now works properly if passwords contain shell characters 704 | * Battery indicator plugin modified to cope with Pi-top hardware monitor crashing 705 | * Networking plugin hides wifi password characters by default 706 | * In Scratch 2 GPIO plugin, set pin from dropdown list rather than free text 707 | * In Scratch 2 SenseHAT plugin, swap x and y axis values for LED array 708 | * Include latest Adobe Flash player (31.0.0.108) 709 | * Include latest RealVNC Server (6.3.1) 710 | * Include libav-tools 711 | * Include ssh-import-id 712 | * Removed Mathematica 713 | * Merge in latest third-party code for Bluetooth ALSA interface 714 | * Add ability to prevent software update changing configuration files, by creating ~/.config/.lock file 715 | * Various other small bug fixes, tweaks and changes to text 716 | * Make dhcpcd work with 3G devices 717 | * Add hw acceleration to ffmpeg 718 | * Improved WiFi-BT coexistence parameters 719 | * Run fake-hwclock before systemd-fsck-root 720 | * Raspberry Pi PoE HAT support 721 | * Linux kernel 4.14.71 722 | * Raspberry Pi firmware 5b49caa17e91d0e64024380119ad739bb201c674 723 | 2018-06-27: 724 | * New first-boot configuration wizard added 725 | * Recommended Software installer added 726 | * Bluej, Greenfoot, NodeRED, Claws Mail, VNC Viewer removed from image - can now be installed from Recommended Applications 727 | * Qpdfview PDF viewer installed instead of Xpdf 728 | * Version 65.0 of Chromium browser included, with latest Flash player 729 | * Volume up / down keys now change by 5% increments and affect currently-selected output device rather than internal device only 730 | * Network plugin now remembers previously-entered WiFi network passwords when prompting for reconnection 731 | * Serial port and serial console can now be switched separately in Raspberry Pi Configuration 732 | * Lxkeymap keyboard language setting application removed - replaced with dialog within Raspberry Pi Configuration 733 | * Wifi country and keyboard language setting dialogs in Raspberry Pi Configuration now callable from other applications 734 | * New version of Piboto font included to render with correct weight under some rogue applications 735 | * Reconnection to Bluetooth audio devices on reboot improved 736 | * Disable click-to-rename behaviour in file manager if single-click selection enabled 737 | * Appearance Settings dialog makes config changes to some Qt files to match selected theme 738 | * MIME file type associations improved 739 | * Multiple desktop management options removed from mouse middle-click menu 740 | * Menu shortcuts to Raspberry Pi website amended 741 | * Python 2 IDLE menu link removed 742 | * Sample Magpi PDF installed in /home/pi/MagPi 743 | * Various minor tweaks, bug fixes and appearance changes 744 | * Bluetooth updates 745 | - Firmware with Bluetooth 4.2 features 746 | - SCO profile suppot added via bthelper.service 747 | * Linux kernel 4.14.50+ 748 | * Raspberry Pi firmware 748fb17992426bb29d99224b93cb962fefbdc833 749 | 2018-04-18: 750 | * Fixed race between wifi-country.service and raspberrypi-net-mods.service 751 | * Linux kernel 4.14.34+ 752 | * Raspberry Pi firmware 5db8e4e1c63178e200d6fbea23ed4a9bf4656658 753 | 2018-03-13: 754 | * Raspberry Pi 3 B+ support 755 | * WiFi is disabled until wireless regulatory domain is set (Pi 3 B+ only) 756 | - The domain can be done through 'Raspberry Pi Configuration' (rc_gui), 757 | 'raspi-config' or by setting 'country=' to an appropriate ISO 3166 758 | alpha2 country code in /etc/wpa_supplicant/wpa_supplicant.conf. 759 | * Default wireless regulatory domain is now unset 760 | * Added support to desktop for different screen sizes and resolutions, 761 | including multiple preset options in Appearance Settings and pixel doubling 762 | option in Raspberry Pi Configuration 763 | * Version 2.1.16 of Thonny included 764 | * Version 29.0.0.113 of Adobe PepperFlash player included 765 | * Version 1.2.post1 of Pygame Zero included 766 | * Bluetooth plugin now supports connection to Bluetooth LE HID devices 767 | * Network plugin now indicates 5G-compatible APs 768 | * Latest changes to Bluez ALSA service merged 769 | - service now started on CLI boot as well as GUI boot 770 | * Latest changes to dhcpcd networking plugin merged 771 | * Improved support for running on pi-top devices 772 | * Small design changes to PiX theme and icons 773 | * Bug fix - hide spurious window resize handles 774 | * Bug fix - Scratch 2 remote GPIO state block now works correctly 775 | * Updated WiFi Firmware 776 | - brcmfmac43455-sdio 7.45.154 777 | - brcmfmac43430-sdio 7.45.98.38 778 | * New packages: 779 | - policykit-1 780 | - obconf 781 | - python-buttonshim python3-buttonshim 782 | - python-unicornhathd python3-unicornhathd 783 | - python-pantilthat python3-pantilthat 784 | * Linux kernel 4.9.80+ 785 | * Raspberry Pi firmware 3347884c7df574bbabeff6dca63caf686e629699 786 | 2017-11-29: 787 | * Added battery monitor plugin for taskbar - works on x86 images or first-generation Pi-Top 788 | * Added cutdown mode to PCManFM file manager to reduce complexity 789 | * Added ability to rename files in PCManFM by clicking name when selected 790 | * Bug fix in Bluetooth ALSA module to reduce truncation of audio at end of playback 791 | * Various small tweaks, bug fixes and theme modifications 792 | * New kernel and firmware 793 | 2017-09-07: 794 | * Disable predictable network interface names for Ethernet devices 795 | * Bug fix for keyboard settings dialog in Raspberry Pi Configuration 796 | * Bug fix for crash on some videos and animations in Chromium 797 | * Bug fix for taskbar crash when running RealVNC server 798 | * Bug fix for reloading projects with extensions in Scratch 2 799 | * Bug fix for MAC address problem in Bluetooth 800 | * Simple mode and new icons in Thonny 801 | * New Japanese translations in Raspberry Pi Configuration 802 | * Install fonts-droid-fallback for international fonts 803 | 2017-08-16: 804 | * Based on Raspbian Stretch (Debian version 9) 805 | * Version 60 of Chromium browser included 806 | * Version 3.0.1 of Sonic Pi included 807 | * Version 6.1.1 of RealVNC included 808 | * Version 0.17.4 of NodeRED included 809 | * Bluetooth audio routed via ALSA rather than Pulseaudio 810 | * SenseHAT extension added to Scratch 2 811 | * Various desktop applications modified to prompt for sudo password if needed 812 | * lxinput control options for mouse speed simplified 813 | * lxpanel plugins moved into separate packages 814 | * Wireless firmware for Pi 3 and Pi 0W modified to address Broadpwn exploit 815 | * Latest kernel and firmware 816 | * Various small tweaks, bug fixes and theme modifications 817 | 2017-07-05: 818 | * New kernel and firmware 819 | * Filesystem created without the metadata_csum feature 820 | 2017-06-21: 821 | * Scratch 2 application included 822 | * Thonny Python IDE included 823 | * New icons with thinner outlines 824 | * Volume control more linear in behaviour 825 | * Updated Flash player 826 | * Updated RealVNC server and viewer 827 | * Various tweaks and bugfixes 828 | * New kernel and firmware 829 | 2017-04-10: 830 | * Wolfram Mathematica updated to version 11.0.1 831 | * Adobe Flash Player updated to version 25.0.0.127 832 | * Use PARTUUID to support USB boot 833 | 2017-03-02: 834 | * Updated kernel and firmware (final Pi Zero W support) 835 | * Wolfram Mathematica updated to version 11 836 | * NOOBS installs now checks for presence of 'ssh' file on the NOOBS partition. 837 | 2017-02-16: 838 | * Chromium browser updated to version 56 839 | * Adobe Flash Player updated to version 24.0.0.221 840 | * RealVNC Server and Viewer updated to version 6.0.2 (RealVNC Connect) 841 | * Sonic Pi updated to version 2.11 842 | * Node-RED updated to version 0.15.3 843 | * Scratch updated to version 120117 844 | * Detection of SSH enabled with default password moved into PAM 845 | * Updated desktop GL driver to support use of fake KMS option 846 | * Raspberry Pi Configuration and raspi-config allow setting of fixed HDMI resolution 847 | * raspi-config allows enabling of serial hardware independent of serial terminal 848 | * Updates to kernel and firmware 849 | * Various minor bug fixes and usability and appearance tweaks 850 | 2017-01-11: 851 | * Re-release of the 2016-11-25 image with a FAT32-formatted boot partition 852 | 2016-11-25: 853 | * SSH disabled by default; can be enabled by creating a file with name "ssh" in boot partition 854 | * Prompt for password change at boot when SSH enabled with default password unchanged 855 | * Adobe Flash Player included 856 | * Updates to hardware video acceleration in Chromium browser 857 | * Greeter now uses background image from last set in Appearance Settings rather than pi user 858 | * Updated version of Scratch 859 | * Rastrack option removed from raspi-config and Raspberry Pi Configuration 860 | * Ability to disable graphical boot splash screen added to raspi-config and Raspberry Pi Configuration 861 | * Appearance Settings dialog made tabbed to work better on small screens 862 | * Raspberry Pi Configuration now requires current password to change password 863 | * Various small bug fixes 864 | * Updated firmware and kernel 865 | 2016-09-23: 866 | * New PIXEL desktop environment - new icon set, window design, desktop images, splash screen and greeter 867 | * Chromium web browser included 868 | * Infinality font rendering patches included 869 | * RealVNC server and viewer included 870 | * SenseHAT emulator included 871 | * Rfkill entries added to Wifi and Bluetooth panel plugins 872 | * Updates to various standard applications, including Scratch and NodeRED 873 | * Various bug fixes, tweaks and translation updates 874 | * Updated firmware and kernel (https://github.com/raspberrypi/firmware/commit/ad8608c08b122b2c228dba0ff5070d6e9519faf5) 875 | 2016-05-27: 876 | * Fixed crash of lxpanel when D-bus not accessible 877 | * Fixed permissions for D-bus Bluetooth access 878 | * Removed sudo from shutdown options 879 | * Appearance of tooltips updated in theme 880 | * Fixed ejecter plugin grabbing focus 881 | * raspi-config command line and GUI apps tidied; unnecessary reboots removed 882 | * More error detection in piclone; copying of volume names and IDs added 883 | * Updated translation files 884 | 2016-05-10: 885 | * New version of Scratch, which no longer requires sudo 886 | * New version of BlueJ 887 | * New version of NodeRED 888 | * New version of pypy 889 | * pigpio included 890 | * geany editor included 891 | * SD Card Copier added (can be used to duplicate or back up the Pi) 892 | * Bluetooth plugin added to taskbar 893 | * Volume control on taskbar now compatible with Bluetooth devices 894 | * New shutdown helper application 895 | * Mouse double-click speed setting added to mouse and keyboard preference application 896 | * Option to enable / disable 1-wire interface and remote access to pigpio added to Raspberry Pi config application 897 | * File system automatically expanded on first boot 898 | * Empty Wastebasket option added to right-click menu 899 | * Ctrl-Alt-T can be used to open a terminal window 900 | * Various small bug fixes and appearance tweaks 901 | * Updated firmware and kernel (https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866) 902 | 2016-03-18: 903 | * updated firmware and kernel (https://github.com/raspberrypi/firmware/commit/951799bbcd795ddf27769d14acf4813fdcbe53dc) 904 | * use serial0 in cmdline.txt 905 | * wpa_supplicant.conf country default to GB (allows use of channels 12 and 13) 906 | 2016-02-26: 907 | * Support added for Pi 3, including Wifi and Bluetooth 908 | * Option to set wifi country code added to raspi-config 909 | 2016-02-09: 910 | * dtb that uses mmc sdcard driver (fixes problems experienced with certain SD cards) 911 | 2016-02-03: 912 | * new version of Sonic Pi (2.9) 913 | * new version of Scratch (15/1/16) 914 | * new version of Node-Red (2.5) 915 | * new version of Wolfram (10.3) 916 | * optional experimental GL desktop driver (can be enabled using advanced options in command-line raspi-config) 917 | * new version of Java (1.8.0_65) 918 | * new version of WiringPi 919 | * raspi-gpio included 920 | * ping no longer requires sudo (except NOOBS installs) 921 | * support for more USB audio devices in lxpanel 922 | * bug fix for creation of new menus in Alacarte 923 | * various changes to raspi-config and GUI to tidy up board support and fix bugs, and updated translations 924 | * small tweaks to theme to support GL driver 925 | 2015-11-21: 926 | * Included IBM Node-RED IoT application 927 | * Included graphical package manager 928 | * Included accelerated pixman library 929 | * Updated Epiphany browser to improve video compatibility 930 | * Updated Scratch with performance improvements and bug fixes 931 | * Updated Raspberry Pi configuration to allow boot to pause while 932 | network is established 933 | * Various minor bug fixes 934 | 2015-09-25: 935 | * Based on Debian Jessie 936 | * Upgraded applications - Epiphany browser, Scratch and Sonic Pi 937 | * Included applications - LibreOffice, Claws Mail, Greenfoot, BlueJ 938 | * Included utilities - Alacarte menu editor, Lxkeymap, scrot, tree, pip 939 | * New GUI-based Raspberry Pi Configuration application 940 | * GPIO control now possible without need for sudo 941 | * Web link to Magpi magazine included 942 | * New taskbar plugin to eject mounted USB drives 943 | * Default boot is now to GUI not desktop 944 | * Look and feel now based on GTK+3 default theme 945 | * Print screen key launches scrot to produce screenshot 946 | * Common keyboards autodetected by GUI and drivers loaded accordingly 947 | * Numerous small tweaks and bugfixes 948 | 2015-05-05: 949 | * Updated UI changes 950 | * Updated firmware 951 | * Install raspberrypi-net-mods 952 | * Install avahi-daemon 953 | * Add user pi to new i2c and spi groups 954 | * Modified udev rules for i2c and spi devices 955 | 2015-02-16: 956 | * Newer firmware with various fixes 957 | * New Sonic Pi release 958 | * Pi2 compatible RPi.GPIO 959 | * Updated Wolfram Mathematica 960 | 2015-01-31: 961 | * Support for Pi2 962 | * Newer firmware 963 | * New Sonic Pi release 964 | * Updated Scratch 965 | * New Wolfram Mathematica release 966 | * Updated Epiphany 967 | 2014-12-24: 968 | * Fix regression with omission of python-pygame 969 | 2014-12-22: 970 | * New firmware with variosu fixes and improvements 971 | * New UI configuration for lxde 972 | * Various package updates 973 | * python3-pygame preinstalled 974 | * 'nuscratch', scratch running on the Cog StackVM 975 | * Misc other changes 976 | 2014-09-09: 977 | * New firmware with various fixes and improvements 978 | * Minecraft Pi pre-installed 979 | * Sonic Pi upgraded to 2.0 980 | * Include Epiphany browser work from Collabora 981 | * Switch to Java 8 from Java 7 982 | * Updated Mathematica 983 | * Misc minor configuration changes 984 | 2014-06-20: 985 | * New firmware with various fixes, and kernel bugfix 986 | 2014-06-02: 987 | * Many, many firmware updates with major USB improvements 988 | * pyserial installed by default 989 | * picamera installed by default 990 | 2014-01-07: 991 | * Firmware updated 992 | * Some space saved on the root filesystem 993 | 2013-12-20: 994 | * Firmware updated, includes V4L2 fixes 995 | * Update omxplayer 996 | 2013-12-18: 997 | * Firmware updated and now using kernel 3.10. Many, many improvements 998 | * fbturbo XOrg driver is now included and enabled by default. Thanks to 999 | ssvb https://github.com/ssvb/xf86-video-fbturbo 1000 | * Update Scratch image with further bug fixes 1001 | * Include Wolfram Mathematica 1002 | * Update to PyPy 2.2 1003 | * Update omxplayer 1004 | * Include v4l-utils for use with experimental V4L2 Raspberry Pi camera driver 1005 | * Update squeak-vm to fix issues with loading JPEGs 1006 | 2013-09-25: 1007 | * Update Scratch image for further performance improvements 1008 | * Include Oracle JDK 1009 | * At least a 4GiB SD card is now required (see above) 1010 | * Include PyPy 2.1 1011 | * Include base piface packages 1012 | * Update raspi-config to include bugfix for inheriting language settings 1013 | from NOOBS 1014 | 2013-09-10: 1015 | * Updated to current top of tree firmware 1016 | * Update squeak-vm, including fastblit optimised for the Raspbery Pi 1017 | * Include Sonic Pi and a fixed jackd2 package 1018 | * Support boot to Scratch 1019 | * Inherit keyboard and language settings from NOOBS 1020 | -------------------------------------------------------------------------------- /export-noobs/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}" 4 | mkdir -p "${STAGE_WORK_DIR}" 5 | 6 | IMG_FILE="${WORK_DIR}/export-image/${IMG_FILENAME}${IMG_SUFFIX}.img" 7 | 8 | unmount_image "${IMG_FILE}" 9 | 10 | rm -rf "${NOOBS_DIR}" 11 | 12 | echo "Creating loop device..." 13 | cnt=0 14 | until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do 15 | if [ $cnt -lt 5 ]; then 16 | cnt=$((cnt + 1)) 17 | echo "Error in losetup. Retrying..." 18 | sleep 5 19 | else 20 | echo "ERROR: losetup failed; exiting" 21 | exit 1 22 | fi 23 | done 24 | 25 | ensure_loopdev_partitions "$LOOP_DEV" 26 | BOOT_DEV="${LOOP_DEV}p1" 27 | ROOT_DEV="${LOOP_DEV}p2" 28 | 29 | mkdir -p "${STAGE_WORK_DIR}/rootfs" 30 | mkdir -p "${NOOBS_DIR}" 31 | 32 | mount "$ROOT_DEV" "${STAGE_WORK_DIR}/rootfs" 33 | mount "$BOOT_DEV" "${STAGE_WORK_DIR}/rootfs/boot" 34 | 35 | ln -sv "/lib/systemd/system/apply_noobs_os_config.service" "$ROOTFS_DIR/etc/systemd/system/multi-user.target.wants/apply_noobs_os_config.service" 36 | 37 | KERNEL_VER="$(zgrep -oPm 1 "Linux version \K(.*)$" "${STAGE_WORK_DIR}/rootfs/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | cut -f-2 -d.)" 38 | echo "$KERNEL_VER" > "${STAGE_WORK_DIR}/kernel_version" 39 | 40 | bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs/boot" -cpf - . | xz -T0 > "${NOOBS_DIR}/boot.tar.xz" 41 | umount "${STAGE_WORK_DIR}/rootfs/boot" 42 | bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs" --one-file-system -cpf - . | xz -T0 > "${NOOBS_DIR}/root.tar.xz" 43 | 44 | unmount_image "${IMG_FILE}" 45 | -------------------------------------------------------------------------------- /scripts/common: -------------------------------------------------------------------------------- 1 | log (){ 2 | date +"[%T] $*" | tee -a "${LOG_FILE}" 3 | } 4 | export -f log 5 | 6 | bootstrap(){ 7 | local BOOTSTRAP_CMD=debootstrap 8 | local BOOTSTRAP_ARGS=() 9 | 10 | export http_proxy=${APT_PROXY} 11 | 12 | BOOTSTRAP_ARGS+=(--arch armhf) 13 | BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") 14 | BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") 15 | BOOTSTRAP_ARGS+=(--exclude=info,ifupdown) 16 | BOOTSTRAP_ARGS+=(--include=ca-certificates) 17 | BOOTSTRAP_ARGS+=("$@") 18 | printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" 19 | 20 | setarch linux32 capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true 21 | 22 | if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then 23 | cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}" 24 | log "bootstrap failed: please check ${STAGE_WORK_DIR}/debootstrap.log" 25 | return 1 26 | fi 27 | } 28 | export -f bootstrap 29 | 30 | copy_previous(){ 31 | if [ ! -d "${PREV_ROOTFS_DIR}" ]; then 32 | echo "Previous stage rootfs not found" 33 | false 34 | fi 35 | mkdir -p "${ROOTFS_DIR}" 36 | rsync -aHAXx --exclude var/cache/apt/archives "${PREV_ROOTFS_DIR}/" "${ROOTFS_DIR}/" 37 | } 38 | export -f copy_previous 39 | 40 | unmount(){ 41 | if [ -z "$1" ]; then 42 | DIR=$PWD 43 | else 44 | DIR=$1 45 | fi 46 | 47 | for i in {1..6}; do 48 | if awk "\$2 ~ /^${DIR//\//\\/}/ {print \$2}" /etc/mtab | sort -r | xargs -r umount; then 49 | break 50 | elif [ "$i" -eq 6 ]; then 51 | log "Failed to unmount ${DIR}. Do not try to delete this directory while it contains mountpoints!" 52 | return 1 53 | fi 54 | log "Retrying ($i/5)..." 55 | sleep 1 56 | done 57 | } 58 | export -f unmount 59 | 60 | unmount_image(){ 61 | if command -v udevadm >/dev/null 2>&1; then 62 | udevadm settle 10 63 | else 64 | sleep 1 65 | fi 66 | LOOP_DEVICE=$(losetup -n -O NAME -j "$1") 67 | if [ -n "$LOOP_DEVICE" ]; then 68 | for part in "$LOOP_DEVICE"p*; do 69 | if DIR=$(findmnt -n -o target -S "$part"); then 70 | unmount "$DIR" 71 | fi 72 | done 73 | losetup -d "$LOOP_DEVICE" 74 | fi 75 | } 76 | export -f unmount_image 77 | 78 | on_chroot() { 79 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/proc)"; then 80 | mount -t proc proc "${ROOTFS_DIR}/proc" 81 | fi 82 | 83 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/dev)"; then 84 | mount --bind /dev "${ROOTFS_DIR}/dev" 85 | fi 86 | 87 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/dev/pts)"; then 88 | mount --bind /dev/pts "${ROOTFS_DIR}/dev/pts" 89 | fi 90 | 91 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/sys)"; then 92 | mount --bind /sys "${ROOTFS_DIR}/sys" 93 | fi 94 | 95 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/run)"; then 96 | mount -t tmpfs tmpfs "${ROOTFS_DIR}/run" 97 | fi 98 | 99 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/tmp)"; then 100 | mount -t tmpfs tmpfs "${ROOTFS_DIR}/tmp" 101 | fi 102 | 103 | setarch linux32 capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@" 104 | } 105 | export -f on_chroot 106 | 107 | update_issue() { 108 | echo -e "${PI_GEN_RELEASE} ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue" 109 | } 110 | export -f update_issue 111 | 112 | ensure_next_loopdev() { 113 | local loopdev 114 | loopdev="$(losetup -f)" 115 | loopmaj="$(echo "$loopdev" | sed -E 's/.*[^0-9]*?([0-9]+)$/\1/')" 116 | [[ -b "$loopdev" ]] || mknod "$loopdev" b 7 "$loopmaj" 117 | } 118 | export -f ensure_next_loopdev 119 | 120 | ensure_loopdev_partitions() { 121 | local line 122 | local partition 123 | local majmin 124 | lsblk -r -n -o "NAME,MAJ:MIN" "$1" | grep -v "^${1#/dev/} " | while read -r line; do 125 | partition="${line%% *}" 126 | majmin="${line#* }" 127 | if [ ! -b "/dev/$partition" ]; then 128 | mknod "/dev/$partition" b "${majmin%:*}" "${majmin#*:}" 129 | fi 130 | done 131 | command -v udevadm >/dev/null 2>&1 || return 0 132 | udevadm settle 10 133 | } 134 | export -f ensure_loopdev_partitions 135 | -------------------------------------------------------------------------------- /scripts/dependencies_check: -------------------------------------------------------------------------------- 1 | # dependencies_check 2 | # $@ Dependency files to check 3 | # 4 | # Each dependency is in the form of a tool to test for, optionally followed by 5 | # a : and the name of a package if the package on a Debian-ish system is not 6 | # named for the tool (i.e., qemu-user-static). 7 | dependencies_check() 8 | { 9 | local depfile deps missing 10 | 11 | for depfile in "$@"; do 12 | if [[ -e "$depfile" ]]; then 13 | deps="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${BASE_DIR}/depends")" 14 | 15 | fi 16 | for dep in $deps; do 17 | if ! hash "${dep%:*}" 2>/dev/null; then 18 | missing="${missing:+$missing }${dep#*:}" 19 | fi 20 | done 21 | done 22 | 23 | if [[ "$missing" ]]; then 24 | echo "Required dependencies not installed" 25 | echo 26 | echo "This can be resolved on Debian/Raspbian systems by installing:" 27 | echo "$missing" 28 | false 29 | fi 30 | 31 | # If we're building on a native arm platform, we don't need to check for 32 | # binfmt_misc or require it to be loaded. 33 | 34 | binfmt_misc_required=1 35 | 36 | case $(uname -m) in 37 | aarch64) 38 | binfmt_misc_required=0 39 | ;; 40 | arm*) 41 | binfmt_misc_required=0 42 | ;; 43 | esac 44 | 45 | if [[ "${binfmt_misc_required}" == "1" ]]; then 46 | if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then 47 | echo "Module binfmt_misc not loaded in host" 48 | echo "Please run:" 49 | echo " sudo modprobe binfmt_misc" 50 | exit 1 51 | fi 52 | fi 53 | } 54 | -------------------------------------------------------------------------------- /scripts/remove-comments.sed: -------------------------------------------------------------------------------- 1 | # Deletes comments and collapses whitespace in ##-packages files 2 | 3 | # Append (N)ext line to buffer 4 | # if (!)not ($)buffer is EOF, (b)ranch to (:)label loop 5 | :loop 6 | N 7 | $ !b loop 8 | 9 | # Buffer is "line1\nline2\n...lineN", del comments and collapse whitespace 10 | s/#[^\n]*//g 11 | s/[[:space:]]\{1,\}/ /g 12 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/" 4 | install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" 5 | sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list" 6 | sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list" 7 | 8 | if [ -n "$APT_PROXY" ]; then 9 | install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 10 | sed "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -i -e "s|APT_PROXY|${APT_PROXY}|" 11 | else 12 | rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 13 | fi 14 | 15 | if [ -n "$TEMP_REPO" ]; then 16 | install -m 644 /dev/null "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" 17 | echo "$TEMP_REPO" | sed "s/RELEASE/$RELEASE/g" > "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" 18 | else 19 | rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" 20 | fi 21 | 22 | cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" 23 | install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/" 24 | on_chroot <<- \EOF 25 | ARCH="$(dpkg --print-architecture)" 26 | if [ "$ARCH" = "armhf" ]; then 27 | dpkg --add-architecture arm64 28 | elif [ "$ARCH" = "arm64" ]; then 29 | dpkg --add-architecture armhf 30 | fi 31 | apt-get update 32 | apt-get dist-upgrade -y 33 | EOF 34 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/01-packages: -------------------------------------------------------------------------------- 1 | raspberrypi-archive-keyring 2 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/51cache: -------------------------------------------------------------------------------- 1 | Acquire::http { Proxy "APT_PROXY"; }; 2 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/raspberrypi.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1.4.12 (GNU/Linux) 3 | 4 | mQENBE/d7o8BCACrwqQacGJfn3tnMzGui6mv2lLxYbsOuy/+U4rqMmGEuo3h9m92 5 | 30E2EtypsoWczkBretzLUCFv+VUOxaA6sV9+puTqYGhhQZFuKUWcG7orf7QbZRuu 6 | TxsEUepW5lg7MExmAu1JJzqM0kMQX8fVyWVDkjchZ/is4q3BPOUCJbUJOsE+kK/6 7 | 8kW6nWdhwSAjfDh06bA5wvoXNjYoDdnSZyVdcYCPEJXEg5jfF/+nmiFKMZBraHwn 8 | eQsepr7rBXxNcEvDlSOPal11fg90KXpy7Umre1UcAZYJdQeWcHu7X5uoJx/MG5J8 9 | ic6CwYmDaShIFa92f8qmFcna05+lppk76fsnABEBAAG0IFJhc3BiZXJyeSBQaSBB 10 | cmNoaXZlIFNpZ25pbmcgS2V5iQE4BBMBAgAiBQJP3e6PAhsDBgsJCAcDAgYVCAIJ 11 | CgsEFgIDAQIeAQIXgAAKCRCCsSmSf6MwPk6vB/9pePB3IukU9WC9Bammh3mpQTvL 12 | OifbkzHkmAYxzjfK6D2I8pT0xMxy949+ThzJ7uL60p6T/32ED9DR3LHIMXZvKtuc 13 | mQnSiNDX03E2p7lIP/htoxW2hDP2n8cdlNdt0M9IjaWBppsbO7IrDppG2B1aRLni 14 | uD7v8bHRL2mKTtIDLX42Enl8aLAkJYgNWpZyPkDyOqamjijarIWjGEPCkaURF7g4 15 | d44HvYhpbLMOrz1m6N5Bzoa5+nq3lmifeiWKxioFXU+Hy5bhtAM6ljVb59hbD2ra 16 | X4+3LXC9oox2flmQnyqwoyfZqVgSQa0B41qEQo8t1bz6Q1Ti7fbMLThmbRHiuQEN 17 | BE/d7o8BCADNlVtBZU63fm79SjHh5AEKFs0C3kwa0mOhp9oas/haDggmhiXdzeD3 18 | 49JWz9ZTx+vlTq0s+I+nIR1a+q+GL+hxYt4HhxoA6vlDMegVfvZKzqTX9Nr2VqQa 19 | S4Kz3W5ULv81tw3WowK6i0L7pqDmvDqgm73mMbbxfHD0SyTt8+fk7qX6Ag2pZ4a9 20 | ZdJGxvASkh0McGpbYJhk1WYD+eh4fqH3IaeJi6xtNoRdc5YXuzILnp+KaJyPE5CR 21 | qUY5JibOD3qR7zDjP0ueP93jLqmoKltCdN5+yYEExtSwz5lXniiYOJp8LWFCgv5h 22 | m8aYXkcJS1xVV9Ltno23YvX5edw9QY4hABEBAAGJAR8EGAECAAkFAk/d7o8CGwwA 23 | CgkQgrEpkn+jMD5Figf/dIC1qtDMTbu5IsI5uZPX63xydaExQNYf98cq5H2fWF6O 24 | yVR7ERzA2w33hI0yZQrqO6pU9SRnHRxCFvGv6y+mXXXMRcmjZG7GiD6tQWeN/3wb 25 | EbAn5cg6CJ/Lk/BI4iRRfBX07LbYULCohlGkwBOkRo10T+Ld4vCCnBftCh5x2OtZ 26 | TOWRULxP36y2PLGVNF+q9pho98qx+RIxvpofQM/842ZycjPJvzgVQsW4LT91KYAE 27 | 4TVf6JjwUM6HZDoiNcX6d7zOhNfQihXTsniZZ6rky287htsWVDNkqOi5T3oTxWUo 28 | m++/7s3K3L0zWopdhMVcgg6Nt9gcjzqN1c0gy55L/g== 29 | =mNSj 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/raspi.list: -------------------------------------------------------------------------------- 1 | deb http://archive.raspberrypi.com/debian/ RELEASE main 2 | # Uncomment line below then 'apt-get update' to enable 'apt-get source' 3 | #deb-src http://archive.raspberrypi.com/debian/ RELEASE main 4 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/sources.list: -------------------------------------------------------------------------------- 1 | deb [ arch=armhf ] http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi 2 | # Uncomment line below then 'apt-get update' to enable 'apt-get source' 3 | #deb-src http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi 4 | -------------------------------------------------------------------------------- /stage0/01-locale/00-debconf: -------------------------------------------------------------------------------- 1 | # Locales to be generated: 2 | # Choices: All locales, aa_DJ ISO-8859-1, aa_DJ.UTF-8 UTF-8, aa_ER UTF-8, aa_ER@saaho UTF-8, aa_ET UTF-8, af_ZA ISO-8859-1, af_ZA.UTF-8 UTF-8, ak_GH UTF-8, am_ET UTF-8, an_ES ISO-8859-15, an_ES.UTF-8 UTF-8, anp_IN UTF-8, ar_AE ISO-8859-6, ar_AE.UTF-8 UTF-8, ar_BH ISO-8859-6, ar_BH.UTF-8 UTF-8, ar_DZ ISO-8859-6, ar_DZ.UTF-8 UTF-8, ar_EG ISO-8859-6, ar_EG.UTF-8 UTF-8, ar_IN UTF-8, ar_IQ ISO-8859-6, ar_IQ.UTF-8 UTF-8, ar_JO ISO-8859-6, ar_JO.UTF-8 UTF-8, ar_KW ISO-8859-6, ar_KW.UTF-8 UTF-8, ar_LB ISO-8859-6, ar_LB.UTF-8 UTF-8, ar_LY ISO-8859-6, ar_LY.UTF-8 UTF-8, ar_MA ISO-8859-6, ar_MA.UTF-8 UTF-8, ar_OM ISO-8859-6, ar_OM.UTF-8 UTF-8, ar_QA ISO-8859-6, ar_QA.UTF-8 UTF-8, ar_SA ISO-8859-6, ar_SA.UTF-8 UTF-8, ar_SD ISO-8859-6, ar_SD.UTF-8 UTF-8, ar_SS UTF-8, ar_SY ISO-8859-6, ar_SY.UTF-8 UTF-8, ar_TN ISO-8859-6, ar_TN.UTF-8 UTF-8, ar_YE ISO-8859-6, ar_YE.UTF-8 UTF-8, as_IN UTF-8, ast_ES ISO-8859-15, ast_ES.UTF-8 UTF-8, ayc_PE UTF-8, az_AZ UTF-8, be_BY CP1251, be_BY.UTF-8 UTF-8, be_BY@latin UTF-8, bem_ZM UTF-8, ber_DZ UTF-8, ber_MA UTF-8, bg_BG CP1251, bg_BG.UTF-8 UTF-8, bho_IN UTF-8, bn_BD UTF-8, bn_IN UTF-8, bo_CN UTF-8, bo_IN UTF-8, br_FR ISO-8859-1, br_FR.UTF-8 UTF-8, br_FR@euro ISO-8859-15, brx_IN UTF-8, bs_BA ISO-8859-2, bs_BA.UTF-8 UTF-8, byn_ER UTF-8, ca_AD ISO-8859-15, ca_AD.UTF-8 UTF-8, ca_ES ISO-8859-1, ca_ES.UTF-8 UTF-8, ca_ES.UTF-8@valencia UTF-8, ca_ES@euro ISO-8859-15, ca_ES@valencia ISO-8859-15, ca_FR ISO-8859-15, ca_FR.UTF-8 UTF-8, ca_IT ISO-8859-15, ca_IT.UTF-8 UTF-8, cmn_TW UTF-8, crh_UA UTF-8, cs_CZ ISO-8859-2, cs_CZ.UTF-8 UTF-8, csb_PL UTF-8, cv_RU UTF-8, cy_GB ISO-8859-14, cy_GB.UTF-8 UTF-8, da_DK ISO-8859-1, da_DK.UTF-8 UTF-8, de_AT ISO-8859-1, de_AT.UTF-8 UTF-8, de_AT@euro ISO-8859-15, de_BE ISO-8859-1, de_BE.UTF-8 UTF-8, de_BE@euro ISO-8859-15, de_CH ISO-8859-1, de_CH.UTF-8 UTF-8, de_DE ISO-8859-1, de_DE.UTF-8 UTF-8, de_DE@euro ISO-8859-15, de_LI.UTF-8 UTF-8, de_LU ISO-8859-1, de_LU.UTF-8 UTF-8, de_LU@euro ISO-8859-15, doi_IN UTF-8, dv_MV UTF-8, dz_BT UTF-8, el_CY ISO-8859-7, el_CY.UTF-8 UTF-8, el_GR ISO-8859-7, el_GR.UTF-8 UTF-8, en_AG UTF-8, en_AU ISO-8859-1, en_AU.UTF-8 UTF-8, en_BW ISO-8859-1, en_BW.UTF-8 UTF-8, en_CA ISO-8859-1, en_CA.UTF-8 UTF-8, en_DK ISO-8859-1, en_DK.ISO-8859-15 ISO-8859-15, en_DK.UTF-8 UTF-8, en_GB ISO-8859-1, en_GB.ISO-8859-15 ISO-8859-15, en_GB.UTF-8 UTF-8, en_HK ISO-8859-1, en_HK.UTF-8 UTF-8, en_IE ISO-8859-1, en_IE.UTF-8 UTF-8, en_IE@euro ISO-8859-15, en_IN UTF-8, en_NG UTF-8, en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8, en_PH ISO-8859-1, en_PH.UTF-8 UTF-8, en_SG ISO-8859-1, en_SG.UTF-8 UTF-8, en_US ISO-8859-1, en_US.ISO-8859-15 ISO-8859-15, en_US.UTF-8 UTF-8, en_ZA ISO-8859-1, en_ZA.UTF-8 UTF-8, en_ZM UTF-8, en_ZW ISO-8859-1, en_ZW.UTF-8 UTF-8, eo ISO-8859-3, eo.UTF-8 UTF-8, es_AR ISO-8859-1, es_AR.UTF-8 UTF-8, es_BO ISO-8859-1, es_BO.UTF-8 UTF-8, es_CL ISO-8859-1, es_CL.UTF-8 UTF-8, es_CO ISO-8859-1, es_CO.UTF-8 UTF-8, es_CR ISO-8859-1, es_CR.UTF-8 UTF-8, es_CU UTF-8, es_DO ISO-8859-1, es_DO.UTF-8 UTF-8, es_EC ISO-8859-1, es_EC.UTF-8 UTF-8, es_ES ISO-8859-1, es_ES.UTF-8 UTF-8, es_ES@euro ISO-8859-15, es_GT ISO-8859-1, es_GT.UTF-8 UTF-8, es_HN ISO-8859-1, es_HN.UTF-8 UTF-8, es_MX ISO-8859-1, es_MX.UTF-8 UTF-8, es_NI ISO-8859-1, es_NI.UTF-8 UTF-8, es_PA ISO-8859-1, es_PA.UTF-8 UTF-8, es_PE ISO-8859-1, es_PE.UTF-8 UTF-8, es_PR ISO-8859-1, es_PR.UTF-8 UTF-8, es_PY ISO-8859-1, es_PY.UTF-8 UTF-8, es_SV ISO-8859-1, es_SV.UTF-8 UTF-8, es_US ISO-8859-1, es_US.UTF-8 UTF-8, es_UY ISO-8859-1, es_UY.UTF-8 UTF-8, es_VE ISO-8859-1, es_VE.UTF-8 UTF-8, et_EE ISO-8859-1, et_EE.ISO-8859-15 ISO-8859-15, et_EE.UTF-8 UTF-8, eu_ES ISO-8859-1, eu_ES.UTF-8 UTF-8, eu_ES@euro ISO-8859-15, eu_FR ISO-8859-1, eu_FR.UTF-8 UTF-8, eu_FR@euro ISO-8859-15, fa_IR UTF-8, ff_SN UTF-8, fi_FI ISO-8859-1, fi_FI.UTF-8 UTF-8, fi_FI@euro ISO-8859-15, fil_PH UTF-8, fo_FO ISO-8859-1, fo_FO.UTF-8 UTF-8, fr_BE ISO-8859-1, fr_BE.UTF-8 UTF-8, fr_BE@euro ISO-8859-15, fr_CA ISO-8859-1, fr_CA.UTF-8 UTF-8, fr_CH ISO-8859-1, fr_CH.UTF-8 UTF-8, fr_FR ISO-8859-1, fr_FR.UTF-8 UTF-8, fr_FR@euro ISO-8859-15, fr_LU ISO-8859-1, fr_LU.UTF-8 UTF-8, fr_LU@euro ISO-8859-15, fur_IT UTF-8, fy_DE UTF-8, fy_NL UTF-8, ga_IE ISO-8859-1, ga_IE.UTF-8 UTF-8, ga_IE@euro ISO-8859-15, gd_GB ISO-8859-15, gd_GB.UTF-8 UTF-8, gez_ER UTF-8, gez_ER@abegede UTF-8, gez_ET UTF-8, gez_ET@abegede UTF-8, gl_ES ISO-8859-1, gl_ES.UTF-8 UTF-8, gl_ES@euro ISO-8859-15, gu_IN UTF-8, gv_GB ISO-8859-1, gv_GB.UTF-8 UTF-8, ha_NG UTF-8, hak_TW UTF-8, he_IL ISO-8859-8, he_IL.UTF-8 UTF-8, hi_IN UTF-8, hne_IN UTF-8, hr_HR ISO-8859-2, hr_HR.UTF-8 UTF-8, hsb_DE ISO-8859-2, hsb_DE.UTF-8 UTF-8, ht_HT UTF-8, hu_HU ISO-8859-2, hu_HU.UTF-8 UTF-8, hy_AM UTF-8, hy_AM.ARMSCII-8 ARMSCII-8, ia_FR UTF-8, id_ID ISO-8859-1, id_ID.UTF-8 UTF-8, ig_NG UTF-8, ik_CA UTF-8, is_IS ISO-8859-1, is_IS.UTF-8 UTF-8, it_CH ISO-8859-1, it_CH.UTF-8 UTF-8, it_IT ISO-8859-1, it_IT.UTF-8 UTF-8, it_IT@euro ISO-8859-15, iu_CA UTF-8, iw_IL ISO-8859-8, iw_IL.UTF-8 UTF-8, ja_JP.EUC-JP EUC-JP, ja_JP.UTF-8 UTF-8, ka_GE GEORGIAN-PS, ka_GE.UTF-8 UTF-8, kk_KZ PT154, kk_KZ RK1048, kk_KZ.UTF-8 UTF-8, kl_GL ISO-8859-1, kl_GL.UTF-8 UTF-8, km_KH UTF-8, kn_IN UTF-8, ko_KR.EUC-KR EUC-KR, ko_KR.UTF-8 UTF-8, kok_IN UTF-8, ks_IN UTF-8, ks_IN@devanagari UTF-8, ku_TR ISO-8859-9, ku_TR.UTF-8 UTF-8, kw_GB ISO-8859-1, kw_GB.UTF-8 UTF-8, ky_KG UTF-8, lb_LU UTF-8, lg_UG ISO-8859-10, lg_UG.UTF-8 UTF-8, li_BE UTF-8, li_NL UTF-8, lij_IT UTF-8, lo_LA UTF-8, lt_LT ISO-8859-13, lt_LT.UTF-8 UTF-8, lv_LV ISO-8859-13, lv_LV.UTF-8 UTF-8, lzh_TW UTF-8, mag_IN UTF-8, mai_IN UTF-8, mg_MG ISO-8859-15, mg_MG.UTF-8 UTF-8, mhr_RU UTF-8, mi_NZ ISO-8859-13, mi_NZ.UTF-8 UTF-8, mk_MK ISO-8859-5, mk_MK.UTF-8 UTF-8, ml_IN UTF-8, mn_MN UTF-8, mni_IN UTF-8, mr_IN UTF-8, ms_MY ISO-8859-1, ms_MY.UTF-8 UTF-8, mt_MT ISO-8859-3, mt_MT.UTF-8 UTF-8, my_MM UTF-8, nan_TW UTF-8, nan_TW@latin UTF-8, nb_NO ISO-8859-1, nb_NO.UTF-8 UTF-8, nds_DE UTF-8, nds_NL UTF-8, ne_NP UTF-8, nhn_MX UTF-8, niu_NU UTF-8, niu_NZ UTF-8, nl_AW UTF-8, nl_BE ISO-8859-1, nl_BE.UTF-8 UTF-8, nl_BE@euro ISO-8859-15, nl_NL ISO-8859-1, nl_NL.UTF-8 UTF-8, nl_NL@euro ISO-8859-15, nn_NO ISO-8859-1, nn_NO.UTF-8 UTF-8, nr_ZA UTF-8, nso_ZA UTF-8, oc_FR ISO-8859-1, oc_FR.UTF-8 UTF-8, om_ET UTF-8, om_KE ISO-8859-1, om_KE.UTF-8 UTF-8, or_IN UTF-8, os_RU UTF-8, pa_IN UTF-8, pa_PK UTF-8, pap_AN UTF-8, pap_AW UTF-8, pap_CW UTF-8, pl_PL ISO-8859-2, pl_PL.UTF-8 UTF-8, ps_AF UTF-8, pt_BR ISO-8859-1, pt_BR.UTF-8 UTF-8, pt_PT ISO-8859-1, pt_PT.UTF-8 UTF-8, pt_PT@euro ISO-8859-15, quz_PE UTF-8, ro_RO ISO-8859-2, ro_RO.UTF-8 UTF-8, ru_RU ISO-8859-5, ru_RU.CP1251 CP1251, ru_RU.KOI8-R KOI8-R, ru_RU.UTF-8 UTF-8, ru_UA KOI8-U, ru_UA.UTF-8 UTF-8, rw_RW UTF-8, sa_IN UTF-8, sat_IN UTF-8, sc_IT UTF-8, sd_IN UTF-8, sd_IN@devanagari UTF-8, se_NO UTF-8, shs_CA UTF-8, si_LK UTF-8, sid_ET UTF-8, sk_SK ISO-8859-2, sk_SK.UTF-8 UTF-8, sl_SI ISO-8859-2, sl_SI.UTF-8 UTF-8, so_DJ ISO-8859-1, so_DJ.UTF-8 UTF-8, so_ET UTF-8, so_KE ISO-8859-1, so_KE.UTF-8 UTF-8, so_SO ISO-8859-1, so_SO.UTF-8 UTF-8, sq_AL ISO-8859-1, sq_AL.UTF-8 UTF-8, sq_MK UTF-8, sr_ME UTF-8, sr_RS UTF-8, sr_RS@latin UTF-8, ss_ZA UTF-8, st_ZA ISO-8859-1, st_ZA.UTF-8 UTF-8, sv_FI ISO-8859-1, sv_FI.UTF-8 UTF-8, sv_FI@euro ISO-8859-15, sv_SE ISO-8859-1, sv_SE.ISO-8859-15 ISO-8859-15, sv_SE.UTF-8 UTF-8, sw_KE UTF-8, sw_TZ UTF-8, szl_PL UTF-8, ta_IN UTF-8, ta_LK UTF-8, te_IN UTF-8, tg_TJ KOI8-T, tg_TJ.UTF-8 UTF-8, th_TH TIS-620, th_TH.UTF-8 UTF-8, the_NP UTF-8, ti_ER UTF-8, ti_ET UTF-8, tig_ER UTF-8, tk_TM UTF-8, tl_PH ISO-8859-1, tl_PH.UTF-8 UTF-8, tn_ZA UTF-8, tr_CY ISO-8859-9, tr_CY.UTF-8 UTF-8, tr_TR ISO-8859-9, tr_TR.UTF-8 UTF-8, ts_ZA UTF-8, tt_RU UTF-8, tt_RU@iqtelif UTF-8, ug_CN UTF-8, uk_UA KOI8-U, uk_UA.UTF-8 UTF-8, unm_US UTF-8, ur_IN UTF-8, ur_PK UTF-8, uz_UZ ISO-8859-1, uz_UZ.UTF-8 UTF-8, uz_UZ@cyrillic UTF-8, ve_ZA UTF-8, vi_VN UTF-8, wa_BE ISO-8859-1, wa_BE.UTF-8 UTF-8, wa_BE@euro ISO-8859-15, wae_CH UTF-8, wal_ET UTF-8, wo_SN UTF-8, xh_ZA ISO-8859-1, xh_ZA.UTF-8 UTF-8, yi_US CP1255, yi_US.UTF-8 UTF-8, yo_NG UTF-8, yue_HK UTF-8, zh_CN GB2312, zh_CN.GB18030 GB18030, zh_CN.GBK GBK, zh_CN.UTF-8 UTF-8, zh_HK BIG5-HKSCS, zh_HK.UTF-8 UTF-8, zh_SG GB2312, zh_SG.GBK GBK, zh_SG.UTF-8 UTF-8, zh_TW BIG5, zh_TW.EUC-TW EUC-TW, zh_TW.UTF-8 UTF-8, zu_ZA ISO-8859-1, zu_ZA.UTF-8 UTF-8 3 | locales locales/locales_to_be_generated multiselect ${LOCALE_DEFAULT} UTF-8 4 | # Default locale for the system environment: 5 | # Choices: None, C.UTF-8, en_GB.UTF-8 6 | locales locales/default_environment_locale select ${LOCALE_DEFAULT} 7 | -------------------------------------------------------------------------------- /stage0/01-locale/00-packages: -------------------------------------------------------------------------------- 1 | locales 2 | -------------------------------------------------------------------------------- /stage0/02-firmware/01-packages: -------------------------------------------------------------------------------- 1 | initramfs-tools 2 | raspi-firmware 3 | linux-image-rpi-v6 4 | linux-image-rpi-v7 5 | linux-image-rpi-v7l 6 | linux-image-rpi-v8 7 | linux-headers-rpi-v6 8 | linux-headers-rpi-v7 9 | linux-headers-rpi-v7l 10 | -------------------------------------------------------------------------------- /stage0/02-firmware/02-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then 4 | sed -i 's/^update_initramfs=.*/update_initramfs=no/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" 5 | fi 6 | 7 | if [ ! -f "${ROOTFS_DIR}/etc/kernel-img.conf" ]; then 8 | echo "do_symlinks=0" > "${ROOTFS_DIR}/etc/kernel-img.conf" 9 | fi 10 | rm -f "${ROOTFS_DIR}/"{vmlinuz,initrd.img}* 11 | -------------------------------------------------------------------------------- /stage0/files/raspberrypi.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RPi-Distro/pi-gen/e9c2afbdacb57169f70be64e6f6e2bbc8459cb1b/stage0/files/raspberrypi.gpg -------------------------------------------------------------------------------- /stage0/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ "$RELEASE" != "bookworm" ]; then 4 | echo "WARNING: RELEASE does not match the intended option for this branch." 5 | echo " Please check the relevant README.md section." 6 | fi 7 | 8 | if [ ! -d "${ROOTFS_DIR}" ]; then 9 | bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.com/raspbian/ 10 | fi 11 | -------------------------------------------------------------------------------- /stage1/00-boot-files/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | mkdir -p "${ROOTFS_DIR}/boot/firmware" 4 | 5 | if ! [ -L "${ROOTFS_DIR}/boot/overlays" ]; then 6 | ln -s firmware/overlays "${ROOTFS_DIR}/boot/overlays" 7 | fi 8 | 9 | install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/firmware/" 10 | install -m 644 files/config.txt "${ROOTFS_DIR}/boot/firmware/" 11 | 12 | for file in cmdline.txt config.txt; do 13 | printf "DO NOT EDIT THIS FILE\n\nThe file you are looking for has moved to %s\n" "/boot/firmware/${file}" > "${ROOTFS_DIR}/boot/${file}" 14 | done 15 | -------------------------------------------------------------------------------- /stage1/00-boot-files/files/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait 2 | -------------------------------------------------------------------------------- /stage1/00-boot-files/files/config.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rptl.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # Uncomment some or all of these to enable the optional hardware interfaces 6 | #dtparam=i2c_arm=on 7 | #dtparam=i2s=on 8 | #dtparam=spi=on 9 | 10 | # Enable audio (loads snd_bcm2835) 11 | dtparam=audio=on 12 | 13 | # Additional overlays and parameters are documented 14 | # /boot/firmware/overlays/README 15 | 16 | # Automatically load overlays for detected cameras 17 | camera_auto_detect=1 18 | 19 | # Automatically load overlays for detected DSI displays 20 | display_auto_detect=1 21 | 22 | # Automatically load initramfs files, if found 23 | auto_initramfs=1 24 | 25 | # Enable DRM VC4 V3D driver 26 | dtoverlay=vc4-kms-v3d 27 | max_framebuffers=2 28 | 29 | # Don't have the firmware create an initial video= setting in cmdline.txt. 30 | # Use the kernel's default instead. 31 | disable_fw_kms_setup=1 32 | 33 | # Disable compensation for displays with overscan 34 | disable_overscan=1 35 | 36 | # Run as fast as firmware / board allows 37 | arm_boost=1 38 | 39 | [cm4] 40 | # Enable host mode on the 2711 built-in XHCI USB controller. 41 | # This line should be removed if the legacy DWC2 controller is required 42 | # (e.g. for USB device mode) or if USB support is not required. 43 | otg_mode=1 44 | 45 | [cm5] 46 | dtoverlay=dwc2,dr_mode=host 47 | 48 | [all] 49 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | raspi-config 2 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-patches/01-bashrc.diff: -------------------------------------------------------------------------------- 1 | --- a/rootfs/etc/skel/.bashrc 2 | +++ b/rootfs/etc/skel/.bashrc 3 | @@ -43,7 +43,7 @@ 4 | # uncomment for a colored prompt, if the terminal has the capability; turned 5 | # off by default to not distract the user: the focus in a terminal window 6 | # should be on the output of commands, not on the prompt 7 | -#force_color_prompt=yes 8 | +force_color_prompt=yes 9 | 10 | if [ -n "$force_color_prompt" ]; then 11 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 12 | @@ -57,7 +57,7 @@ 13 | fi 14 | 15 | if [ "$color_prompt" = yes ]; then 16 | - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 17 | + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' 18 | else 19 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 20 | fi 21 | @@ -79,9 +79,9 @@ 22 | #alias dir='dir --color=auto' 23 | #alias vdir='vdir --color=auto' 24 | 25 | - #alias grep='grep --color=auto' 26 | - #alias fgrep='fgrep --color=auto' 27 | - #alias egrep='egrep --color=auto' 28 | + alias grep='grep --color=auto' 29 | + alias fgrep='fgrep --color=auto' 30 | + alias egrep='egrep --color=auto' 31 | fi 32 | 33 | # colored GCC warnings and errors 34 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-patches/series: -------------------------------------------------------------------------------- 1 | 01-bashrc.diff 2 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab" 4 | 5 | on_chroot << EOF 6 | if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then 7 | adduser --disabled-password --gecos "" ${FIRST_USER_NAME} 8 | fi 9 | 10 | if [ -n "${FIRST_USER_PASS}" ]; then 11 | echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd 12 | fi 13 | echo "root:root" | chpasswd 14 | EOF 15 | 16 | 17 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/files/fstab: -------------------------------------------------------------------------------- 1 | proc /proc proc defaults 0 0 2 | BOOTDEV /boot/firmware vfat defaults 0 2 3 | ROOTDEV / ext4 defaults,noatime 0 1 4 | -------------------------------------------------------------------------------- /stage1/02-net-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | netbase 2 | -------------------------------------------------------------------------------- /stage1/02-net-tweaks/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" 4 | echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts" 5 | 6 | on_chroot << EOF 7 | SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1 8 | EOF 9 | -------------------------------------------------------------------------------- /stage1/03-install-packages/00-packages: -------------------------------------------------------------------------------- 1 | systemd-timesyncd 2 | -------------------------------------------------------------------------------- /stage1/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage2/00-copies-and-fills/01-packages: -------------------------------------------------------------------------------- 1 | raspi-copies-and-fills 2 | -------------------------------------------------------------------------------- /stage2/00-copies-and-fills/02-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then 4 | mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" 5 | fi 6 | 7 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-debconf: -------------------------------------------------------------------------------- 1 | # Encoding to use on the console: 2 | # Choices: ARMSCII-8, CP1251, CP1255, CP1256, GEORGIAN-ACADEMY, GEORGIAN-PS, IBM1133, ISIRI-3342, ISO-8859-1, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, KOI8-R, KOI8-U, TIS-620, UTF-8, VISCII 3 | console-setup console-setup/charmap47 select UTF-8 4 | # Character set to support: 5 | # Choices: . Arabic, # Armenian, # Cyrillic - KOI8-R and KOI8-U, # Cyrillic - non-Slavic languages, # Cyrillic - Slavic languages (also Bosnian and Serbian Latin), . Ethiopic, # Georgian, # Greek, # Hebrew, # Lao, # Latin1 and Latin5 - western Europe and Turkic languages, # Latin2 - central Europe and Romanian, # Latin3 and Latin8 - Chichewa; Esperanto; Irish; Maltese and Welsh, # Latin7 - Lithuanian; Latvian; Maori and Marshallese, . Latin - Vietnamese, # Thai, . Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic, . Combined - Latin; Slavic Cyrillic; Greek, . Combined - Latin; Slavic and non-Slavic Cyrillic, Guess optimal character set 6 | console-setup console-setup/codeset47 select Guess optimal character set 7 | # Font for the console: 8 | # Choices: Fixed, Goha, GohaClassic, Terminus, TerminusBold, TerminusBoldVGA, VGA, Do not change the boot/kernel font, Let the system select a suitable font 9 | console-setup console-setup/fontface47 select Do not change the boot/kernel font 10 | # Key to function as AltGr: 11 | # Choices: The default for the keyboard layout, No AltGr key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Alt, Left Logo key, Keypad Enter key, Both Logo keys, Both Alt keys 12 | keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout 13 | # Keyboard model: 14 | # Choices: A4Tech KB-21, A4Tech KBS-8, A4Tech Wireless Desktop RFKB-23, Acer AirKey V, Acer C300, Acer Ferrari 4000, Acer Laptop, Advance Scorpius KI, Amiga, Apple, Apple Aluminium Keyboard (ANSI), Apple Aluminium Keyboard (ISO), Apple Aluminium Keyboard (JIS), Apple Laptop, Asus Laptop, Atari TT, Azona RF2300 wireless Internet Keyboard, BTC 5090, BTC 5113RF Multimedia, BTC 5126T, BTC 6301URF, BTC 9000, BTC 9000A, BTC 9001AH, BTC 9019U, BTC 9116U Mini Wireless Internet and Gaming, BenQ X-Touch, BenQ X-Touch 730, BenQ X-Touch 800, Brother Internet Keyboard, Cherry B.UNLIMITED, Cherry Blue Line CyBo@rd, Cherry Blue Line CyBo@rd (alternate option), Cherry CyBo@rd USB-Hub, Cherry CyMotion Expert, Cherry CyMotion Master Linux, Cherry CyMotion Master XPress, Chicony Internet Keyboard, Chicony KB-9885, Chicony KU-0108, Chicony KU-0420, Classmate PC, Compaq Easy Access Keyboard, Compaq Internet Keyboard (13 keys), Compaq Internet Keyboard (18 keys), Compaq Internet Keyboard (7 keys), Compaq iPaq Keyboard, Creative Desktop Wireless 7000, DTK2000, Dell, Dell 101-key PC, Dell Laptop/notebook Inspiron 6xxx/8xxx, Dell Laptop/notebook Precision M series, Dell Latitude series laptop, Dell Precision M65, Dell SK-8125, Dell SK-8135, Dell USB Multimedia Keyboard, Dexxa Wireless Desktop Keyboard, Diamond 9801 / 9802 series, Ennyah DKB-1008, Everex STEPnote, FL90, Fujitsu-Siemens Computers AMILO laptop, Generic 101-key PC, Generic 102-key (Intl) PC, Generic 104-key PC, Generic 105-key (Intl) PC, Genius Comfy KB-12e, Genius Comfy KB-16M / Genius MM Keyboard KWD-910, Genius Comfy KB-21e-Scroll, Genius KB-19e NB, Genius KKB-2050HS, Gyration, HTC Dream, Happy Hacking Keyboard, Happy Hacking Keyboard for Mac, Hewlett-Packard Internet Keyboard, Hewlett-Packard Mini 110 Notebook, Hewlett-Packard Omnibook 500 FA, Hewlett-Packard Omnibook 5xx, Hewlett-Packard Omnibook 6000/6100, Hewlett-Packard Omnibook XE3 GC, Hewlett-Packard Omnibook XE3 GF, Hewlett-Packard Omnibook XT1000, Hewlett-Packard Pavilion ZT11xx, Hewlett-Packard Pavilion dv5, Hewlett-Packard SK-250x Multimedia Keyboard, Hewlett-Packard nx9020, Honeywell Euroboard, Htc Dream phone, IBM Rapid Access, IBM Rapid Access II, IBM Space Saver, IBM ThinkPad 560Z/600/600E/A22E, IBM ThinkPad R60/T60/R61/T61, IBM ThinkPad Z60m/Z60t/Z61m/Z61t, Keytronic FlexPro, Kinesis, Laptop/notebook Compaq (eg. Armada) Laptop Keyboard, Laptop/notebook Compaq (eg. Presario) Internet Keyboard, Laptop/notebook eMachines m68xx, Logitech Access Keyboard, Logitech Cordless Desktop, Logitech Cordless Desktop (alternate option), Logitech Cordless Desktop EX110, Logitech Cordless Desktop LX-300, Logitech Cordless Desktop Navigator, Logitech Cordless Desktop Optical, Logitech Cordless Desktop Pro (alternate option 2), Logitech Cordless Desktop iTouch, Logitech Cordless Freedom/Desktop Navigator, Logitech G15 extra keys via G15daemon, Logitech Generic Keyboard, Logitech Internet 350 Keyboard, Logitech Internet Keyboard, Logitech Internet Navigator Keyboard, Logitech Media Elite Keyboard, Logitech Ultra-X Cordless Media Desktop Keyboard, Logitech Ultra-X Keyboard, Logitech diNovo Edge Keyboard, Logitech diNovo Keyboard, Logitech iTouch, Logitech iTouch Cordless Keyboard (model Y-RB6), Logitech iTouch Internet Navigator Keyboard SE, Logitech iTouch Internet Navigator Keyboard SE (USB), MacBook/MacBook Pro, MacBook/MacBook Pro (Intl), Macintosh, Macintosh Old, Memorex MX1998, Memorex MX2500 EZ-Access Keyboard, Memorex MX2750, Microsoft Comfort Curve Keyboard 2000, Microsoft Internet Keyboard, Microsoft Internet Keyboard Pro\, Swedish, Microsoft Natural, Microsoft Natural Keyboard Elite, Microsoft Natural Keyboard Pro / Microsoft Internet Keyboard Pro, Microsoft Natural Keyboard Pro OEM, Microsoft Natural Keyboard Pro USB / Microsoft Internet Keyboard Pro, Microsoft Natural Wireless Ergonomic Keyboard 4000, Microsoft Natural Wireless Ergonomic Keyboard 7000, Microsoft Office Keyboard, Microsoft Wireless Multimedia Keyboard 1.0A, Northgate OmniKey 101, OLPC, Ortek MCK-800 MM/Internet keyboard, PC-98xx Series, Propeller Voyager (KTEZ-1000), QTronix Scorpius 98N+, SILVERCREST Multimedia Wireless Keyboard, SK-1300, SK-2500, SK-6200, SK-7100, SVEN Ergonomic 2500, SVEN Slim 303, Samsung SDM 4500P, Samsung SDM 4510P, Sanwa Supply SKB-KG3, Sun Type 4, Sun Type 5, Sun Type 6 (Japanese layout), Sun Type 6 USB (Japanese layout), Sun Type 6 USB (Unix layout), Sun Type 6/7 USB, Sun Type 6/7 USB (European layout), Sun Type 7 USB, Sun Type 7 USB (European layout), Sun Type 7 USB (Japanese layout) / Japanese 106-key, Sun Type 7 USB (Unix layout), Super Power Multimedia Keyboard, Symplon PaceBook (tablet PC), Targa Visionary 811, Toshiba Satellite S3000, Trust Direct Access Keyboard, Trust Slimline, Trust Wireless Keyboard Classic, TypeMatrix EZ-Reach 2020, TypeMatrix EZ-Reach 2030 PS2, TypeMatrix EZ-Reach 2030 USB, TypeMatrix EZ-Reach 2030 USB (102/105:EU mode), TypeMatrix EZ-Reach 2030 USB (106:JP mode), Unitek KB-1925, ViewSonic KU-306 Internet Keyboard, Winbook Model XP5, Yahoo! Internet Keyboard 15 | keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC 16 | # Keymap to use: 17 | # Choices: American English, Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Burmese, Canadian French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, Philippines, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, Tajik, Tamil, Telugu, Thai, Tibetan, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, Vietnamese 18 | keyboard-configuration keyboard-configuration/xkb-keymap select ${KEYBOARD_KEYMAP} 19 | # Compose key: 20 | # Choices: No compose key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Logo key, Caps Lock 21 | keyboard-configuration keyboard-configuration/compose select No compose key 22 | # Use Control+Alt+Backspace to terminate the X server? 23 | keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true 24 | # Keyboard layout: 25 | # Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other 26 | keyboard-configuration keyboard-configuration/variant select ${KEYBOARD_LAYOUT} 27 | # for internal use 28 | keyboard-configuration keyboard-configuration/optionscode string PLACEHOLDER 29 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | ssh less fbset sudo psmisc strace ed ncdu 2 | console-setup keyboard-configuration debconf-utils parted 3 | build-essential manpages-dev bash-completion gdb pkg-config 4 | python-is-python3 5 | v4l-utils 6 | gpiod python3-libgpiod 7 | python3-gpiozero 8 | pigpio python3-pigpio raspi-gpio python3-rpi-lgpio 9 | python3-spidev 10 | python3-smbus2 11 | avahi-daemon 12 | lua5.1 13 | luajit 14 | ca-certificates curl 15 | fake-hwclock nfs-common usbutils 16 | dosfstools 17 | dphys-swapfile 18 | raspberrypi-sys-mods 19 | pi-bluetooth 20 | apt-listchanges 21 | usb-modeswitch 22 | libpam-chksshpwd 23 | rpi-update 24 | libmtp-runtime 25 | rsync 26 | htop 27 | man-db 28 | policykit-1 29 | ssh-import-id 30 | ethtool 31 | ntfs-3g 32 | pciutils 33 | rpi-eeprom 34 | raspi-utils 35 | udisks2 36 | unzip zip p7zip-full 37 | file 38 | kms++-utils 39 | python3-venv 40 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-packages-nr: -------------------------------------------------------------------------------- 1 | cifs-utils 2 | rpicam-apps-lite 3 | mkvtoolnix 4 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/01-useradd.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/default/useradd 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/default/useradd 4 | +++ jessie-stage2/rootfs/etc/default/useradd 5 | @@ -5,7 +5,7 @@ 6 | # Similar to DHSELL in adduser. However, we use "sh" here because 7 | # useradd is a low level utility and should be as general 8 | # as possible 9 | -SHELL=/bin/sh 10 | +SHELL=/bin/bash 11 | # 12 | # The default group for users 13 | # 100=users on Debian systems 14 | @@ -29,7 +29,7 @@ SHELL=/bin/sh 15 | # The SKEL variable specifies the directory containing "skeletal" user 16 | # files; in other words, files such as a sample .profile that will be 17 | # copied to the new user's home directory when it is created. 18 | -# SKEL=/etc/skel 19 | +SKEL=/etc/skel 20 | # 21 | # Defines whether the mail spool should be created while 22 | # creating the account 23 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/02-swap.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/dphys-swapfile 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/dphys-swapfile 4 | +++ jessie-stage2/rootfs/etc/dphys-swapfile 5 | @@ -13,7 +13,7 @@ 6 | 7 | # set size to absolute value, leaving empty (default) then uses computed value 8 | # you most likely don't want this, unless you have an special disk situation 9 | -#CONF_SWAPSIZE= 10 | +CONF_SWAPSIZE=512 11 | 12 | # set size to computed value, this times RAM size, dynamically adapts, 13 | # guarantees that there is enough swap without wasting disk space on excess 14 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/04-inputrc.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/inputrc 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/inputrc 4 | +++ jessie-stage2/rootfs/etc/inputrc 5 | @@ -65,3 +65,7 @@ $endif 6 | # "\e[F": end-of-line 7 | 8 | $endif 9 | + 10 | +# mappings for up and down arrows search history 11 | +# "\e[B": history-search-forward 12 | +# "\e[A": history-search-backward 13 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/05-path.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/login.defs 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/login.defs 4 | +++ jessie-stage2/rootfs/etc/login.defs 5 | @@ -100,7 +100,7 @@ HUSHLOGIN_FILE .hushlogin 6 | # 7 | # (they are minimal, add the rest in the shell startup files) 8 | ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 10 | +ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games 11 | 12 | # 13 | # Terminal permissions 14 | Index: jessie-stage2/rootfs/etc/profile 15 | =================================================================== 16 | --- jessie-stage2.orig/rootfs/etc/profile 17 | +++ jessie-stage2/rootfs/etc/profile 18 | @@ -4,7 +4,7 @@ 19 | if [ "`id -u`" -eq 0 ]; then 20 | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 21 | else 22 | - PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" 23 | + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games" 24 | fi 25 | export PATH 26 | 27 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/07-resize-init.diff: -------------------------------------------------------------------------------- 1 | --- stage2.orig/rootfs/boot/firmware/cmdline.txt 2 | +++ stage2/rootfs/boot/firmware/cmdline.txt 3 | @@ -1 +1 @@ 4 | -console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait 5 | +console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspberrypi-sys-mods/firstboot 6 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/series: -------------------------------------------------------------------------------- 1 | 01-useradd.diff 2 | 02-swap.diff 3 | 04-inputrc.diff 4 | 05-path.diff 5 | 07-resize-init.diff 6 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" 4 | 5 | install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" 6 | 7 | install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/" 8 | 9 | if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then 10 | install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh 11 | echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 12 | chown 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 13 | chmod 0600 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 14 | fi 15 | 16 | if [ "${PUBKEY_ONLY_SSH}" = "1" ]; then 17 | sed -i -Ee 's/^#?[[:blank:]]*PubkeyAuthentication[[:blank:]]*no[[:blank:]]*$/PubkeyAuthentication yes/ 18 | s/^#?[[:blank:]]*PasswordAuthentication[[:blank:]]*yes[[:blank:]]*$/PasswordAuthentication no/' "${ROOTFS_DIR}"/etc/ssh/sshd_config 19 | fi 20 | 21 | on_chroot << EOF 22 | systemctl disable hwclock.sh 23 | systemctl disable nfs-common 24 | systemctl disable rpcbind 25 | if [ "${ENABLE_SSH}" == "1" ]; then 26 | systemctl enable ssh 27 | else 28 | systemctl disable ssh 29 | fi 30 | systemctl enable regenerate_ssh_host_keys 31 | EOF 32 | 33 | if [ "${USE_QEMU}" = "1" ]; then 34 | echo "enter QEMU mode" 35 | install -m 644 files/90-qemu.rules "${ROOTFS_DIR}/etc/udev/rules.d/" 36 | on_chroot << EOF 37 | systemctl disable resize2fs_once 38 | EOF 39 | echo "leaving QEMU mode" 40 | else 41 | on_chroot << EOF 42 | systemctl enable resize2fs_once 43 | EOF 44 | fi 45 | 46 | on_chroot <&2 23 | exit 3 24 | ;; 25 | esac 26 | -------------------------------------------------------------------------------- /stage2/02-net-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-realtek firmware-mediatek firmware-marvell-prestera- 2 | raspberrypi-net-mods 3 | network-manager 4 | net-tools 5 | -------------------------------------------------------------------------------- /stage2/02-net-tweaks/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # Newer versions of raspberrypi-sys-mods set rfkill.default_state=0 to prevent 4 | # radiating on 5GHz bands until the WLAN regulatory domain is set. 5 | # Unfortunately, this also blocks bluetooth, so we whitelist the known 6 | # on-board BT adapters here. 7 | 8 | mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" 9 | # 5 miniuart 4 miniuart Zero miniuart other other 10 | for addr in 107d50c000.serial 3f215040.serial 20215040.serial fe215040.serial soc; do 11 | echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-${addr}:bluetooth" 12 | done 13 | 14 | if [ -v WPA_COUNTRY ]; then 15 | on_chroot <<- EOF 16 | SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}" 17 | EOF 18 | elif [ -d "${ROOTFS_DIR}/var/lib/NetworkManager" ]; then 19 | # NetworkManager unblocks all WLAN devices by default. Prevent that: 20 | cat > "${ROOTFS_DIR}/var/lib/NetworkManager/NetworkManager.state" <<- EOF 21 | [main] 22 | WirelessEnabled=false 23 | EOF 24 | fi 25 | -------------------------------------------------------------------------------- /stage2/03-accept-mathematica-eula/00-debconf: -------------------------------------------------------------------------------- 1 | # Do you accept the Wolfram - Raspberry Pi® Bundle License Agreement? 2 | wolfram-engine shared/accepted-wolfram-eula boolean true 3 | -------------------------------------------------------------------------------- /stage2/03-set-timezone/02-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | echo "${TIMEZONE_DEFAULT}" > "${ROOTFS_DIR}/etc/timezone" 4 | rm "${ROOTFS_DIR}/etc/localtime" 5 | 6 | on_chroot << EOF 7 | dpkg-reconfigure -f noninteractive tzdata 8 | EOF 9 | -------------------------------------------------------------------------------- /stage2/EXPORT_IMAGE: -------------------------------------------------------------------------------- 1 | IMG_SUFFIX="-lite" 2 | if [ "${USE_QEMU}" = "1" ]; then 3 | export IMG_SUFFIX="${IMG_SUFFIX}-qemu" 4 | fi 5 | -------------------------------------------------------------------------------- /stage2/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage3/00-install-packages/00-packages: -------------------------------------------------------------------------------- 1 | gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav 2 | evince gtk2-engines alsa-utils 3 | desktop-base 4 | git 5 | policykit-1 6 | gvfs 7 | rfkill 8 | chromium rpi-chromium-mods libwidevinecdm0 9 | firefox rpi-firefox-mods 10 | gldriver-test 11 | fonts-droid-fallback 12 | fonts-liberation2 13 | obconf 14 | raindrop 15 | libcamera-tools 16 | rpicam-apps 17 | python3-picamera2 18 | python3-pyqt5 19 | python3-opengl 20 | vulkan-tools mesa-vulkan-drivers 21 | -------------------------------------------------------------------------------- /stage3/00-install-packages/00-packages-nr: -------------------------------------------------------------------------------- 1 | xserver-xorg-video-fbdev xserver-xorg xinit 2 | mousepad 3 | eom 4 | lxde lxtask menu-xdg 5 | zenity xdg-utils 6 | gvfs-backends gvfs-fuse 7 | lightdm gnome-themes-extra-data gnome-icon-theme 8 | gnome-keyring 9 | -------------------------------------------------------------------------------- /stage3/00-install-packages/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | on_chroot <<- EOF 4 | apt-mark auto python3-pyqt5 python3-opengl 5 | EOF 6 | -------------------------------------------------------------------------------- /stage3/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage4/00-install-packages/00-debconf: -------------------------------------------------------------------------------- 1 | # Enable realtime process priority? 2 | jackd2 jackd/tweak_rt_limits boolean true 3 | -------------------------------------------------------------------------------- /stage4/00-install-packages/00-packages: -------------------------------------------------------------------------------- 1 | python3-pygame 2 | python3-tk thonny 3 | python3-pgzero 4 | python3-serial 5 | debian-reference-en dillo 6 | raspberrypi-net-mods raspberrypi-ui-mods 7 | python3-pip 8 | python3-numpy 9 | alacarte rc-gui sense-hat 10 | tree 11 | libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr 12 | geany 13 | piclone 14 | python3-twython 15 | python3-flask 16 | pprompt 17 | piwiz 18 | rp-prefapps 19 | ffmpeg 20 | vlc 21 | rpi-connect 22 | rpi-imager 23 | labwc 24 | squeekboard 25 | 26 | # ninja-build and openocd needed for vscode pico extension 27 | meson openocd 28 | -------------------------------------------------------------------------------- /stage4/00-install-packages/00-packages-nr: -------------------------------------------------------------------------------- 1 | pi-package 2 | realvnc-vnc-server 3 | -------------------------------------------------------------------------------- /stage4/00-install-packages/02-packages: -------------------------------------------------------------------------------- 1 | hunspell-en-gb 2 | hyphen-en-gb 3 | wamerican 4 | wbritish 5 | -------------------------------------------------------------------------------- /stage4/01-console-autologin/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | on_chroot << EOF 4 | SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4 5 | EOF 6 | -------------------------------------------------------------------------------- /stage4/02-extras/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | #Alacarte fixes 4 | install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local" 5 | install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share" 6 | install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/applications" 7 | install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/desktop-directories" 8 | -------------------------------------------------------------------------------- /stage4/03-bookshelf/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | BOOKSHELF_URL="https://magpi.raspberrypi.com/bookshelf.xml" 4 | GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/Raspberry Pi Beginner's Guide .*<\/TITLE>/ {f=1; next} f==1 && /PDF/ {print \$3; exit}")" 5 | OUTPUT="$(basename "$GUIDE_URL" | cut -f1 -d'?')" 6 | 7 | if [ ! -f "files/$OUTPUT" ]; then 8 | rm files/*.pdf -f 9 | curl -s "$GUIDE_URL" -o "files/$OUTPUT" 10 | fi 11 | 12 | file "files/$OUTPUT" | grep -q "PDF document" 13 | 14 | install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf" 15 | install -v -o 1000 -g 1000 -m 644 "files/$OUTPUT" "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf/" 16 | -------------------------------------------------------------------------------- /stage4/03-bookshelf/files/.gitignore: -------------------------------------------------------------------------------- 1 | *.pdf 2 | -------------------------------------------------------------------------------- /stage4/04-enable-xcompmgr/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | on_chroot << EOF 4 | raspi-config nonint do_xcompmgr 0 5 | EOF 6 | -------------------------------------------------------------------------------- /stage4/05-print-support/00-packages: -------------------------------------------------------------------------------- 1 | cups 2 | -------------------------------------------------------------------------------- /stage4/05-print-support/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | on_chroot <<EOF 4 | adduser "$FIRST_USER_NAME" lpadmin 5 | EOF 6 | -------------------------------------------------------------------------------- /stage4/06-enable-wayland/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | on_chroot << EOF 4 | SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W3 5 | EOF 6 | -------------------------------------------------------------------------------- /stage4/EXPORT_IMAGE: -------------------------------------------------------------------------------- 1 | IMG_SUFFIX="" 2 | if [ "${USE_QEMU}" = "1" ]; then 3 | export IMG_SUFFIX="${IMG_SUFFIX}-qemu" 4 | fi 5 | -------------------------------------------------------------------------------- /stage4/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage5/00-install-extras/00-packages: -------------------------------------------------------------------------------- 1 | mu-editor 2 | scratch nuscratch scratch3 3 | wolfram-engine 4 | claws-mail 5 | realvnc-vnc-viewer 6 | code-the-classics code-the-classics-2 7 | kicad 8 | -------------------------------------------------------------------------------- /stage5/00-install-libreoffice/00-packages: -------------------------------------------------------------------------------- 1 | libreoffice-pi openjdk-11-jre- 2 | libreoffice-help-en-gb 3 | libreoffice-l10n-en-gb 4 | -------------------------------------------------------------------------------- /stage5/EXPORT_IMAGE: -------------------------------------------------------------------------------- 1 | IMG_SUFFIX="-full" 2 | if [ "${USE_QEMU}" = "1" ]; then 3 | export IMG_SUFFIX="${IMG_SUFFIX}-qemu" 4 | fi 5 | -------------------------------------------------------------------------------- /stage5/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | --------------------------------------------------------------------------------