Package: raspi-firmware Version: 1.20200601-3 Severity: minor Tags: patch Dear Maintainer,
/etc/kernel/postinst.d/z50-raspi-firmware adds elevator=deadline to /boot/firmware/cmdline.txt. It is obsolete by the two reasons: (1) The deadline IO scheduler was replaced with mq-deadline and does not exist in recent Linux kernels in Bullseye. For example: root@rpi4-armhf:/# cat /sys/block/mmcblk1/queue/scheduler [mq-deadline] none (2) The kernel dmesg in Bullseye says the following at boot [ 0.000000] Kernel parameter elevator= does not have any effect anymore. Please use sysfs to set IO scheduler for individual devices. A simple patch is also attached. --- var/tmp/z50-raspi-firmware 2020-10-09 11:26:20.768858396 +0900 +++ etc/kernel/postinst.d/z50-raspi-firmware 2020-10-09 11:35:44.490085022 +0900 @@ -148,7 +148,7 @@ fi cat >/boot/firmware/cmdline.txt <<EOF -${pre_cmdline} root=$ROOTPART rw elevator=deadline fsck.repair=yes net.ifnames=0 $SET_CMA rootwait +${pre_cmdline} root=$ROOTPART rw fsck.repair=yes net.ifnames=0 $SET_CMA rootwait EOF cd /boot/firmware Best regards, Ryutaroh Matsumoto -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: armhf (aarch64) Foreign Architectures: arm64 Kernel: Linux 5.8.0-2-arm64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_CRAP Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages raspi-firmware depends on: ii dosfstools 4.1-2 ii dpkg 1.20.5 raspi-firmware recommends no packages. raspi-firmware suggests no packages. -- Configuration Files: /etc/kernel/postinst.d/z50-raspi-firmware changed: set -e exec </dev/null >&2 eval set -- "$DEB_MAINT_PARAMS" case "$1" in configure|remove) ;; *) exit 0 ;; esac if ischroot ; then true # chroot detected - skip mount point check elif test -e /usr/bin/systemd-detect-virt && systemd-detect-virt -q ; then true # virtualization detected - skip mount point check elif ! mountpoint -q /boot/firmware; then echo "raspi-firmware: missing /boot/firmware, did you forget to mount it?" >&2 exit 1 fi mkdir -p /boot/firmware latest_kernel=$(ls -1 /boot/vmlinuz-* | grep -v '\.dpkg-bak$' | sort -V -r | head -1) if [ -z "$latest_kernel" ]; then echo "raspi-firmware: no kernel found in /boot/vmlinuz-*, cannot populate /boot/firmware" exit 0 fi latest_initrd=$(ls -1 /boot/initrd.img-* | grep -v '\.dpkg-bak$' | sort -V -r | head -1) if [ -z "$latest_initrd" ]; then echo "raspi-firmware: no initrd found in /boot/initrd.img-*, cannot populate /boot/firmware" exit 0 fi CMA=64M ROOTPART=`findmnt -n --output=source /` || true if [ -z "$ROOTPART" ]; then ROOTPART=/dev/mmcblk0p2;fi KERNEL="auto" INITRAMFS="auto" CONSOLES="auto" if [ -r /etc/default/raspi-firmware ]; then . /etc/default/raspi-firmware fi arch=$DPKG_MAINTSCRIPT_ARCH if [ "arm64" = "$arch" ]; then dtb_path="/usr/lib/linux-image-${latest_kernel#/boot/vmlinuz-}/broadcom" else # there is no vendor subdirectory for armhf dtb_path="/usr/lib/linux-image-${latest_kernel#/boot/vmlinuz-}" fi if [ "$KERNEL" = "auto" ]; then for dtb in ${dtb_path}/bcm*.dtb; do [ -e "${dtb}" ] && cp "${dtb}" /boot/firmware/ done latest_kernel_basename=$(basename "$latest_kernel") latest_initrd_basename=$(basename "$latest_initrd") KERNEL=${latest_kernel_basename} cp "$latest_kernel" /boot/firmware/ cp "$latest_initrd" /boot/firmware/ if [ "$CONSOLES" = "auto" ]; then serial="ttyS1,115200" fi fi : >/boot/firmware/config.txt if [ "$arch" = "arm64" ]; then cat >/boot/firmware/config.txt <<EOF arm_64bit=1 EOF fi cat >>/boot/firmware/config.txt <<EOF enable_uart=1 upstream_kernel=1 kernel=${KERNEL} EOF if [ "$INITRAMFS" != "no" ]; then cat >>/boot/firmware/config.txt <<EOF initramfs ${latest_initrd_basename} EOF fi firmware_custom="/etc/default/raspi-firmware-custom" if [ -f "$firmware_custom" ]; then cat >>/boot/firmware/config.txt <<EOF `cat ${firmware_custom}` EOF fi pre_cmdline="console=tty0 console=${serial}" if [ "$CONSOLES" != "auto" ]; then pre_cmdline="" for console in $CONSOLES; do pre_cmdline="${pre_cmdline} console=${console}" done fi if [ "$CMA" = "64M" ] && grep -q 'Raspberry Pi 4' /proc/device-tree/model ; then SET_CMA='' else SET_CMA="cma=$CMA" fi cat >/boot/firmware/cmdline.txt <<EOF ${pre_cmdline} root=$ROOTPART rw fsck.repair=yes net.ifnames=0 $SET_CMA rootwait EOF cd /boot/firmware for file in vmlinuz-* initrd.img-*; do if [ ! -e "/boot/$file" ]; then echo "raspi-firmware: deleting obsolete /boot/firmware/$file (no longer in /boot)" # Keep going if cleanup of individual files fails. It is better for the end # user to have a working package upgrade and a slight waste of space than a # broken upgrade. rm -f "$file" || true fi done -- no debconf information
--- var/tmp/z50-raspi-firmware 2020-10-09 11:26:20.768858396 +0900 +++ etc/kernel/postinst.d/z50-raspi-firmware 2020-10-09 11:35:44.490085022 +0900 @@ -148,7 +148,7 @@ fi cat >/boot/firmware/cmdline.txt <<EOF -${pre_cmdline} root=$ROOTPART rw elevator=deadline fsck.repair=yes net.ifnames=0 $SET_CMA rootwait +${pre_cmdline} root=$ROOTPART rw fsck.repair=yes net.ifnames=0 $SET_CMA rootwait EOF cd /boot/firmware