From ed68013abbe46c0f665a157a9bdfd06603811101 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Mon, 25 Sep 2023 15:59:25 +0200 Subject: [PATCH 01/22] fix: support bash v3 by removing array usage (#705) --- build-docker.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/build-docker.sh b/build-docker.sh index 4fdd89c..3445a40 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,6 +1,8 @@ -#!/bin/bash -eu +#!/usr/bin/env bash +# Note: Avoid usage of arrays as MacOS users have an older version of bash (v3.x) which does not supports arrays +set -eu -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)" BUILD_OPTS="$*" @@ -93,18 +95,12 @@ ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" if [ "${CONTAINER_EXISTS}" != "" ]; then DOCKER_CMDLINE_NAME="${CONTAINER_NAME}_cont" - DOCKER_CMDLINE_PRE=( \ - --rm \ - ) - DOCKER_CMDLINE_POST=( \ - --volumes-from="${CONTAINER_NAME}" \ - ) + DOCKER_CMDLINE_PRE="--rm" + DOCKER_CMDLINE_POST="--volumes-from=\"${CONTAINER_NAME}\"" else DOCKER_CMDLINE_NAME="${CONTAINER_NAME}" - DOCKER_CMDLINE_PRE=( \ - ) - DOCKER_CMDLINE_POST=( \ - ) + DOCKER_CMDLINE_PRE="" + DOCKER_CMDLINE_POST="" fi # Check if binfmt_misc is required @@ -145,7 +141,7 @@ fi trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM time ${DOCKER} run \ - "${DOCKER_CMDLINE_PRE[@]}" \ + $DOCKER_CMDLINE_PRE \ --name "${DOCKER_CMDLINE_NAME}" \ --privileged \ --cap-add=ALL \ @@ -154,7 +150,7 @@ time ${DOCKER} run \ ${PIGEN_DOCKER_OPTS} \ --volume "${CONFIG_FILE}":/config:ro \ -e "GIT_HASH=${GIT_HASH}" \ - "${DOCKER_CMDLINE_POST[@]}" \ + $DOCKER_CMDLINE_POST \ pi-gen \ bash -e -o pipefail -c " dpkg-reconfigure qemu-user-static && From 6aca615037355f3f0e51f984d196989167424e50 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 12:50:34 +0100 Subject: [PATCH 02/22] Switch to Bookworm --- build.sh | 2 +- stage0/prerun.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 986f81c..ca0fb57 100755 --- a/build.sh +++ b/build.sh @@ -226,7 +226,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_PASS export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0} -export RELEASE=${RELEASE:-bullseye} # Don't forget to update stage0/prerun.sh +export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh export WPA_ESSID export WPA_PASSWORD export WPA_COUNTRY diff --git a/stage0/prerun.sh b/stage0/prerun.sh index 024d369..c8e51a4 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -if [ "$RELEASE" != "bullseye" ]; then +if [ "$RELEASE" != "bookworm" ]; then echo "WARNING: RELEASE does not match the intended option for this branch." echo " Please check the relevant README.md section." fi From 9d9d0637909a506c82cb76cea90a94a958b1732c Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 12:59:39 +0100 Subject: [PATCH 03/22] Remove/replace obsolete packages --- stage2/01-sys-tweaks/00-packages | 6 +++--- stage3/00-install-packages/00-packages-nr | 2 +- stage4/00-install-packages/00-packages | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 6138c6d..86bdd9d 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -1,4 +1,4 @@ -ssh less fbset sudo psmisc strace ed ncdu crda +ssh less fbset sudo psmisc strace ed ncdu console-setup keyboard-configuration debconf-utils parted build-essential manpages-dev bash-completion gdb pkg-config python-is-python3 @@ -7,7 +7,7 @@ python3-gpiozero avahi-daemon lua5.1 luajit -hardlink ca-certificates curl +ca-certificates curl fake-hwclock nfs-common usbutils libraspberrypi-dev libraspberrypi-doc libfreetype6-dev dosfstools @@ -29,7 +29,7 @@ ethtool ntfs-3g pciutils rpi-eeprom -raspinfo +raspi-utils udisks2 unzip zip p7zip-full file diff --git a/stage3/00-install-packages/00-packages-nr b/stage3/00-install-packages/00-packages-nr index 75fa2a1..9113198 100644 --- a/stage3/00-install-packages/00-packages-nr +++ b/stage3/00-install-packages/00-packages-nr @@ -3,5 +3,5 @@ mousepad lxde lxtask menu-xdg zenity xdg-utils gvfs-backends gvfs-fuse -lightdm gnome-themes-standard-data gnome-icon-theme +lightdm gnome-themes-extra-data gnome-icon-theme gnome-keyring diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 7854596..bfb3f0d 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -2,12 +2,10 @@ python3-pygame python3-tk thonny python3-pgzero python3-serial -python3-picamera debian-reference-en dillo raspberrypi-net-mods raspberrypi-ui-mods python3-pip python3-numpy -pypy alacarte rc-gui sense-hat tree libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr @@ -24,4 +22,3 @@ rp-prefapps ffmpeg vlc rpi-imager -rpi-wayland From a524fe44ce88b54869cb6f83dffb403f45543a9e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:01:04 +0100 Subject: [PATCH 04/22] stage3: replace qpdfview with evince --- stage3/00-install-packages/00-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index d8a272f..a9e44e8 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -1,5 +1,5 @@ gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav -qpdfview gtk2-engines alsa-utils +evince gtk2-engines alsa-utils desktop-base git policykit-1 From 43c49d84d28bfafb05386ff53557d61dbbb48743 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:01:54 +0100 Subject: [PATCH 05/22] stage3: install eom --- stage3/00-install-packages/00-packages-nr | 1 + 1 file changed, 1 insertion(+) diff --git a/stage3/00-install-packages/00-packages-nr b/stage3/00-install-packages/00-packages-nr index 9113198..66f3004 100644 --- a/stage3/00-install-packages/00-packages-nr +++ b/stage3/00-install-packages/00-packages-nr @@ -1,5 +1,6 @@ xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo mousepad +eom lxde lxtask menu-xdg zenity xdg-utils gvfs-backends gvfs-fuse From 9fc1385eb7c666b0105e7eb9e6acc86a853a88df Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:02:50 +0100 Subject: [PATCH 06/22] stage3: install Firefox --- stage3/00-install-packages/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index a9e44e8..2d206cd 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -6,6 +6,7 @@ policykit-1 gvfs rfkill chromium-browser rpi-chromium-mods libwidevinecdm0 +firefox rpi-firefox-mods gldriver-test fonts-droid-fallback fonts-liberation2 From 8dd23cbc1d01b2a89f560c98f5e5b8ef2e71fbf3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:34:21 +0100 Subject: [PATCH 07/22] Remove dhcpcd and associated options --- README.md | 4 ++-- build.sh | 2 -- stage2/02-net-tweaks/00-packages | 1 - stage2/02-net-tweaks/01-run.sh | 20 -------------------- stage3/01-tweaks/00-run.sh | 5 ----- 5 files changed, 2 insertions(+), 30 deletions(-) delete mode 100755 stage3/01-tweaks/00-run.sh diff --git a/README.md b/README.md index d7beb1f..ea276ab 100644 --- a/README.md +++ b/README.md @@ -195,9 +195,9 @@ The following environment variables are supported: stays activated. `FIRST_USER_PASS` must be set for this to work. Please be aware of the implied security risk of defining a default username and password for your devices. - * `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset) + * `WPA_COUNTRY` (Default: unset) - If these are set, they are use to configure `wpa_supplicant.conf`, so that the Raspberry Pi can automatically connect to a wireless network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wireless network will be configured. If set, `WPA_PASSWORD` must be between 8 and 63 characters. `WPA_COUNTRY` is a 2-letter ISO/IEC 3166 country Code, i.e. `GB` + Sets the default WLAN regulatory domain and unblocks WLAN interfaces. This should be a 2-letter ISO/IEC 3166 country Code, i.e. `GB` * `ENABLE_SSH` (Default: `0`) diff --git a/build.sh b/build.sh index ca0fb57..22b605d 100755 --- a/build.sh +++ b/build.sh @@ -227,8 +227,6 @@ export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_PASS export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0} export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh -export WPA_ESSID -export WPA_PASSWORD export WPA_COUNTRY export ENABLE_SSH="${ENABLE_SSH:-0}" export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}" diff --git a/stage2/02-net-tweaks/00-packages b/stage2/02-net-tweaks/00-packages index f0125f6..d446837 100644 --- a/stage2/02-net-tweaks/00-packages +++ b/stage2/02-net-tweaks/00-packages @@ -1,5 +1,4 @@ wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek raspberrypi-net-mods -dhcpcd5 network-manager net-tools diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh index 3b06c05..d49bdeb 100755 --- a/stage2/02-net-tweaks/01-run.sh +++ b/stage2/02-net-tweaks/01-run.sh @@ -3,32 +3,12 @@ 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 - SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_netconf 1 -EOF - if [ -v WPA_COUNTRY ]; then on_chroot <<- EOF SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}" EOF fi -if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then -on_chroot <> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL - -network={ - ssid="${WPA_ESSID}" - key_mgmt=NONE -} -EOL -fi - # Disable wifi on 5GHz models if WPA_COUNTRY is not set mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" if [ -n "$WPA_COUNTRY" ]; then diff --git a/stage3/01-tweaks/00-run.sh b/stage3/01-tweaks/00-run.sh deleted file mode 100755 index 79b749e..0000000 --- a/stage3/01-tweaks/00-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -on_chroot << EOF - SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1 -EOF From 4a4a66ed3661a241558beda050b1bf4d6ce49128 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:40:09 +0100 Subject: [PATCH 08/22] export-image: auto-remove and purge packages on dist-upgrade --- export-image/02-set-sources/01-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-image/02-set-sources/01-run.sh b/export-image/02-set-sources/01-run.sh index 5f51209..6d50496 100755 --- a/export-image/02-set-sources/01-run.sh +++ b/export-image/02-set-sources/01-run.sh @@ -4,6 +4,6 @@ rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete on_chroot << EOF apt-get update -apt-get -y dist-upgrade +apt-get -y dist-upgrade --auto-remove --purge apt-get clean EOF From 88ac5235d62135806157183c466fdea202ce38f8 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 13:42:31 +0100 Subject: [PATCH 09/22] Enable Wayland by default --- stage4/06-enable-wayland/00-run.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 stage4/06-enable-wayland/00-run.sh diff --git a/stage4/06-enable-wayland/00-run.sh b/stage4/06-enable-wayland/00-run.sh new file mode 100755 index 0000000..bd8bbc3 --- /dev/null +++ b/stage4/06-enable-wayland/00-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W2 +EOF From c856800c72c8a58e17d7ee20295605d479b00dff Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 14:08:13 +0100 Subject: [PATCH 10/22] Switch to new kernel and firmware packages --- export-image/04-set-partuuid/00-run.sh | 3 +- export-image/05-finalise/01-run.sh | 5 +- export-image/prerun.sh | 12 ++-- stage0/00-configure-apt/00-run.sh | 1 + stage0/02-firmware/01-packages | 8 ++- stage0/02-firmware/02-run.sh | 3 + stage1/00-boot-files/00-run.sh | 17 ++++- stage1/00-boot-files/files/config.txt | 62 +++++-------------- stage1/01-sys-tweaks/files/fstab | 2 +- .../00-patches/07-resize-init.diff | 4 +- 10 files changed, 53 insertions(+), 64 deletions(-) create mode 100755 stage0/02-firmware/02-run.sh diff --git a/export-image/04-set-partuuid/00-run.sh b/export-image/04-set-partuuid/00-run.sh index 16e1b15..2694295 100755 --- a/export-image/04-set-partuuid/00-run.sh +++ b/export-image/04-set-partuuid/00-run.sh @@ -12,7 +12,6 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" - sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/cmdline.txt" - + sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/firmware/cmdline.txt" fi diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index c104366..eae7d6e 100755 --- a/export-image/05-finalise/01-run.sh +++ b/export-image/05-finalise/01-run.sh @@ -3,7 +3,10 @@ IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info" +sed -i 's/^update_initramfs=.*/update_initramfs=all/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" + on_chroot << EOF +update-initramfs -u if [ -x /etc/init.d/fake-hwclock ]; then /etc/init.d/fake-hwclock stop fi @@ -53,7 +56,7 @@ rm -f "${ROOTFS_DIR}/root/.vnc/private.key" rm -f "${ROOTFS_DIR}/etc/vnc/updateid" update_issue "$(basename "${EXPORT_DIR}")" -install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/issue.txt" +install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/firmware/issue.txt" cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 267bbe0..a5f94e9 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -10,8 +10,8 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then rm -rf "${ROOTFS_DIR}" mkdir -p "${ROOTFS_DIR}" - BOOT_SIZE="$((256 * 1024 * 1024))" - ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot --block-size=1 | cut -f 1) + BOOT_SIZE="$((512 * 1024 * 1024))" + ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) # All partition sizes and starts will be aligned to this size ALIGN="$((4 * 1024 * 1024))" @@ -59,9 +59,9 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4 - mkdir -p "${ROOTFS_DIR}/boot" - mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot" -t vfat + mkdir -p "${ROOTFS_DIR}/boot/firmware" + mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat - rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/" - rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/" "${ROOTFS_DIR}/boot/" + rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/" + rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/" fi diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index 6494a03..fa4f59f 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -15,6 +15,7 @@ fi cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/" on_chroot << EOF +dpkg --add-architecture arm64 apt-get update apt-get dist-upgrade -y EOF diff --git a/stage0/02-firmware/01-packages b/stage0/02-firmware/01-packages index b166aa8..150958a 100644 --- a/stage0/02-firmware/01-packages +++ b/stage0/02-firmware/01-packages @@ -1,2 +1,6 @@ -raspberrypi-bootloader -raspberrypi-kernel +initramfs-tools +raspi-firmware +linux-image-rpi-v6 +linux-image-rpi-v7 +linux-image-rpi-v7l +linux-image-rpi-v8 diff --git a/stage0/02-firmware/02-run.sh b/stage0/02-firmware/02-run.sh new file mode 100755 index 0000000..0b2bca9 --- /dev/null +++ b/stage0/02-firmware/02-run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +sed -i 's/^update_initramfs=.*/update_initramfs=no/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" diff --git a/stage1/00-boot-files/00-run.sh b/stage1/00-boot-files/00-run.sh index bc61397..ddb0f5b 100755 --- a/stage1/00-boot-files/00-run.sh +++ b/stage1/00-boot-files/00-run.sh @@ -1,4 +1,17 @@ #!/bin/bash -e -install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/" -install -m 644 files/config.txt "${ROOTFS_DIR}/boot/" +mkdir -p "${ROOTFS_DIR}/boot/firmware" + +if ! [ -L "${ROOTFS_DIR}/boot/overlays" ]; then + ln -s firmware/overlays "${ROOTFS_DIR}/boot/overlays" +fi + +install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/firmware/" +if ! [ -L "${ROOTFS_DIR}/boot/cmdline.txt" ]; then + ln -s firmware/cmdline.txt "${ROOTFS_DIR}/boot/cmdline.txt" +fi + +install -m 644 files/config.txt "${ROOTFS_DIR}/boot/firmware/" +if ! [ -L "${ROOTFS_DIR}/boot/config.txt" ]; then + ln -s firmware/config.txt "${ROOTFS_DIR}/boot/config.txt" +fi diff --git a/stage1/00-boot-files/files/config.txt b/stage1/00-boot-files/files/config.txt index 6e072cb..621637a 100644 --- a/stage1/00-boot-files/files/config.txt +++ b/stage1/00-boot-files/files/config.txt @@ -1,70 +1,41 @@ # For more options and information see -# http://rpf.io/configtxt +# http://rptl.io/configtxt # Some settings may impact device functionality. See link above for details -# uncomment if you get no picture on HDMI for a default "safe" mode -#hdmi_safe=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 -#overscan_right=16 -#overscan_top=16 -#overscan_bottom=16 - -# uncomment to force a console size. By default it will be display's size minus -# overscan. -#framebuffer_width=1280 -#framebuffer_height=720 - -# uncomment if hdmi display is not detected and composite is being output -#hdmi_force_hotplug=1 - -# uncomment to force a specific HDMI mode (this will force VGA) -#hdmi_group=1 -#hdmi_mode=1 - -# uncomment to force a HDMI mode rather than DVI. This can make audio work in -# DMT (computer monitor) modes -#hdmi_drive=2 - -# uncomment to increase signal to HDMI, if you have interference, blanking, or -# no display -#config_hdmi_boost=4 - -# uncomment for composite PAL -#sdtv_mode=2 - -#uncomment to overclock the arm. 700 MHz is the default. -#arm_freq=800 - # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on -# Uncomment this to enable infrared communication. -#dtoverlay=gpio-ir,gpio_pin=17 -#dtoverlay=gpio-ir-tx,gpio_pin=18 - -# Additional overlays and parameters are documented /boot/overlays/README - # Enable audio (loads snd_bcm2835) dtparam=audio=on +# Additional overlays and parameters are documented +# /boot/firmware/overlays/README + # Automatically load overlays for detected cameras camera_auto_detect=1 # Automatically load overlays for detected DSI displays display_auto_detect=1 +# Automatically load initramfs files, if found +auto_initramfs=1 + # Enable DRM VC4 V3D driver dtoverlay=vc4-kms-v3d max_framebuffers=2 +# Don't have the firmware create an initial video= setting in cmdline.txt. +# Use the kernel's default instead. +disable_fw_kms_setup=1 + # Disable compensation for displays with overscan disable_overscan=1 +# Run as fast as firmware / board allows +arm_boost=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 @@ -73,8 +44,3 @@ otg_mode=1 [all] -[pi4] -# Run as fast as firmware / board allows -arm_boost=1 - -[all] diff --git a/stage1/01-sys-tweaks/files/fstab b/stage1/01-sys-tweaks/files/fstab index f16e3fb..525c3bc 100644 --- a/stage1/01-sys-tweaks/files/fstab +++ b/stage1/01-sys-tweaks/files/fstab @@ -1,3 +1,3 @@ proc /proc proc defaults 0 0 -BOOTDEV /boot vfat defaults 0 2 +BOOTDEV /boot/firmware vfat defaults 0 2 ROOTDEV / ext4 defaults,noatime 0 1 diff --git a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff b/stage2/01-sys-tweaks/00-patches/07-resize-init.diff index dfc01d4..e508a9f 100644 --- a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff +++ b/stage2/01-sys-tweaks/00-patches/07-resize-init.diff @@ -1,5 +1,5 @@ ---- stage2.orig/rootfs/boot/cmdline.txt -+++ stage2/rootfs/boot/cmdline.txt +--- stage2.orig/rootfs/boot/firmware/cmdline.txt ++++ stage2/rootfs/boot/firmware/cmdline.txt @@ -1 +1 @@ -console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait +console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspberrypi-sys-mods/firstboot From 64b498b2dd458937cfc930d557513ff36db4dd23 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 7 Sep 2023 14:59:28 +0100 Subject: [PATCH 11/22] Don't generate NOOBS files --- stage2/EXPORT_NOOBS | 2 -- stage4/EXPORT_NOOBS | 2 -- stage5/EXPORT_NOOBS | 2 -- 3 files changed, 6 deletions(-) delete mode 100644 stage2/EXPORT_NOOBS delete mode 100644 stage4/EXPORT_NOOBS delete mode 100644 stage5/EXPORT_NOOBS diff --git a/stage2/EXPORT_NOOBS b/stage2/EXPORT_NOOBS deleted file mode 100644 index 0d78ecf..0000000 --- a/stage2/EXPORT_NOOBS +++ /dev/null @@ -1,2 +0,0 @@ -NOOBS_NAME="Raspberry Pi OS Lite (32-bit)" -NOOBS_DESCRIPTION="A port of Debian with no desktop environment" diff --git a/stage4/EXPORT_NOOBS b/stage4/EXPORT_NOOBS deleted file mode 100644 index f197ee1..0000000 --- a/stage4/EXPORT_NOOBS +++ /dev/null @@ -1,2 +0,0 @@ -NOOBS_NAME="Raspberry Pi OS (32-bit)" -NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop" diff --git a/stage5/EXPORT_NOOBS b/stage5/EXPORT_NOOBS deleted file mode 100644 index ac7051f..0000000 --- a/stage5/EXPORT_NOOBS +++ /dev/null @@ -1,2 +0,0 @@ -NOOBS_NAME="Raspberry Pi OS Full (32-bit)" -NOOBS_DESCRIPTION="A port of Debian with desktop and recommended applications" From 188c155717b68dbd5704f337fd3b2cbd1b80d966 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 8 Sep 2023 11:39:51 +0100 Subject: [PATCH 12/22] Migrate to raspberrypi.com --- stage0/00-configure-apt/files/raspi.list | 4 ++-- stage0/00-configure-apt/files/sources.list | 4 ++-- stage0/prerun.sh | 2 +- stage4/03-bookshelf/00-run.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stage0/00-configure-apt/files/raspi.list b/stage0/00-configure-apt/files/raspi.list index 41c5a70..5f889b1 100644 --- a/stage0/00-configure-apt/files/raspi.list +++ b/stage0/00-configure-apt/files/raspi.list @@ -1,3 +1,3 @@ -deb http://archive.raspberrypi.org/debian/ RELEASE main +deb http://archive.raspberrypi.com/debian/ RELEASE main # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://archive.raspberrypi.org/debian/ RELEASE main +#deb-src http://archive.raspberrypi.com/debian/ RELEASE main diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list index 4a5dd8a..cd339c5 100644 --- a/stage0/00-configure-apt/files/sources.list +++ b/stage0/00-configure-apt/files/sources.list @@ -1,3 +1,3 @@ -deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi +deb http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi +#deb-src http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi diff --git a/stage0/prerun.sh b/stage0/prerun.sh index c8e51a4..0252071 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -6,5 +6,5 @@ if [ "$RELEASE" != "bookworm" ]; then fi if [ ! -d "${ROOTFS_DIR}" ] || [ "${USE_QCOW2}" = "1" ]; then - bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ + bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.com/raspbian/ fi diff --git a/stage4/03-bookshelf/00-run.sh b/stage4/03-bookshelf/00-run.sh index 8244568..5bf017b 100755 --- a/stage4/03-bookshelf/00-run.sh +++ b/stage4/03-bookshelf/00-run.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -BOOKSHELF_URL="https://magpi.raspberrypi.org/bookshelf.xml" +BOOKSHELF_URL="https://magpi.raspberrypi.com/bookshelf.xml" GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/Raspberry Pi Beginner's Guide 4th Edition<\/TITLE>/ {f=1; next} f==1 && /PDF/ {print \$3; exit}")" OUTPUT="$(basename "$GUIDE_URL" | cut -f1 -d'?')" From e6dd7caa2b849cc22db42abb84b1a93c0818db39 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Tue, 12 Sep 2023 18:04:27 +0100 Subject: [PATCH 13/22] stage2: remove rng-tools See https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/77 --- stage2/01-sys-tweaks/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 86bdd9d..64529c7 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -24,7 +24,6 @@ htop man-db policykit-1 ssh-import-id -rng-tools ethtool ntfs-3g pciutils From 574d3e705535ac4fc47fd3f801d47fcc07184a63 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Wed, 13 Sep 2023 13:20:51 +0100 Subject: [PATCH 14/22] stage0: only fetch armhf packages from Raspbian --- stage0/00-configure-apt/files/sources.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list index cd339c5..3ef0699 100644 --- a/stage0/00-configure-apt/files/sources.list +++ b/stage0/00-configure-apt/files/sources.list @@ -1,3 +1,3 @@ -deb http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi +deb [ arch=armhf ] http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi From d7dde0ca5e02a7db400878f17267fde5f60429d4 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Thu, 7 Sep 2023 15:42:20 +0100 Subject: [PATCH 15/22] stage5: disable greenfoot and bluej as they don't seem to work --- stage5/00-install-extras/00-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 909480b..331f958 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -7,7 +7,7 @@ python3-sense-emu sense-emu-tools python-sense-emu-doc wolfram-engine claws-mail -greenfoot-unbundled bluej-unbundled +#greenfoot-unbundled bluej-unbundled realvnc-vnc-viewer code-the-classics From 6051f1da7669875baf7e3c74daf67cb795c2a16e Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Wed, 13 Sep 2023 16:00:39 +0100 Subject: [PATCH 16/22] stage4: remove pimoroni packages for now --- stage4/00-install-packages/01-packages | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 stage4/00-install-packages/01-packages diff --git a/stage4/00-install-packages/01-packages b/stage4/00-install-packages/01-packages deleted file mode 100644 index 5441d9d..0000000 --- a/stage4/00-install-packages/01-packages +++ /dev/null @@ -1,22 +0,0 @@ -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 From 3a6342b63d21d2a3385d99fa1e8c0fa9ca55b94c Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Thu, 14 Sep 2023 14:49:03 +0100 Subject: [PATCH 17/22] stage0: install kernel headers --- stage0/02-firmware/01-packages | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stage0/02-firmware/01-packages b/stage0/02-firmware/01-packages index 150958a..38f2f52 100644 --- a/stage0/02-firmware/01-packages +++ b/stage0/02-firmware/01-packages @@ -4,3 +4,6 @@ linux-image-rpi-v6 linux-image-rpi-v7 linux-image-rpi-v7l linux-image-rpi-v8 +linux-headers-rpi-v6 +linux-headers-rpi-v7 +linux-headers-rpi-v7l From 7ae1a26ae93991a25d39217c07f0b6656319a5e1 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Thu, 14 Sep 2023 14:50:07 +0100 Subject: [PATCH 18/22] stage4: ignore power key and let raspberrypi-ui-mods handle it --- stage4/07-disable-pwr-button/00-run.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 stage4/07-disable-pwr-button/00-run.sh diff --git a/stage4/07-disable-pwr-button/00-run.sh b/stage4/07-disable-pwr-button/00-run.sh new file mode 100755 index 0000000..44646bd --- /dev/null +++ b/stage4/07-disable-pwr-button/00-run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +sed -i 's/^.*HandlePowerKey=.*$/HandlePowerKey=ignore/' "${ROOTFS_DIR}/etc/systemd/logind.conf" From c4f98a873fd622c4ae01a65f38b1b11c8259acf5 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Wed, 23 Aug 2023 12:34:23 +0100 Subject: [PATCH 19/22] Move picamera2 to stage3 - PyAV takes up too much space for lite images --- stage2/01-sys-tweaks/00-packages-nr | 1 - stage3/00-install-packages/00-packages | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/stage2/01-sys-tweaks/00-packages-nr b/stage2/01-sys-tweaks/00-packages-nr index 453ada8..6bdb600 100644 --- a/stage2/01-sys-tweaks/00-packages-nr +++ b/stage2/01-sys-tweaks/00-packages-nr @@ -1,4 +1,3 @@ cifs-utils libcamera-apps-lite mkvtoolnix -python3-picamera2 diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index 2d206cd..cc18081 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -14,5 +14,6 @@ obconf arandr libcamera-tools libcamera-apps +python3-picamera2 python3-pyqt5 python3-opengl From 5b15e14ff930c97ce1365d36b7696877d124b878 Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Mon, 25 Sep 2023 21:33:15 +0100 Subject: [PATCH 20/22] stage2: install GPIO libraries --- stage2/01-sys-tweaks/00-packages | 5 ++++- stage4/00-install-packages/00-packages | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 64529c7..6142e2e 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -2,8 +2,11 @@ ssh less fbset sudo psmisc strace ed ncdu console-setup keyboard-configuration debconf-utils parted build-essential manpages-dev bash-completion gdb pkg-config python-is-python3 -python3-rpi.gpio v4l-utils +v4l-utils +python3-libgpiod python3-gpiozero +pigpio python3-pigpio raspi-gpio python3-rpi.gpio +python3-spidev avahi-daemon lua5.1 luajit diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index bfb3f0d..567f3ce 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -11,8 +11,6 @@ tree libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr geany piclone -pigpio python3-pigpio raspi-gpio python3-rpi.gpio -python3-spidev python3-twython python3-smbus python3-flask From dc6a3c1dd869f07c5fa7a61d667f09b81c66fb4a Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Tue, 26 Sep 2023 14:19:01 +0100 Subject: [PATCH 21/22] stage2: install python3-smbus2 --- stage2/01-sys-tweaks/00-packages | 1 + stage4/00-install-packages/00-packages | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 6142e2e..0e6bfb9 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -7,6 +7,7 @@ python3-libgpiod python3-gpiozero pigpio python3-pigpio raspi-gpio python3-rpi.gpio python3-spidev +python3-smbus2 avahi-daemon lua5.1 luajit diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 567f3ce..2307752 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -12,7 +12,6 @@ libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr geany piclone python3-twython -python3-smbus python3-flask pprompt piwiz From a0b8868fbfd04da73d449b84773b7020bbf7c62b Mon Sep 17 00:00:00 2001 From: Serge Schneider <serge@raspberrypi.com> Date: Wed, 27 Sep 2023 15:56:37 +0100 Subject: [PATCH 22/22] Update release notes --- .../00-release/files/release_notes.txt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index 7ec34fd..1eeffe9 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,4 +1,26 @@ UNRELEASED: + * Based on Debian bookworm release + * Support for Raspberry Pi 5 + * 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 + * lxpanel replaced with new wf-panel-pi application when running Wayland; existing lxpanel plugins migrated; gpu performance and power plugins added + * pcmanfm modified to use Wayland backend when running on Wayland + * PipeWire used instead of PulseAudio as audio control subsystem; various changes made to volume control plugin to support this + * NetworkManager used instead of dhcpcd as networking interface; various changes made to networking plugin to support this + * Firefox browser added as alternative to Chromium; selection of default browser added to Raspberry Pi Configuration tool + * WayVNC VNC server used instead of RealVNC when running on Wayland + * All customisation and configuration applications modified to customise Wayfire environment as appropriate + * grim used as screenshot tool instead of scrot when running on Wayland + * eom image viewer used instead of gpicview + * evince document viewer used instead of qpdfview + * Chromium web browser updated to version 116 + * VLC media player updated to version 3.0.18 + * Magnifier program not available when running Wayland; Wayfire includes screen zoom capabilities + * CustomPC and Wireframe removed from Bookshelf + * Numerous small changes and bug fixes + * Switched from raspberrypi-kernel to Debian-based kernel packaging (linux-image-rpi-*) + * Switched from raspberrypi-bootloader to Debian based firmware packaging (raspi-firmware) + * /boot mount point moved to /boot/firmware +2023-05-03: * 64-bit Mathematica added to rp-prefapps * Bug fix - occasional segfault in CPU temperature plugin * Bug fix - X server crash when changing screen orientation