diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2025-08-19 16:51:19 +0100 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2025-08-19 16:51:19 +0100 |
| commit | 5fe4c02bcf884fbb8fa994c7ec17a37658fb5a9b (patch) | |
| tree | e11972bb70c4c4bbe3a5fcb0f293865979635a01 /stage2 | |
| parent | 816f458a9931e216ecf8969e13b4d0ca39947d1f (diff) | |
| parent | d4cd8f9a57bc6afda5077a3f4b1778f81edd5e02 (diff) | |
Merge branch 'master' into arm64
Diffstat (limited to 'stage2')
| -rw-r--r-- | stage2/01-sys-tweaks/00-debconf | 6 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-packages | 9 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/01-useradd.diff | 8 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/02-swap.diff | 13 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/04-inputrc.diff | 8 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/05-path.diff | 18 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/07-resize-init.diff | 5 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/00-patches/series | 2 | ||||
| -rwxr-xr-x | stage2/01-sys-tweaks/01-run.sh | 22 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/files/50raspi | 5 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/files/console-setup | 16 | ||||
| -rw-r--r-- | stage2/01-sys-tweaks/files/resize2fs_once | 25 |
12 files changed, 19 insertions, 118 deletions
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/00-packages b/stage2/01-sys-tweaks/00-packages index f06f7d0..a1c419e 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -5,18 +5,17 @@ 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 lua5.1 luajit ca-certificates curl -fake-hwclock nfs-common usbutils +usbutils dosfstools -dphys-swapfile +rpi-swap rpi-loop-utils raspberrypi-sys-mods -pi-bluetooth apt-listchanges usb-modeswitch libpam-chksshpwd @@ -25,7 +24,6 @@ libmtp-runtime rsync htop man-db -policykit-1 ssh-import-id ethtool ntfs-3g @@ -37,3 +35,4 @@ unzip zip p7zip-full file kms++-utils python3-venv +bluez bluez-firmware 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/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/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" 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..cbd0fd4 100644 --- a/stage2/01-sys-tweaks/00-patches/series +++ b/stage2/01-sys-tweaks/00-patches/series @@ -1,5 +1,3 @@ 01-useradd.diff -02-swap.diff 04-inputrc.diff 05-path.diff -07-resize-init.diff diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index aca8074..93bc36d 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -1,11 +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/" - -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 @@ -19,28 +13,17 @@ s/^#?[[:blank:]]*PasswordAuthentication[[:blank:]]*yes[[:blank:]]*$/PasswordAuth fi on_chroot << EOF -systemctl disable hwclock.sh -systemctl disable nfs-common -systemctl disable rpcbind if [ "${ENABLE_SSH}" == "1" ]; then systemctl enable ssh else systemctl disable ssh fi -systemctl enable regenerate_ssh_host_keys 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 <<EOF @@ -66,13 +49,12 @@ 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" - 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 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"; 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' diff --git a/stage2/01-sys-tweaks/files/resize2fs_once b/stage2/01-sys-tweaks/files/resize2fs_once deleted file mode 100644 index 38a4d47..0000000 --- a/stage2/01-sys-tweaks/files/resize2fs_once +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: resize2fs_once -# Required-Start: -# Required-Stop: -# Default-Start: 3 -# Default-Stop: -# Short-Description: Resize the root filesystem to fill partition -# Description: -### END INIT INFO -. /lib/lsb/init-functions -case "$1" in - start) - log_daemon_msg "Starting resize2fs_once" - ROOT_DEV=$(findmnt / -o source -n) && - resize2fs $ROOT_DEV && - update-rc.d resize2fs_once remove && - rm /etc/init.d/resize2fs_once && - log_end_msg $? - ;; - *) - echo "Usage: $0 start" >&2 - exit 3 - ;; -esac |
