[Pkg-raspi-maintainers] Bug#941971: raspi3-firmware: serial console output sent to bluetooth port with kernel 5.x

Thorsten Glaser tg at mirbsd.de
Tue Oct 8 10:16:06 BST 2019


Package: raspi3-firmware
Version: 1.20190215-1+deb10u1
Severity: critical
Justification: breaks the whole system

I’ve set the severity high because this MIGHT break hardware,
but it it doesn’t (I don’t know enough to judge) feel free to
classify as less critical.

/etc/kernel/postinst.d/z50-raspi3-firmware contains this gem:

   90   serial="ttyAMA0,115200"
   91   kernelmajor=$(echo "${latest_kernel_basename}" | sed 's,^vmlinuz-,,g' | cut -d. -f 1)
   92   kernelminor=$(echo "${latest_kernel_basename}" | cut -d. -f 2)
   93   if [ $kernelmajor -ge 4 ]; then
   94     if [ $kernelminor -ge 14 ]; then
   95       # Since Linux 4.14, /dev/ttyS1 is the UART on the pinheader.
   96       serial="ttyS1,115200"
   97     fi
   98   fi

The intent is to set serial to ttyAMA0 for Linux << 4.14
and to ttyS1 for Linux >= 4.14, but this fails obviously
using the old location for 5.0‥5.13, 6.0‥6.13, …

You’ll wish to use this instead:

	serial="ttyAMA0,115200"
	kernelmajmin=$(($(echo $latest_kernel_basename | sed -n \
	    's/^vmlinu.-\([0-9]*\)\.\([0-9]*\)\..*$/\1*1000+\2/p')))
	if test $kernelmajmin -ge 4014; then
		# Since Linux 4.14, /dev/ttyS1 is the UART on the pinheader.
		serial="ttyS1,115200"
	fi

This must be fixed in stable, since the 5.x kernel is in
backports, or at least in unstable and available via backports
and the backports kernel must Breaks the versions prior to this fix.

-- System Information:
Debian Release: 10.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: arm64 (aarch64)

Kernel: Linux 5.2.0-0.bpo.2-arm64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_CRAP
Locale: LANG=C.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages raspi3-firmware depends on:
ii  dosfstools  4.1-2

raspi3-firmware recommends no packages.

raspi3-firmware suggests no packages.

-- Configuration Files:
/etc/default/raspi3-firmware changed:
CMA=128M


-- no debconf information


More information about the Pkg-raspi-maintainers mailing list