From 52ac7751ca7b289ebafe5b49f89d2538d0413a69 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 14 Aug 2025 13:52:21 +0100 Subject: [PATCH 01/57] Add e2fsprogs to dependencies --- Dockerfile | 2 +- README.md | 2 +- depends | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf03b06..f17077c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get -y update && \ apt-get -y install --no-install-recommends \ git vim parted \ - quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ + quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools e2fsprogs\ libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc \ binfmt-support ca-certificates fdisk gpg pigz arch-test \ && rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index c27bfe3..2c1a1bd 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To install the required dependencies for `pi-gen` you should run: ```bash apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ -dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \ +dosfstools e2fsprogs libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \ gpg pigz xxd arch-test bmap-tools ``` diff --git a/depends b/depends index acbb5cd..752ba79 100644 --- a/depends +++ b/depends @@ -6,6 +6,7 @@ debootstrap zerofree zip mkdosfs:dosfstools +mke2fs:e2fsprogs capsh:libcap2-bin bsdtar:libarchive-tools grep From c2cd4e8a6231e0df6cecdc162aea09bf6e3f05c8 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 13 May 2025 07:41:10 +0100 Subject: [PATCH 02/57] bookworm -> trixie --- README.md | 4 ++-- build-docker.sh | 6 +++--- build.sh | 2 +- stage0/prerun.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2c1a1bd..71e5325 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ environment variables. The following environment variables are supported: - * `IMG_NAME` (Default: `raspios-$RELEASE-$ARCH`, for example: `raspios-bookworm-armhf`) + * `IMG_NAME` (Default: `raspios-$RELEASE-$ARCH`, for example: `raspios-trixie-armhf`) The name of the image to build with the current stage directories. Use this variable to set the root name of your OS, eg `IMG_NAME=Frobulator`. @@ -66,7 +66,7 @@ The following environment variables are supported: The release name to use in `/etc/issue.txt`. The default should only be used for official Raspberry Pi builds. -* `RELEASE` (Default: `bookworm`) +* `RELEASE` (Default: `trixie`) The release version to build images against. Valid values are any supported Debian release. However, since different releases will have different sets of diff --git a/build-docker.sh b/build-docker.sh index 0591c34..9c04651 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -85,10 +85,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:bookworm + BASE_IMAGE=i386/debian:trixie ;; *) - BASE_IMAGE=debian:bookworm + BASE_IMAGE=debian:trixie ;; esac ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" @@ -151,7 +151,7 @@ time ${DOCKER} run \ pi-gen \ bash -e -o pipefail -c " dpkg-reconfigure qemu-user-static && - # binfmt_misc is sometimes not mounted with debian bookworm image + # binfmt_misc is sometimes not mounted with debian trixie image (mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) && cd /pi-gen; ./build.sh ${BUILD_OPTS} && rsync -av work/*/build.log deploy/ diff --git a/build.sh b/build.sh index 4d3902c..23f9585 100755 --- a/build.sh +++ b/build.sh @@ -176,7 +176,7 @@ export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen} export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference} export ARCH=armhf -export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh +export RELEASE=${RELEASE:-trixie} # Don't forget to update stage0/prerun.sh export IMG_NAME="${IMG_NAME:-raspios-$RELEASE-$ARCH}" export USE_QEMU="${USE_QEMU:-0}" diff --git a/stage0/prerun.sh b/stage0/prerun.sh index 5f0bd2c..c625b0e 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -if [ "$RELEASE" != "bookworm" ]; then +if [ "$RELEASE" != "trixie" ]; then echo "WARNING: RELEASE does not match the intended option for this branch." echo " Please check the relevant README.md section." fi From ec789c7b7888eaefea53013265f9cace166550e1 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:26:18 +0100 Subject: [PATCH 03/57] Remove obsolete packages --- stage2/01-sys-tweaks/00-packages | 3 +-- stage3/00-install-packages/00-packages | 3 +-- stage4/00-install-packages/00-packages | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index f06f7d0..d5d2856 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -5,7 +5,7 @@ python-is-python3 v4l-utils gpiod python3-libgpiod python3-gpiozero -pigpio python3-pigpio raspi-gpio python3-rpi-lgpio +python3-rpi-lgpio python3-spidev python3-smbus2 avahi-daemon @@ -25,7 +25,6 @@ libmtp-runtime rsync htop man-db -policykit-1 ssh-import-id ethtool ntfs-3g diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index 329b6fe..e3e2e0c 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -1,8 +1,7 @@ -gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav +gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav evince gtk2-engines alsa-utils desktop-base git -policykit-1 gvfs rfkill chromium rpi-chromium-mods libwidevinecdm0 diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 453a2fd..812fe81 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -8,10 +8,9 @@ python3-pip python3-numpy rc-gui sense-hat tree -libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr +libgl1-mesa-dri libgles1 xcompmgr geany piclone -python3-twython python3-flask pprompt piwiz From d8ff34585ce42e188ca6f6274807879891a33352 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:00:28 +0100 Subject: [PATCH 04/57] Refresh patches --- stage1/01-sys-tweaks/00-patches/01-bashrc.diff | 10 +++++----- .../01-sys-tweaks/00-patches/01-useradd.diff | 8 +++----- .../01-sys-tweaks/00-patches/04-inputrc.diff | 8 +++----- stage2/01-sys-tweaks/00-patches/05-path.diff | 18 +++++++----------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/stage1/01-sys-tweaks/00-patches/01-bashrc.diff b/stage1/01-sys-tweaks/00-patches/01-bashrc.diff index efa2104..86d351f 100644 --- a/stage1/01-sys-tweaks/00-patches/01-bashrc.diff +++ b/stage1/01-sys-tweaks/00-patches/01-bashrc.diff @@ -1,6 +1,6 @@ ---- a/rootfs/etc/skel/.bashrc -+++ b/rootfs/etc/skel/.bashrc -@@ -43,7 +43,7 @@ +--- stage1.orig/rootfs/etc/skel/.bashrc ++++ stage1/rootfs/etc/skel/.bashrc +@@ -43,7 +43,7 @@ esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt @@ -9,7 +9,7 @@ if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then -@@ -57,7 +57,7 @@ +@@ -57,7 +57,7 @@ if [ -n "$force_color_prompt" ]; then fi if [ "$color_prompt" = yes ]; then @@ -18,7 +18,7 @@ else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi -@@ -79,9 +79,9 @@ +@@ -79,9 +79,9 @@ if [ -x /usr/bin/dircolors ]; then #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' diff --git a/stage2/01-sys-tweaks/00-patches/01-useradd.diff b/stage2/01-sys-tweaks/00-patches/01-useradd.diff index e81ad5a..cc3476b 100644 --- a/stage2/01-sys-tweaks/00-patches/01-useradd.diff +++ b/stage2/01-sys-tweaks/00-patches/01-useradd.diff @@ -1,9 +1,7 @@ -Index: jessie-stage2/rootfs/etc/default/useradd -=================================================================== ---- jessie-stage2.orig/rootfs/etc/default/useradd -+++ jessie-stage2/rootfs/etc/default/useradd +--- stage2.orig/rootfs/etc/default/useradd ++++ stage2/rootfs/etc/default/useradd @@ -5,7 +5,7 @@ - # Similar to DHSELL in adduser. However, we use "sh" here because + # Similar to DSHELL in adduser. However, we use "sh" here because # useradd is a low level utility and should be as general # as possible -SHELL=/bin/sh diff --git a/stage2/01-sys-tweaks/00-patches/04-inputrc.diff b/stage2/01-sys-tweaks/00-patches/04-inputrc.diff index c81fa62..1da12c5 100644 --- a/stage2/01-sys-tweaks/00-patches/04-inputrc.diff +++ b/stage2/01-sys-tweaks/00-patches/04-inputrc.diff @@ -1,8 +1,6 @@ -Index: jessie-stage2/rootfs/etc/inputrc -=================================================================== ---- jessie-stage2.orig/rootfs/etc/inputrc -+++ jessie-stage2/rootfs/etc/inputrc -@@ -65,3 +65,7 @@ $endif +--- stage2.orig/rootfs/etc/inputrc ++++ stage2/rootfs/etc/inputrc +@@ -69,3 +69,7 @@ $endif # "\e[F": end-of-line $endif diff --git a/stage2/01-sys-tweaks/00-patches/05-path.diff b/stage2/01-sys-tweaks/00-patches/05-path.diff index 25b80a1..38d7fc3 100644 --- a/stage2/01-sys-tweaks/00-patches/05-path.diff +++ b/stage2/01-sys-tweaks/00-patches/05-path.diff @@ -1,8 +1,6 @@ -Index: jessie-stage2/rootfs/etc/login.defs -=================================================================== ---- jessie-stage2.orig/rootfs/etc/login.defs -+++ jessie-stage2/rootfs/etc/login.defs -@@ -100,7 +100,7 @@ HUSHLOGIN_FILE .hushlogin +--- stage2.orig/rootfs/etc/login.defs ++++ stage2/rootfs/etc/login.defs +@@ -60,7 +60,7 @@ HUSHLOGIN_FILE .hushlogin # # (they are minimal, add the rest in the shell startup files) ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin @@ -10,13 +8,11 @@ Index: jessie-stage2/rootfs/etc/login.defs +ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games # - # Terminal permissions -Index: jessie-stage2/rootfs/etc/profile -=================================================================== ---- jessie-stage2.orig/rootfs/etc/profile -+++ jessie-stage2/rootfs/etc/profile + # Terminal permissions for terminals after login(1). +--- stage2.orig/rootfs/etc/profile ++++ stage2/rootfs/etc/profile @@ -4,7 +4,7 @@ - if [ "`id -u`" -eq 0 ]; then + if [ "$(id -u)" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else - PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" From 56d7e30356aad8adc72d4cc45d4bd565bf065ceb Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 5 Jun 2025 22:04:34 +0100 Subject: [PATCH 05/57] stage0: modernise apt sources --- stage0/00-configure-apt/00-run.sh | 12 +++---- .../files/raspberrypi-archive-keyring.pgp | Bin 0 -> 1229 bytes .../files/raspberrypi.gpg.key | 30 ------------------ .../00-configure-apt/files/raspbian.sources | 6 ++++ stage0/00-configure-apt/files/raspi.list | 3 -- stage0/00-configure-apt/files/raspi.sources | 5 +++ stage0/00-configure-apt/files/sources.list | 3 -- 7 files changed, 17 insertions(+), 42 deletions(-) create mode 100644 stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp delete mode 100644 stage0/00-configure-apt/files/raspberrypi.gpg.key create mode 100644 stage0/00-configure-apt/files/raspbian.sources delete mode 100644 stage0/00-configure-apt/files/raspi.list create mode 100644 stage0/00-configure-apt/files/raspi.sources delete mode 100644 stage0/00-configure-apt/files/sources.list diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index 1b7e03f..8e47893 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -1,9 +1,10 @@ #!/bin/bash -e -install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/" -install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" -sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list" -sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list" +true > "${ROOTFS_DIR}/etc/apt/sources.list" +install -m 644 files/raspbian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" +install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" +sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspbian.sources" +sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.sources" if [ -n "$APT_PROXY" ]; then install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" @@ -19,8 +20,7 @@ else rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" 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/" +install -m 644 files/raspberrypi-archive-keyring.pgp "${ROOTFS_DIR}/usr/share/keyrings/" on_chroot <<- \EOF ARCH="$(dpkg --print-architecture)" if [ "$ARCH" = "armhf" ]; then diff --git a/stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp b/stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp new file mode 100644 index 0000000000000000000000000000000000000000..e0ada06a3ab4633137053188d6cc1f77b77237a8 GIT binary patch literal 1229 zcmV;;1Ty=X0SyFC-R_S82mq_Xq#AHyU!QwtGcm4R@PLL6L4LMVuSDD}S^bWgD(f z8w646R_0hcFid6w?MWv(jM768U&qzSWkZrTA!qok;;q3vaYXnZGm3m&Gv>jivG za7)9LBadobb$$-gJ~#86|Z)G z%BB^`+S8wsy9fV7c=WY-joOX{Q!R*+W?gmROUaxU z7FsW6NcFPo9igUgK9i3uQv@!2+^Ene@Q!|sQbt<1n_aq8A>(K6%j}w_L80^CnKFMj z){NawuVg!ZH9w?iKeQD_v$lmfzcq@GI|!jDN)JB!0*E| zR1S`BKj&MV(O&7-57t+4t7(S#K^v_)vnqI8r(oL8R#GI!m}O0r?XO2?0EunbM%80{ zy)JFF;NA|)C5U6IEtW4rLBj8RaigBr#On)CH2eNTSk_%FZ2qA{o1MuzL#IzbO3cID ziM-hNZXJW9S${egg+LewIUiFAOnO_U;ZuaU0SyFC-R_S82msBMTR~+`w|;K@N-^Q& z0SXq)0^Up-(qo~g+8VR?S`G*%h9%w2;P>OwR?pT`$Lr-ztt|MDry(6$`mcsB=y77+ z2ZtH}>iI)4=oNnUO3tL$^xF1Tq#8?tv)yh~F8?*R4c4Oqx{E^lrl97$I-r}q<}tSM zd~ozjB<=I(V0u8BWhP`FdM#k_Gk{t|iYFl8KWYuN^`RI6lq4y!DiHodlHiTVs zmKVD+3!a~fXq=A|kddiIIVL8~4|AHQ-Gq^WJda`2Ha2rlRKM%_V z{StVH?cZ8Y6gC3}xRmnG8V9&HJo|#$+H`ZU^qJt@!iD7b@X@?=l417nkhPm^VkoI) z<`gPBPN@NhO_I`W#Gh4OIK-h;0U7F8b%5s9LY+%2LlpNH7gBK--b4G$k|T33u+z^X-@uF=}@y}U?3zm5}_g}8BLJaY04{3y5jAK rq0n^PVPsRhSmx5asCT{8;kQBkkMMxVk~}~jdn$g9KdA&yNRPmcGkH4) literal 0 HcmV?d00001 diff --git a/stage0/00-configure-apt/files/raspberrypi.gpg.key b/stage0/00-configure-apt/files/raspberrypi.gpg.key deleted file mode 100644 index 60b5f65..0000000 --- a/stage0/00-configure-apt/files/raspberrypi.gpg.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.12 (GNU/Linux) - -mQENBE/d7o8BCACrwqQacGJfn3tnMzGui6mv2lLxYbsOuy/+U4rqMmGEuo3h9m92 -30E2EtypsoWczkBretzLUCFv+VUOxaA6sV9+puTqYGhhQZFuKUWcG7orf7QbZRuu -TxsEUepW5lg7MExmAu1JJzqM0kMQX8fVyWVDkjchZ/is4q3BPOUCJbUJOsE+kK/6 -8kW6nWdhwSAjfDh06bA5wvoXNjYoDdnSZyVdcYCPEJXEg5jfF/+nmiFKMZBraHwn -eQsepr7rBXxNcEvDlSOPal11fg90KXpy7Umre1UcAZYJdQeWcHu7X5uoJx/MG5J8 -ic6CwYmDaShIFa92f8qmFcna05+lppk76fsnABEBAAG0IFJhc3BiZXJyeSBQaSBB -cmNoaXZlIFNpZ25pbmcgS2V5iQE4BBMBAgAiBQJP3e6PAhsDBgsJCAcDAgYVCAIJ -CgsEFgIDAQIeAQIXgAAKCRCCsSmSf6MwPk6vB/9pePB3IukU9WC9Bammh3mpQTvL -OifbkzHkmAYxzjfK6D2I8pT0xMxy949+ThzJ7uL60p6T/32ED9DR3LHIMXZvKtuc -mQnSiNDX03E2p7lIP/htoxW2hDP2n8cdlNdt0M9IjaWBppsbO7IrDppG2B1aRLni -uD7v8bHRL2mKTtIDLX42Enl8aLAkJYgNWpZyPkDyOqamjijarIWjGEPCkaURF7g4 -d44HvYhpbLMOrz1m6N5Bzoa5+nq3lmifeiWKxioFXU+Hy5bhtAM6ljVb59hbD2ra -X4+3LXC9oox2flmQnyqwoyfZqVgSQa0B41qEQo8t1bz6Q1Ti7fbMLThmbRHiuQEN -BE/d7o8BCADNlVtBZU63fm79SjHh5AEKFs0C3kwa0mOhp9oas/haDggmhiXdzeD3 -49JWz9ZTx+vlTq0s+I+nIR1a+q+GL+hxYt4HhxoA6vlDMegVfvZKzqTX9Nr2VqQa -S4Kz3W5ULv81tw3WowK6i0L7pqDmvDqgm73mMbbxfHD0SyTt8+fk7qX6Ag2pZ4a9 -ZdJGxvASkh0McGpbYJhk1WYD+eh4fqH3IaeJi6xtNoRdc5YXuzILnp+KaJyPE5CR -qUY5JibOD3qR7zDjP0ueP93jLqmoKltCdN5+yYEExtSwz5lXniiYOJp8LWFCgv5h -m8aYXkcJS1xVV9Ltno23YvX5edw9QY4hABEBAAGJAR8EGAECAAkFAk/d7o8CGwwA -CgkQgrEpkn+jMD5Figf/dIC1qtDMTbu5IsI5uZPX63xydaExQNYf98cq5H2fWF6O -yVR7ERzA2w33hI0yZQrqO6pU9SRnHRxCFvGv6y+mXXXMRcmjZG7GiD6tQWeN/3wb -EbAn5cg6CJ/Lk/BI4iRRfBX07LbYULCohlGkwBOkRo10T+Ld4vCCnBftCh5x2OtZ -TOWRULxP36y2PLGVNF+q9pho98qx+RIxvpofQM/842ZycjPJvzgVQsW4LT91KYAE -4TVf6JjwUM6HZDoiNcX6d7zOhNfQihXTsniZZ6rky287htsWVDNkqOi5T3oTxWUo -m++/7s3K3L0zWopdhMVcgg6Nt9gcjzqN1c0gy55L/g== -=mNSj ------END PGP PUBLIC KEY BLOCK----- diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources new file mode 100644 index 0000000..0f2e26f --- /dev/null +++ b/stage0/00-configure-apt/files/raspbian.sources @@ -0,0 +1,6 @@ +Types: deb +URIs: http://raspbian.raspberrypi.com/raspbian/ +Arch: armhf +Suites: RELEASE +Components: main contrib non-free rpi +Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg diff --git a/stage0/00-configure-apt/files/raspi.list b/stage0/00-configure-apt/files/raspi.list deleted file mode 100644 index 5f889b1..0000000 --- a/stage0/00-configure-apt/files/raspi.list +++ /dev/null @@ -1,3 +0,0 @@ -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.com/debian/ RELEASE main diff --git a/stage0/00-configure-apt/files/raspi.sources b/stage0/00-configure-apt/files/raspi.sources new file mode 100644 index 0000000..1ec8b97 --- /dev/null +++ b/stage0/00-configure-apt/files/raspi.sources @@ -0,0 +1,5 @@ +Types: deb +URIs: http://archive.raspberrypi.com/debian/ +Suites: RELEASE +Components: main +Signed-By: /usr/share/keyrings/raspberrypi-archive-keyring.pgp diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list deleted file mode 100644 index 3ef0699..0000000 --- a/stage0/00-configure-apt/files/sources.list +++ /dev/null @@ -1,3 +0,0 @@ -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 5dc3f5df482f299b4f6b86a5270ca511c1c17461 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 15 Jul 2025 13:38:31 +0100 Subject: [PATCH 06/57] Remove v7l kernel --- stage0/02-firmware/01-packages | 2 -- 1 file changed, 2 deletions(-) diff --git a/stage0/02-firmware/01-packages b/stage0/02-firmware/01-packages index 38f2f52..8132aa2 100644 --- a/stage0/02-firmware/01-packages +++ b/stage0/02-firmware/01-packages @@ -2,8 +2,6 @@ initramfs-tools raspi-firmware 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 a62422ce71383f69b12679d7caf82459beb525de Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:01:46 +0100 Subject: [PATCH 07/57] stage4: change do_wayland to W2 (labwc) --- stage4/06-enable-wayland/00-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage4/06-enable-wayland/00-run.sh b/stage4/06-enable-wayland/00-run.sh index d1f240d..bd8bbc3 100755 --- a/stage4/06-enable-wayland/00-run.sh +++ b/stage4/06-enable-wayland/00-run.sh @@ -1,5 +1,5 @@ #!/bin/bash -e on_chroot << EOF - SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W3 + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W2 EOF From c4e9044fafc7fd7dbb12b227c2052c71f7aab4db Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 2 Jun 2025 22:09:14 +0100 Subject: [PATCH 08/57] Set machine-id to "uninitialized" to signal first boot --- export-image/05-finalise/01-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index 860b97f..79a01e2 100755 --- a/export-image/05-finalise/01-run.sh +++ b/export-image/05-finalise/01-run.sh @@ -51,7 +51,7 @@ rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id" -true > "${ROOTFS_DIR}/etc/machine-id" +echo "uninitialized" > "${ROOTFS_DIR}/etc/machine-id" ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab" From 23e7af35a13f07e246145b94ce0884eb75d654c9 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 2 Jun 2025 22:08:32 +0100 Subject: [PATCH 09/57] Remove firstboot init script in favour of initramfs and systemd services --- stage2/01-sys-tweaks/00-patches/07-resize-init.diff | 5 ----- stage2/01-sys-tweaks/00-patches/series | 1 - 2 files changed, 6 deletions(-) delete mode 100644 stage2/01-sys-tweaks/00-patches/07-resize-init.diff diff --git a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff b/stage2/01-sys-tweaks/00-patches/07-resize-init.diff deleted file mode 100644 index e508a9f..0000000 --- a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff +++ /dev/null @@ -1,5 +0,0 @@ ---- 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 diff --git a/stage2/01-sys-tweaks/00-patches/series b/stage2/01-sys-tweaks/00-patches/series index aee0402..19b04f5 100644 --- a/stage2/01-sys-tweaks/00-patches/series +++ b/stage2/01-sys-tweaks/00-patches/series @@ -2,4 +2,3 @@ 02-swap.diff 04-inputrc.diff 05-path.diff -07-resize-init.diff From 6811c1dc41b0eb71eefb9cf2beebbd18b9d1d06e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 6 Jun 2025 14:53:26 +0100 Subject: [PATCH 10/57] Remove fake-hwclock --- export-image/05-finalise/01-run.sh | 5 ++--- stage2/01-sys-tweaks/00-packages | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index 79a01e2..251b4df 100755 --- a/export-image/05-finalise/01-run.sh +++ b/export-image/05-finalise/01-run.sh @@ -7,12 +7,11 @@ BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap" on_chroot << EOF update-initramfs -k all -c -if [ -x /etc/init.d/fake-hwclock ]; then - /etc/init.d/fake-hwclock stop -fi if hash hardlink 2>/dev/null; then hardlink -t /usr/share/doc fi +install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync/clock +install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock EOF if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index d5d2856..b8c40a0 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -12,7 +12,7 @@ avahi-daemon lua5.1 luajit ca-certificates curl -fake-hwclock nfs-common usbutils +nfs-common usbutils dosfstools dphys-swapfile raspberrypi-sys-mods From f6a540d36cb6e32f70595ef9d3f8da557b6dea0e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 5 Jun 2025 19:47:42 +0100 Subject: [PATCH 11/57] Simplify console-setup configuration --- stage2/01-sys-tweaks/00-debconf | 6 ------ stage2/01-sys-tweaks/01-run.sh | 5 ++--- stage2/01-sys-tweaks/files/console-setup | 16 ---------------- 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 stage2/01-sys-tweaks/files/console-setup diff --git a/stage2/01-sys-tweaks/00-debconf b/stage2/01-sys-tweaks/00-debconf index 884db93..5e3340b 100644 --- a/stage2/01-sys-tweaks/00-debconf +++ b/stage2/01-sys-tweaks/00-debconf @@ -1,12 +1,6 @@ -# Encoding to use on the console: -# 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 -console-setup console-setup/charmap47 select UTF-8 # Character set to support: # 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 console-setup console-setup/codeset47 select Guess optimal character set -# Font for the console: -# Choices: Fixed, Goha, GohaClassic, Terminus, TerminusBold, TerminusBoldVGA, VGA, Do not change the boot/kernel font, Let the system select a suitable font -console-setup console-setup/fontface47 select Do not change the boot/kernel font # Key to function as AltGr: # 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 keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index aca8074..9488996 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -4,8 +4,6 @@ install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" -install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/" - if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys @@ -66,9 +64,10 @@ EOF rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* +sed -i 's/^FONTFACE=.*/FONTFACE=""/;s/^FONTSIZE=.*/FONTSIZE=""/' "${ROOTFS_DIR}/etc/default/console-setup" sed -i "s/PLACEHOLDER//" "${ROOTFS_DIR}/etc/default/keyboard" on_chroot << EOF -DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration +DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration console-setup EOF sed -i 's/^#\?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf" diff --git a/stage2/01-sys-tweaks/files/console-setup b/stage2/01-sys-tweaks/files/console-setup deleted file mode 100644 index 6508cdc..0000000 --- a/stage2/01-sys-tweaks/files/console-setup +++ /dev/null @@ -1,16 +0,0 @@ -# CONFIGURATION FILE FOR SETUPCON - -# Consult the console-setup(5) manual page. - -ACTIVE_CONSOLES="/dev/tty[1-6]" - -CHARMAP="UTF-8" - -CODESET="guess" -FONTFACE="" -FONTSIZE="" - -VIDEOMODE= - -# The following is an example how to use a braille font -# FONT='lat9w-08.psf.gz brl-8x8.psf' From a078afeba001f93cc1c74a266bdd07d3f03ec713 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 5 Jun 2025 19:49:21 +0100 Subject: [PATCH 12/57] stage2: remove resize2fs_once init.d service --- stage2/01-sys-tweaks/01-run.sh | 9 -------- stage2/01-sys-tweaks/files/resize2fs_once | 25 ----------------------- 2 files changed, 34 deletions(-) delete mode 100644 stage2/01-sys-tweaks/files/resize2fs_once diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 9488996..cde04e8 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" - install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then @@ -31,14 +29,7 @@ EOF if [ "${USE_QEMU}" = "1" ]; then echo "enter QEMU mode" install -m 644 files/90-qemu.rules "${ROOTFS_DIR}/etc/udev/rules.d/" - on_chroot << EOF -systemctl disable resize2fs_once -EOF echo "leaving QEMU mode" -else - on_chroot << EOF -systemctl enable resize2fs_once -EOF fi on_chroot <&2 - exit 3 - ;; -esac From 9ea6e44d64a393563eeb4f51c0de864e5335b7c1 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 5 Jun 2025 19:48:35 +0100 Subject: [PATCH 13/57] stage2: enable pdiffs --- stage2/01-sys-tweaks/01-run.sh | 2 -- stage2/01-sys-tweaks/files/50raspi | 5 ----- 2 files changed, 7 deletions(-) delete mode 100644 stage2/01-sys-tweaks/files/50raspi diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index cde04e8..d977b3d 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" - if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys diff --git a/stage2/01-sys-tweaks/files/50raspi b/stage2/01-sys-tweaks/files/50raspi deleted file mode 100644 index da3bd48..0000000 --- a/stage2/01-sys-tweaks/files/50raspi +++ /dev/null @@ -1,5 +0,0 @@ -# never use pdiffs. Current implementation is very slow on low-powered devices -Acquire::PDiffs "0"; - -# download up to 5 pdiffs: -#Acquire::PDiffs::FileLimit "5"; From 22601c0e4afb6d05812fb82d8cdec5e82404e3f3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 12:58:04 +0100 Subject: [PATCH 14/57] stage2: replace dphys-swapfile with rpi-swap --- stage2/01-sys-tweaks/00-packages | 2 +- stage2/01-sys-tweaks/00-patches/02-swap.diff | 13 ------------- stage2/01-sys-tweaks/00-patches/series | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 stage2/01-sys-tweaks/00-patches/02-swap.diff diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index b8c40a0..8000fb8 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -14,7 +14,7 @@ luajit ca-certificates curl nfs-common usbutils dosfstools -dphys-swapfile +rpi-swap rpi-loop-utils raspberrypi-sys-mods pi-bluetooth apt-listchanges diff --git a/stage2/01-sys-tweaks/00-patches/02-swap.diff b/stage2/01-sys-tweaks/00-patches/02-swap.diff deleted file mode 100644 index 52cdda4..0000000 --- a/stage2/01-sys-tweaks/00-patches/02-swap.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: jessie-stage2/rootfs/etc/dphys-swapfile -=================================================================== ---- jessie-stage2.orig/rootfs/etc/dphys-swapfile -+++ jessie-stage2/rootfs/etc/dphys-swapfile -@@ -13,7 +13,7 @@ - - # set size to absolute value, leaving empty (default) then uses computed value - # you most likely don't want this, unless you have an special disk situation --#CONF_SWAPSIZE= -+CONF_SWAPSIZE=512 - - # set size to computed value, this times RAM size, dynamically adapts, - # guarantees that there is enough swap without wasting disk space on excess diff --git a/stage2/01-sys-tweaks/00-patches/series b/stage2/01-sys-tweaks/00-patches/series index 19b04f5..cbd0fd4 100644 --- a/stage2/01-sys-tweaks/00-patches/series +++ b/stage2/01-sys-tweaks/00-patches/series @@ -1,4 +1,3 @@ 01-useradd.diff -02-swap.diff 04-inputrc.diff 05-path.diff From 131a3757adddc2d0f8a013b288222fe26542186f Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:22:44 +0100 Subject: [PATCH 15/57] stage2: remove nfs-common --- stage2/01-sys-tweaks/00-packages | 2 +- stage2/01-sys-tweaks/01-run.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 8000fb8..a5d3e06 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -12,7 +12,7 @@ avahi-daemon lua5.1 luajit ca-certificates curl -nfs-common usbutils +usbutils dosfstools rpi-swap rpi-loop-utils raspberrypi-sys-mods diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index d977b3d..8b8af25 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -14,7 +14,6 @@ fi on_chroot << EOF systemctl disable hwclock.sh -systemctl disable nfs-common systemctl disable rpcbind if [ "${ENABLE_SSH}" == "1" ]; then systemctl enable ssh From e324499cf89b59e8ca8781a76e6785e3cec11222 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:29:49 +0100 Subject: [PATCH 16/57] stage2: disabling these services doesn't do anything on Trixie --- stage2/01-sys-tweaks/01-run.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 8b8af25..ebb5d23 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -13,8 +13,6 @@ s/^#?[[:blank:]]*PasswordAuthentication[[:blank:]]*yes[[:blank:]]*$/PasswordAuth fi on_chroot << EOF -systemctl disable hwclock.sh -systemctl disable rpcbind if [ "${ENABLE_SSH}" == "1" ]; then systemctl enable ssh else From e2893c11ab3dfc7777ddd03f93b37762f568c160 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:06:21 +0100 Subject: [PATCH 17/57] stage2: don't enable regenerate_ssh_host_keys. SSH generates the keys itself now. --- stage2/01-sys-tweaks/01-run.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index ebb5d23..ce6aac9 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -18,7 +18,6 @@ if [ "${ENABLE_SSH}" == "1" ]; then else systemctl disable ssh fi -systemctl enable regenerate_ssh_host_keys EOF if [ "${USE_QEMU}" = "1" ]; then From 59b16f3bb46160e73f029edf6ae8df3b0a4e0c67 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:07:16 +0100 Subject: [PATCH 18/57] stage2: Don't modify journald.conf. This is done via a drop-in config file in sys-mods. --- stage2/01-sys-tweaks/01-run.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index ce6aac9..93bc36d 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -55,8 +55,6 @@ on_chroot << EOF DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration console-setup EOF -sed -i 's/^#\?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf" - if [ -e "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" ]; then sed -i 's/^#\?publish-workstation=.*/publish-workstation=yes/' "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" fi From 99068c00046159d1c8b7d8cb63407e01051a0a53 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:18:56 +0100 Subject: [PATCH 19/57] Replace raspberrypi-ui-mods with new meta-packages --- stage4/00-install-packages/00-packages | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 812fe81..3ae1bc5 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -3,7 +3,10 @@ python3-tk thonny python3-pgzero python3-serial debian-reference-en dillo -raspberrypi-net-mods raspberrypi-ui-mods +raspberrypi-net-mods +rpd-wayland-core rpd-x-core +rpd-theme +rpd-utilities rpd-preferences python3-pip python3-numpy rc-gui sense-hat From 5a978bf9d2f01e2a1dca63ca9459a44fad132f13 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:19:45 +0100 Subject: [PATCH 20/57] stage4: remove raspberrypi-net-mods, since it's already installed in stage2 --- stage4/00-install-packages/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 3ae1bc5..9ab32cd 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -3,7 +3,6 @@ python3-tk thonny python3-pgzero python3-serial debian-reference-en dillo -raspberrypi-net-mods rpd-wayland-core rpd-x-core rpd-theme rpd-utilities rpd-preferences From 6baaa073c7a9f234fb5e3569ca7a60017bb1bcaa Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 13:20:06 +0100 Subject: [PATCH 21/57] stage4: remove dillo --- stage4/00-install-packages/00-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 9ab32cd..285bccd 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -2,7 +2,7 @@ python3-pygame python3-tk thonny python3-pgzero python3-serial -debian-reference-en dillo +debian-reference-en rpd-wayland-core rpd-x-core rpd-theme rpd-utilities rpd-preferences From c4adcfca4ff629ef08a228428f08faaeb2fa76fa Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 28 Jul 2025 09:42:45 +0100 Subject: [PATCH 22/57] Remove rpi-imager (armhf builds no longer provided) --- stage4/00-install-packages/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 285bccd..6531427 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -20,7 +20,6 @@ rp-prefapps ffmpeg vlc rpi-connect -rpi-imager labwc squeekboard From ccb473a3bac47b24cbd9e3e52a500ceefd5615d1 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 3 Jun 2025 15:07:01 +0100 Subject: [PATCH 23/57] stage2: replace pi-bluetooth with bluez and bluez-firmware --- stage2/01-sys-tweaks/00-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index a5d3e06..a1c419e 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -16,7 +16,6 @@ usbutils dosfstools rpi-swap rpi-loop-utils raspberrypi-sys-mods -pi-bluetooth apt-listchanges usb-modeswitch libpam-chksshpwd @@ -36,3 +35,4 @@ unzip zip p7zip-full file kms++-utils python3-venv +bluez bluez-firmware From 04bc6843a9d144e6813780afa5792d7ba6816043 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 10 Jun 2025 14:14:21 +0100 Subject: [PATCH 24/57] stage1: add resize to cmdline.txt --- stage1/00-boot-files/files/cmdline.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage1/00-boot-files/files/cmdline.txt b/stage1/00-boot-files/files/cmdline.txt index 03cde68..71b90ff 100644 --- a/stage1/00-boot-files/files/cmdline.txt +++ b/stage1/00-boot-files/files/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 resize From 3b4c7e2ab81db5a8799896c07519353c1a7b3b9c Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:06:23 +0100 Subject: [PATCH 25/57] stage5: Remove (nu)scratch, since Trixie does not ship SqueakVM --- 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 c871e09..406a548 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -1,5 +1,5 @@ mu-editor -scratch nuscratch scratch3 +scratch3 wolfram-engine claws-mail realvnc-vnc-viewer From 881aa4112936e1a2a29c2c16f85c78491e79e2e3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:06:54 +0100 Subject: [PATCH 26/57] stage5: Remove realvnc packages, since they weren't provided for Trixie --- stage4/00-install-packages/00-packages-nr | 1 - stage5/00-install-extras/00-packages | 1 - 2 files changed, 2 deletions(-) diff --git a/stage4/00-install-packages/00-packages-nr b/stage4/00-install-packages/00-packages-nr index b904b80..88c1cd4 100644 --- a/stage4/00-install-packages/00-packages-nr +++ b/stage4/00-install-packages/00-packages-nr @@ -1,2 +1 @@ pi-package -realvnc-vnc-server diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 406a548..39c947b 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -2,6 +2,5 @@ mu-editor scratch3 wolfram-engine claws-mail -realvnc-vnc-viewer code-the-classics code-the-classics-2 kicad From 556087cd0604dc289efce6de2a4665c75351f5aa Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:07:29 +0100 Subject: [PATCH 27/57] stage5: Remove wolfram-engine, since it wasn't provided for Trixie --- stage5/00-install-extras/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 39c947b..dd5fbe4 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -1,6 +1,5 @@ mu-editor scratch3 -wolfram-engine claws-mail code-the-classics code-the-classics-2 kicad From d4cd8f9a57bc6afda5077a3f4b1778f81edd5e02 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 14:07:49 +0100 Subject: [PATCH 28/57] stage5: Remove scratch3, since it wasn't provided for Trixie --- stage5/00-install-extras/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index dd5fbe4..4ecebb7 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -1,5 +1,4 @@ mu-editor -scratch3 claws-mail code-the-classics code-the-classics-2 kicad From b434ecdf5d2330f1e4dc9f2912023dbbe47f3abd Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 17:00:46 +0100 Subject: [PATCH 29/57] stage0: Use Debian as base arm64 repo --- stage0/00-configure-apt/00-run.sh | 4 ++-- stage0/00-configure-apt/files/debian.sources | 11 +++++++++++ stage0/00-configure-apt/files/raspbian.sources | 6 ------ 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 stage0/00-configure-apt/files/debian.sources delete mode 100644 stage0/00-configure-apt/files/raspbian.sources diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index 8e47893..f3e95b0 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -1,9 +1,9 @@ #!/bin/bash -e true > "${ROOTFS_DIR}/etc/apt/sources.list" -install -m 644 files/raspbian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" +install -m 644 files/debian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" -sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspbian.sources" +sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/debian.sources" sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.sources" if [ -n "$APT_PROXY" ]; then diff --git a/stage0/00-configure-apt/files/debian.sources b/stage0/00-configure-apt/files/debian.sources new file mode 100644 index 0000000..cabf3b5 --- /dev/null +++ b/stage0/00-configure-apt/files/debian.sources @@ -0,0 +1,11 @@ +Types: deb +URIs: http://deb.debian.org/debian/ +Suites: RELEASE RELEASE-updates +Components: main contrib non-free non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp + +Types: deb +URIs: http://deb.debian.org/debian-security/ +Suites: RELEASE-security +Components: main contrib non-free non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources deleted file mode 100644 index 0f2e26f..0000000 --- a/stage0/00-configure-apt/files/raspbian.sources +++ /dev/null @@ -1,6 +0,0 @@ -Types: deb -URIs: http://raspbian.raspberrypi.com/raspbian/ -Arch: armhf -Suites: RELEASE -Components: main contrib non-free rpi -Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg From 9a0758bedec681c69d3bd627b220462ca48863b2 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 17:00:59 +0100 Subject: [PATCH 30/57] Revert "Remove rpi-imager (armhf builds no longer provided)" This reverts commit c4adcfca4ff629ef08a228428f08faaeb2fa76fa. --- stage4/00-install-packages/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 6531427..285bccd 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -20,6 +20,7 @@ rp-prefapps ffmpeg vlc rpi-connect +rpi-imager labwc squeekboard From ea8117d5811ad55c3725f1f44707b764339e2059 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 19 Aug 2025 17:20:48 +0100 Subject: [PATCH 31/57] stage5: Remove mu-editor, since it wasn't provided for Trixie --- stage5/00-install-extras/00-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 4ecebb7..1c1e794 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -1,4 +1,3 @@ -mu-editor claws-mail code-the-classics code-the-classics-2 kicad From 3bcd9d452a56f43bfc62e88bf797d81ea46b524a Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 4 Aug 2025 10:03:20 +0100 Subject: [PATCH 32/57] Switch stage3 to use meta-packages --- stage3/00-install-packages/00-packages | 19 ------------------- stage3/00-install-packages/00-packages-nr | 10 ++-------- stage3/00-install-packages/01-run.sh | 5 ----- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 stage3/00-install-packages/00-packages delete mode 100755 stage3/00-install-packages/01-run.sh diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages deleted file mode 100644 index e3e2e0c..0000000 --- a/stage3/00-install-packages/00-packages +++ /dev/null @@ -1,19 +0,0 @@ -gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav -evince gtk2-engines alsa-utils -desktop-base -git -gvfs -rfkill -chromium rpi-chromium-mods libwidevinecdm0 -firefox rpi-firefox-mods -gldriver-test -fonts-droid-fallback -fonts-liberation2 -obconf -raindrop -libcamera-tools -rpicam-apps -python3-picamera2 -python3-pyqt5 -python3-opengl -vulkan-tools mesa-vulkan-drivers diff --git a/stage3/00-install-packages/00-packages-nr b/stage3/00-install-packages/00-packages-nr index bd310cf..fec8391 100644 --- a/stage3/00-install-packages/00-packages-nr +++ b/stage3/00-install-packages/00-packages-nr @@ -1,8 +1,2 @@ -xserver-xorg-video-fbdev xserver-xorg xinit -mousepad -eom -lxde lxtask menu-xdg -zenity xdg-utils -gvfs-backends gvfs-fuse -lightdm gnome-themes-extra-data gnome-icon-theme -gnome-keyring +rpd-wayland-core +rpd-x-core diff --git a/stage3/00-install-packages/01-run.sh b/stage3/00-install-packages/01-run.sh deleted file mode 100755 index 7fb0f4b..0000000 --- a/stage3/00-install-packages/01-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -on_chroot <<- EOF - apt-mark auto python3-pyqt5 python3-opengl -EOF From 349a6a0ae0de94e0b82467353c22e00d876eedac Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 4 Aug 2025 10:06:13 +0100 Subject: [PATCH 33/57] Switch stage4 to use meta-packages --- stage4/00-install-packages/00-debconf | 2 -- stage4/00-install-packages/00-packages | 33 ++++--------------- stage4/00-install-packages/00-packages-nr | 1 - stage4/00-install-packages/02-packages | 4 --- stage4/01-console-autologin/00-run.sh | 5 --- .../01-run.sh => 01-print-support/00-run.sh} | 0 stage4/04-enable-xcompmgr/00-run.sh | 5 --- stage4/05-print-support/00-packages | 1 - stage4/06-enable-wayland/00-run.sh | 5 --- 9 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 stage4/00-install-packages/00-debconf delete mode 100644 stage4/00-install-packages/00-packages-nr delete mode 100644 stage4/00-install-packages/02-packages delete mode 100755 stage4/01-console-autologin/00-run.sh rename stage4/{05-print-support/01-run.sh => 01-print-support/00-run.sh} (100%) delete mode 100755 stage4/04-enable-xcompmgr/00-run.sh delete mode 100644 stage4/05-print-support/00-packages delete mode 100755 stage4/06-enable-wayland/00-run.sh diff --git a/stage4/00-install-packages/00-debconf b/stage4/00-install-packages/00-debconf deleted file mode 100644 index 87932e2..0000000 --- a/stage4/00-install-packages/00-debconf +++ /dev/null @@ -1,2 +0,0 @@ -# Enable realtime process priority? -jackd2 jackd/tweak_rt_limits boolean true diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 6531427..5dde25f 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -1,27 +1,8 @@ -python3-pygame -python3-tk thonny -python3-pgzero -python3-serial -debian-reference-en -rpd-wayland-core rpd-x-core +rpd-applications +rpd-developer +rpd-graphics +rpd-preferences rpd-theme -rpd-utilities rpd-preferences -python3-pip -python3-numpy -rc-gui sense-hat -tree -libgl1-mesa-dri libgles1 xcompmgr -geany -piclone -python3-flask -pprompt -piwiz -rp-prefapps -ffmpeg -vlc -rpi-connect -labwc -squeekboard - -# ninja-build and openocd needed for vscode pico extension -meson openocd +rpd-utilities +rpd-wayland-extras +rpd-x-extras diff --git a/stage4/00-install-packages/00-packages-nr b/stage4/00-install-packages/00-packages-nr deleted file mode 100644 index 88c1cd4..0000000 --- a/stage4/00-install-packages/00-packages-nr +++ /dev/null @@ -1 +0,0 @@ -pi-package diff --git a/stage4/00-install-packages/02-packages b/stage4/00-install-packages/02-packages deleted file mode 100644 index fc43d17..0000000 --- a/stage4/00-install-packages/02-packages +++ /dev/null @@ -1,4 +0,0 @@ -hunspell-en-gb -hyphen-en-gb -wamerican -wbritish diff --git a/stage4/01-console-autologin/00-run.sh b/stage4/01-console-autologin/00-run.sh deleted file mode 100755 index 665dcdb..0000000 --- a/stage4/01-console-autologin/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_behaviour B4 -EOF diff --git a/stage4/05-print-support/01-run.sh b/stage4/01-print-support/00-run.sh similarity index 100% rename from stage4/05-print-support/01-run.sh rename to stage4/01-print-support/00-run.sh diff --git a/stage4/04-enable-xcompmgr/00-run.sh b/stage4/04-enable-xcompmgr/00-run.sh deleted file mode 100755 index ad6298d..0000000 --- a/stage4/04-enable-xcompmgr/00-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -on_chroot << EOF - raspi-config nonint do_xcompmgr 0 -EOF diff --git a/stage4/05-print-support/00-packages b/stage4/05-print-support/00-packages deleted file mode 100644 index 462d36c..0000000 --- a/stage4/05-print-support/00-packages +++ /dev/null @@ -1 +0,0 @@ -cups diff --git a/stage4/06-enable-wayland/00-run.sh b/stage4/06-enable-wayland/00-run.sh deleted file mode 100755 index bd8bbc3..0000000 --- a/stage4/06-enable-wayland/00-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -on_chroot << EOF - SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W2 -EOF From bd0a6abb8d43f6c7ef7db5bc63cbc2d5ee5e55e1 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 4 Aug 2025 21:00:32 +0100 Subject: [PATCH 34/57] Move print support, rpd-theme and rpd-preferences to stage3 --- stage3/00-install-packages/00-packages | 2 ++ {stage4 => stage3}/01-print-support/00-run.sh | 0 stage4/00-install-packages/00-packages | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 stage3/00-install-packages/00-packages rename {stage4 => stage3}/01-print-support/00-run.sh (100%) diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages new file mode 100644 index 0000000..3aa1ae8 --- /dev/null +++ b/stage3/00-install-packages/00-packages @@ -0,0 +1,2 @@ +rpd-preferences +rpd-theme diff --git a/stage4/01-print-support/00-run.sh b/stage3/01-print-support/00-run.sh similarity index 100% rename from stage4/01-print-support/00-run.sh rename to stage3/01-print-support/00-run.sh diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages index 5dde25f..85311f8 100644 --- a/stage4/00-install-packages/00-packages +++ b/stage4/00-install-packages/00-packages @@ -1,8 +1,6 @@ rpd-applications rpd-developer rpd-graphics -rpd-preferences -rpd-theme rpd-utilities rpd-wayland-extras rpd-x-extras From 8887a8834d748124ce29429347ac6758fdf1f2db Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 22 Aug 2025 11:00:51 +0100 Subject: [PATCH 35/57] export-image: pre-populate apt-listchanges database --- export-image/05-finalise/01-run.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index 251b4df..b39c905 100755 --- a/export-image/05-finalise/01-run.sh +++ b/export-image/05-finalise/01-run.sh @@ -5,13 +5,17 @@ INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info" SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom" BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap" -on_chroot << EOF -update-initramfs -k all -c -if hash hardlink 2>/dev/null; then - hardlink -t /usr/share/doc -fi -install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync/clock -install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock +on_chroot <<- EOF + update-initramfs -k all -c + if hash hardlink 2>/dev/null; then + hardlink -t /usr/share/doc + fi + if [ -f /usr/lib/systemd/system/apt-listchanges.service ]; then + python3 -m apt_listchanges.populate_database --profile apt + systemctl disable apt-listchanges.timer + fi + install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync/clock + install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock EOF if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then From f0f91453e0e65af0ce3cf5467642929317330d51 Mon Sep 17 00:00:00 2001 From: XECDesign Date: Fri, 5 Sep 2025 12:25:40 +0100 Subject: [PATCH 36/57] Add missing dependency to README and switch from apt-get to apt Fixes #869 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71e5325..a4e361b 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ below. To install the required dependencies for `pi-gen` you should run: ```bash -apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ +apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ dosfstools e2fsprogs libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \ -gpg pigz xxd arch-test bmap-tools +gpg pigz xxd arch-test bmap-tools kmod ``` The file `depends` contains a list of tools needed. The format of this From 3bfeac64245f249f75e80dd596279165ea558755 Mon Sep 17 00:00:00 2001 From: XECDesign Date: Fri, 5 Sep 2025 12:28:59 +0100 Subject: [PATCH 37/57] stage0: Change 'Arch' to 'Architectures' in raspbian.sources Fixes #867 --- stage0/00-configure-apt/files/raspbian.sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources index 0f2e26f..5947190 100644 --- a/stage0/00-configure-apt/files/raspbian.sources +++ b/stage0/00-configure-apt/files/raspbian.sources @@ -1,6 +1,6 @@ Types: deb URIs: http://raspbian.raspberrypi.com/raspbian/ -Arch: armhf +Architectures: armhf Suites: RELEASE Components: main contrib non-free rpi Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg From c3848a3a37464e3cf484349f67b558fbedb97230 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 3 Sep 2025 20:51:10 +0100 Subject: [PATCH 38/57] README.md: mention first run wizard in FIRST_USER_NAME documentation --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a4e361b..4f7002e 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,8 @@ The following environment variables are supported: a name chosen by the final user. This security feature is designed to prevent shipping images with a default username and help prevent malicious actors from taking over your devices. + If the FIRST_USER_NAME is set to `pi` and no `FIRST_USER_PASS` is set, the setup wizard will be launched on first boot to allow the user to set the password. + * `FIRST_USER_PASS` (Default: unset) Password for the first user. If unset, the account is locked. From 05071a97eaf515e57a694206608346b30fdf236b Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 3 Sep 2025 20:53:07 +0100 Subject: [PATCH 39/57] build.sh: log skipped non-executable run.sh files --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index 23f9585..98cece8 100755 --- a/build.sh +++ b/build.sh @@ -68,6 +68,8 @@ EOF log "Begin ${SUB_STAGE_DIR}/${i}-run.sh" ./${i}-run.sh log "End ${SUB_STAGE_DIR}/${i}-run.sh" + elif [ -f ${i}-run.sh ]; then + log "Skip ${SUB_STAGE_DIR}/${i}-run.sh (not executable)" fi if [ -f ${i}-run-chroot.sh ]; then log "Begin ${SUB_STAGE_DIR}/${i}-run-chroot.sh" From 7f6d20cae166e21e7a9d158e773ffb7e087d943e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 3 Sep 2025 20:53:37 +0100 Subject: [PATCH 40/57] Whitespace fixes --- stage1/01-sys-tweaks/00-run.sh | 2 -- stage2/01-sys-tweaks/01-run.sh | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index e024701..b7e5b5e 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -12,5 +12,3 @@ if [ -n "${FIRST_USER_PASS}" ]; then fi echo "root:root" | chpasswd EOF - - diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 93bc36d..be0e8cd 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -30,6 +30,7 @@ on_chroot < Date: Thu, 4 Sep 2025 19:11:34 +0100 Subject: [PATCH 41/57] stage4: Disable wayvnc --- stage4/01-disable-wayvnc/00-run.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 stage4/01-disable-wayvnc/00-run.sh diff --git a/stage4/01-disable-wayvnc/00-run.sh b/stage4/01-disable-wayvnc/00-run.sh new file mode 100755 index 0000000..059efca --- /dev/null +++ b/stage4/01-disable-wayvnc/00-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot <<- EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_vnc 1 +EOF From 734e1a634912d73d31f407b3668ed00e5f2e7609 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 5 Sep 2025 13:56:59 +0100 Subject: [PATCH 42/57] Revert "stage5: Remove scratch3, since it wasn't provided for Trixie" This reverts commit d4cd8f9a57bc6afda5077a3f4b1778f81edd5e02. --- stage5/00-install-extras/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages index 4ecebb7..dd5fbe4 100644 --- a/stage5/00-install-extras/00-packages +++ b/stage5/00-install-extras/00-packages @@ -1,4 +1,5 @@ mu-editor +scratch3 claws-mail code-the-classics code-the-classics-2 kicad From 372e56363338c0dd2f5bc5fa5f2e4d147685b23d Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Thu, 28 Aug 2025 15:28:59 +0100 Subject: [PATCH 43/57] Add cloud-init support Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- README.md | 4 + build.sh | 2 + stage2/04-cloud-init/00-packages | 1 + stage2/04-cloud-init/01-run.sh | 28 +++++ stage2/04-cloud-init/README.txt | 14 +++ .../files/00-network-manager-all.yaml | 3 + .../04-cloud-init/files/99_raspberry-pi.cfg | 24 +++++ stage2/04-cloud-init/files/meta-data | 18 ++++ stage2/04-cloud-init/files/network-config | 50 +++++++++ stage2/04-cloud-init/files/user-data | 102 ++++++++++++++++++ 10 files changed, 246 insertions(+) create mode 100644 stage2/04-cloud-init/00-packages create mode 100755 stage2/04-cloud-init/01-run.sh create mode 100644 stage2/04-cloud-init/README.txt create mode 100644 stage2/04-cloud-init/files/00-network-manager-all.yaml create mode 100644 stage2/04-cloud-init/files/99_raspberry-pi.cfg create mode 100644 stage2/04-cloud-init/files/meta-data create mode 100644 stage2/04-cloud-init/files/network-config create mode 100644 stage2/04-cloud-init/files/user-data diff --git a/README.md b/README.md index 4f7002e..f2ec148 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,10 @@ The following environment variables are supported: 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. + * `ENABLE_CLOUD_INIT` (Default: `1`) + + If set to `1`, cloud-init and netplan will be installed and configured. This will allow you to configure your Raspberry Pi using cloud-init configuration files. The cloud-init configuration files should be placed in the bootfs or by editing the files in `stage2/04-cloud-init/files`. Cloud-init will be configured to read them on first boot. + A simple example for building Raspberry Pi OS: ```bash diff --git a/build.sh b/build.sh index 98cece8..8e7215a 100755 --- a/build.sh +++ b/build.sh @@ -244,6 +244,8 @@ export QUILT_NO_DIFF_INDEX=1 export QUILT_NO_DIFF_TIMESTAMPS=1 export QUILT_REFRESH_ARGS="-p ab" +export ENABLE_CLOUD_INIT=${ENABLE_CLOUD_INIT:-1} + # shellcheck source=scripts/common source "${SCRIPT_DIR}/common" # shellcheck source=scripts/dependencies_check diff --git a/stage2/04-cloud-init/00-packages b/stage2/04-cloud-init/00-packages new file mode 100644 index 0000000..db064e6 --- /dev/null +++ b/stage2/04-cloud-init/00-packages @@ -0,0 +1 @@ +cloud-init diff --git a/stage2/04-cloud-init/01-run.sh b/stage2/04-cloud-init/01-run.sh new file mode 100755 index 0000000..e4b8c64 --- /dev/null +++ b/stage2/04-cloud-init/01-run.sh @@ -0,0 +1,28 @@ +#!/bin/bash -e + +if [ "${ENABLE_CLOUD_INIT}" != "1" ]; then + log "Skipping cloud-init stage" + exit 0 +fi + +install -v -D -m 644 -t "${ROOTFS_DIR}/etc/cloud/cloud.cfg.d/" files/99_raspberry-pi.cfg + +# some preseeding without any runtime effect yet +# install meta-data file for NoCloud data-source to work +install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data" +install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data" +install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config" + +# setup default netplan config which will instruct netplan to pass control over to network-manager +# at boot time. This will make NetworkManager manage all devices and by default. +# Any Ethernet device will come up with DHCP, once carrier is detected +install -v -D -m 600 -t "${ROOTFS_DIR}/lib/netplan/" files/00-network-manager-all.yaml + +if [ -n "${FIRST_USER_NAME}" ]; then + # set the default user name to the one provided via FIRST_USER_NAME + # this will make cloud-init create the user with that name instead of 'pi' + sed -i "s/name: pi/name: ${FIRST_USER_NAME}/" "${ROOTFS_DIR}/etc/cloud/cloud.cfg" +else + # remove the users:\n - default section from cloud.cfg + sed -i "/^users:/,/^- default/d" "${ROOTFS_DIR}/etc/cloud/cloud.cfg" +fi diff --git a/stage2/04-cloud-init/README.txt b/stage2/04-cloud-init/README.txt new file mode 100644 index 0000000..cbe448d --- /dev/null +++ b/stage2/04-cloud-init/README.txt @@ -0,0 +1,14 @@ +Cloud-init support for Raspberry Pi OS + +Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#raspberry-pi-configuration + +- files/network-config is required because otherwise imager would fail to create the correct filesystem entry + +- files/user-data same reason and to include some example configurations + +- files/meta-data Cloud-init instance configuration + +- files/99_raspberry-pi.cfg Cloud-init datasource configuration + +- files/00-network-manager-all.yaml Example from netplan docs/ubuntu for handing over control from +netplan to NetworkManager by default. diff --git a/stage2/04-cloud-init/files/00-network-manager-all.yaml b/stage2/04-cloud-init/files/00-network-manager-all.yaml new file mode 100644 index 0000000..b654768 --- /dev/null +++ b/stage2/04-cloud-init/files/00-network-manager-all.yaml @@ -0,0 +1,3 @@ +network: + version: 2 + renderer: NetworkManager diff --git a/stage2/04-cloud-init/files/99_raspberry-pi.cfg b/stage2/04-cloud-init/files/99_raspberry-pi.cfg new file mode 100644 index 0000000..0b85080 --- /dev/null +++ b/stage2/04-cloud-init/files/99_raspberry-pi.cfg @@ -0,0 +1,24 @@ +# configure cloud-init with NoCloud + +datasource_list: [ NoCloud, None ] +datasource: + NoCloud: + seedfrom: file:///boot/firmware + +power_state: + delay: now + mode: reboot + message: Rebooting machine to enable usb gadget mode + condition: test -f /etc/modules-load.d/usb-gadget.conf + +# Disable SSH host key generation +# regenerate_ssh_host_keys.service will take care +# of it on first boot +ssh_deletekeys: false +# Disable generation as it could be that the new keys +# aren't available yet when the service runs. +# also they are really only needed for the ssh service +# which will only run after the keys are already present +# so we don't schedule cloud-init after key generation +# as that would delay first boot too much +ssh_genkeytypes: [] diff --git a/stage2/04-cloud-init/files/meta-data b/stage2/04-cloud-init/files/meta-data new file mode 100644 index 0000000..ac36efd --- /dev/null +++ b/stage2/04-cloud-init/files/meta-data @@ -0,0 +1,18 @@ +# This is the meta-data configuration file for cloud-init. Please refer to the +# cloud-init documentation for more information: +# +# https://cloudinit.readthedocs.io/ + +# Set the datasource mode to "local". This ensures that user-data is acted upon +# prior to bringing up the network (because everything about the datasource is +# assumed to be local). If you wish to use an HTTP datasource instead, you can +# change this to "net" or override it on the kernel cmdline (see README). +dsmode: local + +# Specifies the "unique" identifier of the instance. Typically in cloud-init +# this is generated by the owning cloud and is actually unique (to some +# degree). Here our data-source is local, so this is just a fixed string. +# Warning: changing this will cause cloud-init to assume it is running on a +# "new" instance, and to go through first time setup again (the value is +# compared to a cached copy). +instance_id: rpios-image diff --git a/stage2/04-cloud-init/files/network-config b/stage2/04-cloud-init/files/network-config new file mode 100644 index 0000000..2bfc7ad --- /dev/null +++ b/stage2/04-cloud-init/files/network-config @@ -0,0 +1,50 @@ +# This file contains a netplan-compatible configuration which cloud-init will +# apply on first-boot (note: it will *not* update the config after the first +# boot). Please refer to the cloud-init documentation and the netplan reference +# for full details: +# +# https://netplan.io/reference +# https://cloudinit.readthedocs.io/en/latest/topics/network-config.html +# https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html +# +# Please note that the YAML format employed by this file is sensitive to +# differences in whitespace; if you are editing this file in an editor (like +# Notepad) which uses literal tabs, take care to only use spaces for +# indentation. See the following link for more details: +# +# https://en.wikipedia.org/wiki/YAML +# +# Additionally, please be aware that if your boot sequence depends on active +# networking (e.g. if your cloud-init configuration pulls packages or SSH +# keys from the network), you *must* mark at least one interface as required +# ("optional: false") below. Otherwise, particularly on faster boards, +# cloud-init will start attempting to use the network before it is ready + +# Some additional examples are commented out below + +#network: +# version: 2 +# +# ethernets: +# eth0: +# dhcp4: true +# optional: true + +# wifis: +# wlan0: +# dhcp4: true +# optional: true +# access-points: +# myhomewifi: +# password: "S3kr1t" +# myworkwifi: +# password: "correct battery horse staple" +# workssid: +# auth: +# key-management: eap +# method: peap +# identity: "me@example.com" +# password: "passw0rd" +# ca-certificate: /etc/my_ca.pem + +# regulatory-domain: GB diff --git a/stage2/04-cloud-init/files/user-data b/stage2/04-cloud-init/files/user-data new file mode 100644 index 0000000..ce34257 --- /dev/null +++ b/stage2/04-cloud-init/files/user-data @@ -0,0 +1,102 @@ +#cloud-config + +# This is the user-data configuration file for cloud-init. By default this sets +# up an initial user called "ubuntu" with password "ubuntu", which must be +# changed at first login. However, many additional actions can be initiated on +# first boot from this file. The cloud-init documentation has more details: +# +# https://cloudinit.readthedocs.io/ +# +# Please note that the YAML format employed by this file is sensitive to +# differences in whitespace; if you are editing this file in an editor (like +# Notepad) which uses literal tabs, take care to only use spaces for +# indentation. See the following link for more details: +# +# https://en.wikipedia.org/wiki/YAML +# +# Some additional examples are provided in comments below the default +# configuration. + +## Set the system's hostname. Please note that, unless you have a local DNS +## setup where the hostname is derived from DHCP requests (as with dnsmasq), +## setting the hostname here will not make the machine reachable by this name. +## You may also wish to install avahi-daemon (see the "packages:" key below) +## to make your machine reachable by the .local domain +#hostname: raspberrypi + +## Set up the keyboard layout. See localectl(1), in particular the various +## list-x11-* sub-commands, to determine the available models, layouts, +## variants, and options +#keyboard: +# model: pc105 +# layout: gb +# variant: +# options: ctrl:nocaps + +# Controls password authentication with the SSH daemon; the default here can +# prevent logging into SSH with a password. Changing this is a security risk +# and you should at the very least ensure a different default password is +# specified above +#ssh_pwauth: false + +## On first boot, use ssh-import-id to give the specific users SSH access to +## the default user +#ssh_import_id: +#- lp:my_launchpad_username +#- gh:my_github_username + +## Add users and groups to the system, and import keys with the ssh-import-id +## utility +#groups: +#- robot: [robot] +#- robotics: [robot] +#- pi +# +#users: +#- default +#- name: robot +# gecos: Mr. Robot +# primary_group: robot +# groups: users +# ssh_import_id: foobar +# lock_passwd: false +# passwd: $5$hkui88$nvZgIle31cNpryjRfO9uArF7DYiBcWEnjqq7L1AQNN3 + +## Update apt database and upgrade packages on first boot +#package_update: true +#package_upgrade: true + +## Install additional packages on first boot +#packages: +#- avahi-daemon +#- rng-tools +#- python3-gpiozero +#- [python3-serial, 3.5-1] + +## Write arbitrary files to the file-system (including binaries!) +#write_files: +#- path: /etc/default/console-setup +# content: | +# # Consult the console-setup(5) manual page. +# ACTIVE_CONSOLES="/dev/tty[1-6]" +# CHARMAP="UTF-8" +# VIDEOMODE= +# FONT="Lat15-Terminus18x10.psf.gz" +# FONTFACE= +# FONTSIZE= +# CODESET="Lat15" +# permissions: '0644' +# owner: root:root +#- encoding: gzip +# path: /root/Makefile +# content: !!binary | +# H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi +# dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS +# NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA +# owner: root:root +# permissions: '0644' + +## Run arbitrary commands at rc.local like time +#runcmd: +#- [ ls, -l, / ] +#- [ sh, -xc, "echo $(date) ': hello world!'" ] From 0a8f9826ceb438145e8362dbfbdcdef3600f00c5 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 22 Sep 2025 09:52:38 +0100 Subject: [PATCH 44/57] stage2: Enable first boot resize and fstrim service --- stage2/01-sys-tweaks/01-run.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index be0e8cd..6da2876 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -26,14 +26,16 @@ if [ "${USE_QEMU}" = "1" ]; then echo "leaving QEMU mode" fi -on_chroot < Date: Mon, 29 Sep 2025 12:09:22 +0100 Subject: [PATCH 45/57] Partially disable cloud-init --- stage2/04-cloud-init/01-run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stage2/04-cloud-init/01-run.sh b/stage2/04-cloud-init/01-run.sh index e4b8c64..5ccebdf 100755 --- a/stage2/04-cloud-init/01-run.sh +++ b/stage2/04-cloud-init/01-run.sh @@ -9,9 +9,9 @@ install -v -D -m 644 -t "${ROOTFS_DIR}/etc/cloud/cloud.cfg.d/" files/99_raspberr # some preseeding without any runtime effect yet # install meta-data file for NoCloud data-source to work -install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data" -install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data" -install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config" +#install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data" +#install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data" +#install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config" # setup default netplan config which will instruct netplan to pass control over to network-manager # at boot time. This will make NetworkManager manage all devices and by default. From 0dfd9a5f4c3ff666f69999381728c979522c0174 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 30 Sep 2025 09:10:03 +0100 Subject: [PATCH 46/57] stage2: install rpi-keyboard-config and rpi-keyboard-fw-update --- stage2/01-sys-tweaks/00-packages | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index a1c419e..8511c5f 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -36,3 +36,5 @@ file kms++-utils python3-venv bluez bluez-firmware +rpi-keyboard-config +rpi-keyboard-fw-update From 7385adde4cd7a2bfcf6e6ef0e5b790391c172a8d Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 30 Sep 2025 08:58:35 +0100 Subject: [PATCH 47/57] Update release notes --- .../00-release/files/release_notes.txt | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index 3223355..155c719 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,5 +1,39 @@ UNRELEASED: - * + * Based on Debian Trixie release + * New plugin-based Control Centre application + * Plugins for same built from existing Raspberry Pi Configuration, Appearance + Settings, Mouse and Keyboard Settings, Screen Configuration and Printer + Settings applications; code and functionality identical + * New icon theme, PiXtrix + * New GTK themes, PiXtrix (standard) and PiXonyx (dark) + * New desktop wallpapers + * New system font, Nunito Sans Light + * lxpanel replaced with forked lxpanel-pi; unsupported plugins removed + * lxpanelctl replaced with lxpanelctl-pi command-line application + * New System Monitor plugin added to taskbar for power and other warnings + * New shared Clock plugin added for wf-panel-pi and lxpanel-pi taskbars + * Main menu shortcuts to Raspberry Pi website removed and replaced with + pre-loaded bookmarks in Chromium and Firefox + * Main menu shortcut to Raspberry Pi Beginner's Guide added + * Bookshelf application now displays contributor-only titles and includes + option to contribute to unlock them + * SenseHAT Emulator reinstated in Recommended Software + * labwc updated to version 0.8.4 + * General keyboard control improvements in GTK applications + * International translations of user guides installed by startup wizard as + appropriate + * raspberrypi-ui-mods package removed - replaced with structured metapackage, + rpd-metas + * Shutdown helper does not offer lock screen option when invoked by a user + who has no password set + * Chromium updated to version 140.0.7339.185 + * Firefox updated to version 142.0.1 + * Debian Reference no longer included + * Alacarte menu editor no longer included + * Remote GPIO option removed from Control Centre + * Added rpi-keyboard-config and rpi-keyboard-fw-update + * Raspberry Pi firmware 676efed1194de38975889a34276091da1f5aadd3 + * Linux kernel 6.12.47 - 359f37f0faefb712add32a39f98751aea67d5c1f 2025-05-13: * Setting touchscreen in Screen Configuration does not delete default associations for greeter * Bug fix - wizard keyboard setting correctly transferred into desktop From c2096dbf89928328fe2582acc161f3604fdf163f Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:03:40 +0000 Subject: [PATCH 48/57] Drop powerstate change hook for rpi-usb-gadget Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- stage2/04-cloud-init/files/99_raspberry-pi.cfg | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stage2/04-cloud-init/files/99_raspberry-pi.cfg b/stage2/04-cloud-init/files/99_raspberry-pi.cfg index 0b85080..ffc0994 100644 --- a/stage2/04-cloud-init/files/99_raspberry-pi.cfg +++ b/stage2/04-cloud-init/files/99_raspberry-pi.cfg @@ -5,12 +5,6 @@ datasource: NoCloud: seedfrom: file:///boot/firmware -power_state: - delay: now - mode: reboot - message: Rebooting machine to enable usb gadget mode - condition: test -f /etc/modules-load.d/usb-gadget.conf - # Disable SSH host key generation # regenerate_ssh_host_keys.service will take care # of it on first boot From db9a45ca9d64b87098de0f7c43b69956cb5c05b1 Mon Sep 17 00:00:00 2001 From: paulober Date: Mon, 6 Oct 2025 10:46:18 +0000 Subject: [PATCH 49/57] cloud-init support: Disable emmiting keys to console by default Signed-off-by: paulober --- stage2/04-cloud-init/files/99_raspberry-pi.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stage2/04-cloud-init/files/99_raspberry-pi.cfg b/stage2/04-cloud-init/files/99_raspberry-pi.cfg index ffc0994..f699abf 100644 --- a/stage2/04-cloud-init/files/99_raspberry-pi.cfg +++ b/stage2/04-cloud-init/files/99_raspberry-pi.cfg @@ -5,6 +5,11 @@ datasource: NoCloud: seedfrom: file:///boot/firmware +# Leave SSH key emission to console disabled so that +# users can decide whether to enable it manually. +ssh: + emit_keys_to_console: false + # Disable SSH host key generation # regenerate_ssh_host_keys.service will take care # of it on first boot From ba8b9bcb608a2e237c825d616715097e5f8e3f2f Mon Sep 17 00:00:00 2001 From: paulober Date: Mon, 6 Oct 2025 11:17:22 +0000 Subject: [PATCH 50/57] Disable ssh fingerprint to console Signed-off-by: paulober --- stage2/04-cloud-init/files/99_raspberry-pi.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/stage2/04-cloud-init/files/99_raspberry-pi.cfg b/stage2/04-cloud-init/files/99_raspberry-pi.cfg index f699abf..7134d90 100644 --- a/stage2/04-cloud-init/files/99_raspberry-pi.cfg +++ b/stage2/04-cloud-init/files/99_raspberry-pi.cfg @@ -9,6 +9,7 @@ datasource: # users can decide whether to enable it manually. ssh: emit_keys_to_console: false +no_ssh_fingerprints: true # Disable SSH host key generation # regenerate_ssh_host_keys.service will take care From 3b77da7113f69f614dcb734a88d1415b885acccf Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 9 Oct 2025 14:37:29 +0100 Subject: [PATCH 51/57] stage2: preseed console-setup/charmap47 --- stage2/01-sys-tweaks/00-debconf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stage2/01-sys-tweaks/00-debconf b/stage2/01-sys-tweaks/00-debconf index 5e3340b..724f839 100644 --- a/stage2/01-sys-tweaks/00-debconf +++ b/stage2/01-sys-tweaks/00-debconf @@ -1,3 +1,6 @@ +# Encoding to use on the console: +# 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 +console-setup console-setup/charmap47 select UTF-8 # Character set to support: # 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 console-setup console-setup/codeset47 select Guess optimal character set From 67336fe8b5512150a76c6cf73d1fd447e5c88de3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 16 Oct 2025 15:13:28 +0100 Subject: [PATCH 52/57] Update Raspberry Pi Archive signing key --- stage0/files/raspberrypi.gpg | Bin 2424 -> 2498 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/stage0/files/raspberrypi.gpg b/stage0/files/raspberrypi.gpg index fe1d207eb1ec50f159e3b99415dd00b363262fb4..25990a4fe07d71b2acf271d21ae28eb8d60dbc09 100644 GIT binary patch delta 707 zcmew%bVzuE2_w5di!dV>gXLsLMwxmsMV9kjQeT-CtgN1g=rVimNh{~&{tjMe4&UkAbK`rS zZ1a-HdMoi(2MKmd`Cv|;s_118gIhKiG6^x(o3Tg$15klUng?I-Ng@ZIRSNq*opzoD ze-ECyqU)NU_`7@i=Dc^Gf;?gliGSEr(_Z@Oz=u`OLbn8}0@rExmAKX3E`sDkEi+f5Z zC4T!bVe9OiB#o7+&qTDW{Z=xz`%b!)dt`oSoW+raA&io*B1#*cU2~f2t>Y~6U0gh< zP|{u7eLHWB@QcS2t`)G&>6Z$8`bkgymYMMVHnZXrH~sc-XUPd<`u&S|8L&AuK|#gR zOlYB!hNSO=>zSvt{dPTi+p+LM$(_WM;5`w~F6~)SzW2(*?T&x@KQx?}WaA)LtyR}= zzmmn@qyIqf=H)B`jC>n-7#PwE(is`RVDffWAD9pmL})WJn++p78v`>?6~ksHc4H6ZjIaGyx4b1QP)Q03rnfPu=d1lRE(%lW+zEe}b_ol7FKxK2EO(|7m#e zcOvN&^fu@@qJF+Vd znnu_iT12_xf4DyH@v+e_X^KwL11)|w5_x=Rup}jj4O*6RK0xw1rlyW4+N_167(>F5 zr4bjnICqW*y@+XSvktF4X6W8Q&W5@AdbgHnpL!*V#wrC}PlwBv;j{xfmNi@F*jo>3 z+Fy^iEpWY}jCOumke@2BqbJ#^SQ0_40pnVPLXR!g61@6DRO0RS%q=)(Z4u(I0ssTE zgaQ%)e;))G0RjLC1p-gq?vDZ+3;+rV5Q4EOl7FKxK1GTL|8#)0s?f|$ySXC5Ik}V9 z>wI!`p)o+#ANR*9N~1b^(1E<96}cHuj?aw4C*{aG2%pQ7@JQk$e^GoD^z63SP_U?mQKY~Vq(+T&PvYI; z@PeEd?Ft@o*y~wL<&jXlPv5MzJh7EDU#j+)X!pvo`4Ta{njb*V{NrYFax=-lI2A(0 zxGg_*DS!mwHDBnM@KDZ&WI7@>#rk)=&V<*{iWSqcc$sIa)nulj{Xcvqc6x R0RsX61G9(+GXetw00RS*EZYD8 From bbe5f22cb812e73f3e037b9f4e36c8e2d1796f97 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 16 Oct 2025 15:29:04 +0100 Subject: [PATCH 53/57] stage2: install rpi-usb-gadget --- stage2/01-sys-tweaks/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 8511c5f..9f48c32 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -38,3 +38,4 @@ python3-venv bluez bluez-firmware rpi-keyboard-config rpi-keyboard-fw-update +rpi-usb-gadget From d2708016d9ef07d8a717ac9768b982c676f5d0b1 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 16 Oct 2025 15:29:58 +0100 Subject: [PATCH 54/57] stage2: install rpi-connect-lite --- stage2/01-sys-tweaks/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 9f48c32..e8d9594 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -39,3 +39,4 @@ bluez bluez-firmware rpi-keyboard-config rpi-keyboard-fw-update rpi-usb-gadget +rpi-connect-lite From a46065d9c0331081b1516e2449d0d38b17b3b3ab Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 28 Oct 2025 12:22:25 +0000 Subject: [PATCH 55/57] export-image: fix timesync typo --- export-image/05-finalise/01-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index b39c905..304b716 100755 --- a/export-image/05-finalise/01-run.sh +++ b/export-image/05-finalise/01-run.sh @@ -14,7 +14,7 @@ on_chroot <<- EOF python3 -m apt_listchanges.populate_database --profile apt systemctl disable apt-listchanges.timer fi - install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync/clock + install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock EOF From cb05dfcc1ce6e303ace293ac2815a3dd5a3c387e Mon Sep 17 00:00:00 2001 From: Paul <44974737+paulober@users.noreply.github.com> Date: Mon, 24 Nov 2025 02:32:51 +0100 Subject: [PATCH 56/57] stage2: Re-add cloud-init files to bootfs (#881) Signed-off-by: paulober --- stage2/04-cloud-init/00-packages | 1 + stage2/04-cloud-init/01-run.sh | 24 ++++--------------- stage2/04-cloud-init/README.txt | 6 +---- .../files/00-network-manager-all.yaml | 3 --- .../04-cloud-init/files/99_raspberry-pi.cfg | 24 ------------------- 5 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 stage2/04-cloud-init/files/00-network-manager-all.yaml delete mode 100644 stage2/04-cloud-init/files/99_raspberry-pi.cfg diff --git a/stage2/04-cloud-init/00-packages b/stage2/04-cloud-init/00-packages index db064e6..4892d37 100644 --- a/stage2/04-cloud-init/00-packages +++ b/stage2/04-cloud-init/00-packages @@ -1 +1,2 @@ cloud-init +rpi-cloud-init-mods diff --git a/stage2/04-cloud-init/01-run.sh b/stage2/04-cloud-init/01-run.sh index 5ccebdf..9a4622e 100755 --- a/stage2/04-cloud-init/01-run.sh +++ b/stage2/04-cloud-init/01-run.sh @@ -5,24 +5,8 @@ if [ "${ENABLE_CLOUD_INIT}" != "1" ]; then exit 0 fi -install -v -D -m 644 -t "${ROOTFS_DIR}/etc/cloud/cloud.cfg.d/" files/99_raspberry-pi.cfg - -# some preseeding without any runtime effect yet +# some preseeding without any runtime effect if not modified # install meta-data file for NoCloud data-source to work -#install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data" -#install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data" -#install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config" - -# setup default netplan config which will instruct netplan to pass control over to network-manager -# at boot time. This will make NetworkManager manage all devices and by default. -# Any Ethernet device will come up with DHCP, once carrier is detected -install -v -D -m 600 -t "${ROOTFS_DIR}/lib/netplan/" files/00-network-manager-all.yaml - -if [ -n "${FIRST_USER_NAME}" ]; then - # set the default user name to the one provided via FIRST_USER_NAME - # this will make cloud-init create the user with that name instead of 'pi' - sed -i "s/name: pi/name: ${FIRST_USER_NAME}/" "${ROOTFS_DIR}/etc/cloud/cloud.cfg" -else - # remove the users:\n - default section from cloud.cfg - sed -i "/^users:/,/^- default/d" "${ROOTFS_DIR}/etc/cloud/cloud.cfg" -fi +install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data" +install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data" +install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config" diff --git a/stage2/04-cloud-init/README.txt b/stage2/04-cloud-init/README.txt index cbe448d..00da52e 100644 --- a/stage2/04-cloud-init/README.txt +++ b/stage2/04-cloud-init/README.txt @@ -1,4 +1,4 @@ -Cloud-init support for Raspberry Pi OS +Cloud-Init support for Raspberry Pi OS Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#raspberry-pi-configuration @@ -8,7 +8,3 @@ Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.re - files/meta-data Cloud-init instance configuration -- files/99_raspberry-pi.cfg Cloud-init datasource configuration - -- files/00-network-manager-all.yaml Example from netplan docs/ubuntu for handing over control from -netplan to NetworkManager by default. diff --git a/stage2/04-cloud-init/files/00-network-manager-all.yaml b/stage2/04-cloud-init/files/00-network-manager-all.yaml deleted file mode 100644 index b654768..0000000 --- a/stage2/04-cloud-init/files/00-network-manager-all.yaml +++ /dev/null @@ -1,3 +0,0 @@ -network: - version: 2 - renderer: NetworkManager diff --git a/stage2/04-cloud-init/files/99_raspberry-pi.cfg b/stage2/04-cloud-init/files/99_raspberry-pi.cfg deleted file mode 100644 index 7134d90..0000000 --- a/stage2/04-cloud-init/files/99_raspberry-pi.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# configure cloud-init with NoCloud - -datasource_list: [ NoCloud, None ] -datasource: - NoCloud: - seedfrom: file:///boot/firmware - -# Leave SSH key emission to console disabled so that -# users can decide whether to enable it manually. -ssh: - emit_keys_to_console: false -no_ssh_fingerprints: true - -# Disable SSH host key generation -# regenerate_ssh_host_keys.service will take care -# of it on first boot -ssh_deletekeys: false -# Disable generation as it could be that the new keys -# aren't available yet when the service runs. -# also they are really only needed for the ssh service -# which will only run after the keys are already present -# so we don't schedule cloud-init after key generation -# as that would delay first boot too much -ssh_genkeytypes: [] From a0785aeb710ba964a9d8ec7512fa92eeee6bd205 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 5 Nov 2025 16:29:53 +0000 Subject: [PATCH 57/57] Remove wget-log files left behind by debootstrap --- scripts/common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/common b/scripts/common index 932a2ee..5056771 100644 --- a/scripts/common +++ b/scripts/common @@ -18,6 +18,9 @@ bootstrap(){ printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" setarch linux32 capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true + + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050719 + rm -f wget-log* if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"