From a8596e0d894315396d62d3546ce96cd1e7ceaf75 Mon Sep 17 00:00:00 2001 From: Josh Ackley Date: Tue, 5 Oct 2021 04:56:04 -0700 Subject: [PATCH 1/8] Use sync mode when running 'kpartx -a' --- scripts/qcow2_handling | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qcow2_handling b/scripts/qcow2_handling index f722937..6b2a56b 100644 --- a/scripts/qcow2_handling +++ b/scripts/qcow2_handling @@ -36,7 +36,7 @@ connect_blkdev() { init_nbd qemu-nbd --discard=unmap -c $NBD_DEV "$1" sync - kpartx -a $NBD_DEV + kpartx -as $NBD_DEV sync CURRENT_IMAGE="$1" } @@ -108,7 +108,7 @@ load_qimage() { 254MiB,,83; EOF sync - kpartx -a $NBD_DEV + kpartx -as $NBD_DEV mkdosfs -n boot -F 32 -v $MAP_BOOT_DEV mkfs.ext4 -L rootfs -O "^huge_file,^metadata_csum,^64bit" $MAP_ROOT_DEV sync @@ -123,7 +123,7 @@ EOF sync qemu-nbd --discard=unmap -c $NBD_DEV image-${STAGE}.qcow2 sync - kpartx -a $NBD_DEV + kpartx -as $NBD_DEV fi mount -v -t ext4 $MAP_ROOT_DEV "${ROOTFS_DIR}" From d9b4a4a985fe5a015c0a774c9c75f21a2491c0c3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 4 Oct 2021 15:40:35 +0100 Subject: [PATCH 2/8] Switch to bullseye --- Dockerfile | 2 +- README.md | 2 +- build-docker.sh | 4 +-- build.sh | 2 +- stage2/01-sys-tweaks/00-packages | 6 ++-- stage3/00-install-packages/00-packages | 1 - stage4/00-install-packages/00-packages | 20 ++++++------ stage4/00-install-packages/01-packages | 44 +++++++++++++------------- stage5/00-install-extras/00-packages | 4 +-- 9 files changed, 40 insertions(+), 45 deletions(-) diff --git a/Dockerfile b/Dockerfile index 837e430..e7fc561 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=debian:buster +ARG BASE_IMAGE=debian:bullseye FROM ${BASE_IMAGE} ENV DEBIAN_FRONTEND noninteractive diff --git a/README.md b/README.md index 62938e9..b4b40bd 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The following environment variables are supported: that the network block device is not disconnected correctly after the Docker process has ended abnormally. In that case see [Disconnect an image if something went wrong](#Disconnect-an-image-if-something-went-wrong) -* `RELEASE` (Default: buster) +* `RELEASE` (Default: bullseye) The release version to build images against. Valid values are jessie, stretch buster, bullseye, and testing. diff --git a/build-docker.sh b/build-docker.sh index 01fd517..85200e4 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -78,10 +78,10 @@ BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" # Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead case "$(uname -m)" in x86_64|aarch64) - BASE_IMAGE=i386/debian:buster + BASE_IMAGE=i386/debian:bullseye ;; *) - BASE_IMAGE=debian:buster + BASE_IMAGE=debian:bullseye ;; esac ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" diff --git a/build.sh b/build.sh index f70c6fb..423d62e 100755 --- a/build.sh +++ b/build.sh @@ -207,7 +207,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry} -export RELEASE=${RELEASE:-buster} +export RELEASE=${RELEASE:-bullseye} export WPA_ESSID export WPA_PASSWORD export WPA_COUNTRY diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index a1f4b59..4af7c43 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -1,8 +1,7 @@ ssh less fbset sudo psmisc strace ed ncdu crda console-setup keyboard-configuration debconf-utils parted unzip -build-essential manpages-dev python bash-completion gdb pkg-config -python-rpi.gpio v4l-utils -python-gpiozero +build-essential manpages-dev python3 bash-completion gdb pkg-config +python3-rpi.gpio v4l-utils python3-gpiozero avahi-daemon lua5.1 @@ -26,7 +25,6 @@ policykit-1 ssh-import-id rng-tools ethtool -vl805fw ntfs-3g pciutils rpi-eeprom diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index eac74ea..460aedd 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -3,7 +3,6 @@ qpdfview gtk2-engines alsa-utils desktop-base git omxplayer -raspberrypi-artwork policykit-1 gvfs rfkill diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 85a9f80..e76d411 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -1,11 +1,11 @@ -python python3-pygame python-pygame python-tk -python3 python3-tk thonny +python3-pygame +python3-tk thonny python3-pgzero -python-serial python3-serial -python-picamera python3-picamera +python3-serial +python3-picamera debian-reference-en dillo raspberrypi-net-mods raspberrypi-ui-mods -python-pip python3-pip +python3-pip python3-numpy pypy alacarte rc-gui sense-hat @@ -13,11 +13,11 @@ tree libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr geany piclone -wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python3-rpi.gpio -python-spidev python3-spidev -python-twython python3-twython -python-smbus python3-smbus -python-flask python3-flask +pigpio python3-pigpio raspi-gpio python3-rpi.gpio +python3-spidev +python3-twython +python3-smbus +python3-flask pprompt piwiz rp-prefapps diff --git a/stage4/00-install-packages/01-packages b/stage4/00-install-packages/01-packages index fdf5e73..5441d9d 100644 --- a/stage4/00-install-packages/01-packages +++ b/stage4/00-install-packages/01-packages @@ -1,22 +1,22 @@ -python-automationhat python3-automationhat -python-blinkt python3-blinkt -python-cap1xxx python3-cap1xxx -python-drumhat python3-drumhat -python-envirophat python3-envirophat -python-explorerhat python3-explorerhat -python-fourletterphat python3-fourletterphat -python-microdotphat python3-microdotphat -python-mote python3-mote -python-motephat python3-motephat -python-phatbeat python3-phatbeat -python-pianohat python3-pianohat -python-piglow python3-piglow -python-rainbowhat python3-rainbowhat -python-scrollphat python3-scrollphat -python-scrollphathd python3-scrollphathd -python-sn3218 python3-sn3218 -python-skywriter python3-skywriter -python-touchphat python3-touchphat -python-buttonshim python3-buttonshim -python-unicornhathd python3-unicornhathd -python-pantilthat python3-pantilthat +python3-automationhat +python3-blinkt +python3-cap1xxx +python3-drumhat +python3-envirophat +python3-explorerhat +python3-fourletterphat +python3-microdotphat +python3-mote +python3-motephat +python3-phatbeat +python3-pianohat +python3-piglow +python3-rainbowhat +python3-scrollphat +python3-scrollphathd +python3-sn3218 +python3-skywriter +python3-touchphat +python3-buttonshim +python3-unicornhathd +python3-pantilthat diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 38c5c8d..1b9d488 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -3,8 +3,7 @@ sonic-pi scratch nuscratch scratch3 smartsim -minecraft-pi python-minecraftpi python-picraft python3-picraft -python-sense-emu sense-emu-tools python-sense-emu-doc +python3-sense-emu sense-emu-tools python-sense-emu-doc wolfram-engine claws-mail @@ -12,5 +11,4 @@ greenfoot-unbundled bluej nodered realvnc-vnc-viewer -python-games code-the-classics From b23d0b144df1aeb87814b7ea84f27eaa30392955 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:22:16 +0100 Subject: [PATCH 3/8] Use raspi-config to disable predictable network interface names --- stage1/01-sys-tweaks/00-packages | 1 + stage1/02-net-tweaks/00-run.sh | 4 +++- stage1/03-install-packages/00-packages | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 stage1/01-sys-tweaks/00-packages diff --git a/stage1/01-sys-tweaks/00-packages b/stage1/01-sys-tweaks/00-packages new file mode 100644 index 0000000..9e91ea1 --- /dev/null +++ b/stage1/01-sys-tweaks/00-packages @@ -0,0 +1 @@ +raspi-config diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh index 4943cab..95dfbdc 100755 --- a/stage1/02-net-tweaks/00-run.sh +++ b/stage1/02-net-tweaks/00-run.sh @@ -3,4 +3,6 @@ echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts" -ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link" +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1 +EOF diff --git a/stage1/03-install-packages/00-packages b/stage1/03-install-packages/00-packages index e8c148c..73edcc9 100644 --- a/stage1/03-install-packages/00-packages +++ b/stage1/03-install-packages/00-packages @@ -1 +1 @@ -libraspberrypi-bin libraspberrypi0 raspi-config +libraspberrypi-bin libraspberrypi0 From 7c45f4e11f882495856abee521b3624cc5e1e004 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:25:17 +0100 Subject: [PATCH 4/8] stage3: install libcamera-tools and libcamera-apps --- stage3/00-install-packages/00-packages | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index 460aedd..25d2542 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -12,3 +12,5 @@ fonts-droid-fallback fonts-liberation2 obconf arandr +libcamera-tools +libcamera-apps From 456aa2e50b08ff71e96e139aafcb6f52f57b729f Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:26:16 +0100 Subject: [PATCH 5/8] bootstrap: do not install the info package --- scripts/common | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/common b/scripts/common index 300d30b..5b0df12 100644 --- a/scripts/common +++ b/scripts/common @@ -16,6 +16,7 @@ bootstrap(){ BOOTSTRAP_ARGS+=(--arch armhf) BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") + BOOTSTRAP_ARGS+=(--exclude=info) BOOTSTRAP_ARGS+=("$@") printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" From d0eed3b76f0983dea8e9333007dd5e46caf3ba1e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:51:43 +0100 Subject: [PATCH 6/8] Update config.txt Disable overscan Enable camera_auto_detect Switch all models to KMS Enable arm_boost on pi 4 Enable host mode on built-in USB controller on CM4 --- stage1/00-boot-files/files/config.txt | 28 +++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/stage1/00-boot-files/files/config.txt b/stage1/00-boot-files/files/config.txt index 548f4ac..0e8f1b0 100644 --- a/stage1/00-boot-files/files/config.txt +++ b/stage1/00-boot-files/files/config.txt @@ -5,10 +5,6 @@ # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 -# uncomment this if your display has a black border of unused pixels visible -# and your display can output without overscan -#disable_overscan=1 - # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 @@ -56,10 +52,26 @@ # Enable audio (loads snd_bcm2835) dtparam=audio=on -[pi4] -# Enable DRM VC4 V3D driver on top of the dispmanx display stack -dtoverlay=vc4-fkms-v3d +# Automatically load overlays for detected cameras +camera_auto_detect=1 + +# Enable DRM VC4 V3D driver +dtoverlay=vc4-kms-v3d max_framebuffers=2 +# Disable compensation for displays with overscan +disable_overscan=1 + +[cm4] +# Enable host mode on the 2711 built-in XHCI USB controller. +# This line should be removed if the legacy DWC2 controller is required +# (e.g. for USB device mode) or if USB support is not required. +otg_mode=1 + +[all] + +[pi4] +# Run as fast as firmware / board allows +arm_boost=1 + [all] -#dtoverlay=vc4-fkms-v3d From ac246e300bdd55005ab811bcd817f1221b328fd7 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:54:05 +0100 Subject: [PATCH 7/8] Use raspi-config to toggle boot_wait --- stage2/02-net-tweaks/01-run.sh | 7 ++++--- stage2/02-net-tweaks/files/wait.conf | 3 --- stage3/01-tweaks/00-run.sh | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 stage2/02-net-tweaks/files/wait.conf diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh index d82381b..837e861 100755 --- a/stage2/02-net-tweaks/01-run.sh +++ b/stage2/02-net-tweaks/01-run.sh @@ -1,11 +1,12 @@ #!/bin/bash -e -install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d" -install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/" - install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant" install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/" +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 0 +EOF + if [ -v WPA_COUNTRY ]; then echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" fi diff --git a/stage2/02-net-tweaks/files/wait.conf b/stage2/02-net-tweaks/files/wait.conf deleted file mode 100644 index 595cc2d..0000000 --- a/stage2/02-net-tweaks/files/wait.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ExecStart= -ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w diff --git a/stage3/01-tweaks/00-run.sh b/stage3/01-tweaks/00-run.sh index 5da7c1a..79b749e 100755 --- a/stage3/01-tweaks/00-run.sh +++ b/stage3/01-tweaks/00-run.sh @@ -1,3 +1,5 @@ #!/bin/bash -e -rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf" +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1 +EOF From 5a4b7ec0679dc85efc5abfa65a9a33a3e3cb1273 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 5 Oct 2021 15:54:27 +0100 Subject: [PATCH 8/8] Update release notes --- .../00-release/files/release_notes.txt | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index 6e9db37..d883488 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,4 +1,52 @@ UNRELEASED: + * Based on Debian version 11 (bullseye) + * Desktop components (lxpanel and all plugins, libfm, pcmanfm) now built against GTK+3 + * Applications (piwiz, pipanel, rc_gui, lxinput) now built against GTK+3 + * PiXflat GTK+3 theme updated with numerous changes to support the above + * GTK+3 : toolbar icon size setting added + * GTK+3 : ability to request client-side decoration on windows added + * GTK+3 : setting for indent for frame labels in custom style added + * mutter window manager used instead of openbox on devices with 2GB or more of RAM + * mutter : title bar icon behaviour and appearance modified to match openbox + * mutter : additional keyboard shortcuts added + * mutter : various performance enhancements + * mutter compatibility added to screen magnifier + * Numerous changes to Appearance Settings application to support GTK+3 and mutter + * Updater plugin added to lxpanel to detect and install software updates + * File manager view options simplified to either list or icons, with separate menu option for thumbnails + * New file manager toolbar icons + * KMS used as default display driver + * Modifications to HDMI audio output selection to support the above + * xcompmgr enabled when openbox is running under KMS + * New default camera subsystem based on libcamera + * New camera demo applications (libcamera-still and libcamera-vid) have replaced raspistill and raspivid + * Legacy camera subsystem removed from 64-bit RPi OS (still available on 32-bit) + * Chromium upgraded to version 92.0.4515.98 + * VLC media player upgraded to version 3.0.16 + * Spurious drive removal warning after use of SD card copier removed + * Bookshelf application now includes Custom PC magazine + * Various translation updates - Italian, Korean, Polish, German, Armenian + * Startup wizard now installs Japanese fonts if needed + * Progress and information dialog boxes for lxpanel plugins now common to lxpanel, rather than in individual plugins + * Icon handling code for lxpanel plugins now common to lxpanel + * Package with 4K version of Raspberry Pi wallpaper added to Recommended Software + * Python Games and Minecraft removed from Recommended Software - neither is compatible with bullseye + * Bluetooth pairing and connection dialogs updated for compatibility with more devices + * Bluetooth devices always disconnected before removal to speed up removal process + * Bluetooth pairing dialog now only shows devices which offer services which are usable by Pi + * Separate Bluetooth unpair dialog removed - unpair now an option for each individual device + * Bug fix - mutter : header bar colours not updating when theme is changed + * Bug fix - GTK+3 : tooltips being displayed incorrectly at bottom of screen + * Bug fix - lxpanel : crash when using keyboard shortcut to enable magnifier when magnifier not installed + * Bug fix - lxpanel : lockup in Bluetooth plugin when connecting to certain devices + * Bug fix - lxpanel : discoverable mode icon could get out of sync with underlying Bluetooth system state + * Bug fix - piwiz : missing cities in timezone list + * Bug fix - piwiz : country-specific language packages not being installed + * Bug fix - bookshelf : now waits for longer between packets before timing out + * Bug fix - accented characters now displayed correctly in localisation dialogs + * Raspberry Pi firmware 46f356dcecc5204ca9a8cef7e6894e083b231bc7 + * Linux kernel 5.10.60 +2021-05-07: * Chromium upgraded to version 88.0.4324.187 * NuScratch upgraded to version 20210507 * Node-RED upgraded to version 1.3.4