[Pkg-raspi-maintainers] Bug#939728: raspi3-firmware: serial console device for Raspberry Pi Model B rev 2 is incorrect

J.P. Larocque jpl-debian-bts at thoughtcrime.us
Sun Sep 8 07:49:33 BST 2019


Package: raspi3-firmware
Version: 1.20190215-1

Dear Maintainer,

The script /etc/kernel/postinst.d/z50-raspi3-firmware selects which
serial device ther kernel should use as the console, and has a
specific check for Linux kernels 4.14 and later:

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

I have a Raspberry Pi Model B revision 2 which I made work with Buster
by copying the right DTB files into /boot/firmware (details reported
in a separate bug).  I have linux-image-4.19.0-5-rpi installed, and no
other kernel version installed, but I get no serial output when I use
the cmdline.txt file generated by the postinst.d script, which
includes "console=tty0 console=ttyS1,115200".  If I change it back to
ttyAMA0 by hand, or patch cmdline.txt in a later postinst.d script, I
do get serial output on boot and a login prompt once the system
finishes booting.

This is using physical pins 8 and 10 of header P1.

I don't know if this is because I'm using such an old board.  Can you
please further limit the conditions which change the console to ttyS1?
I haven't looked into the question of when it should be ttyS1 and when
it should be ttyAMA0 (I just tried ttyAMA0 and it worked), so I'm
afraid I can't offer any patch which I know will be correct across all
boards.

Thanks for looking into this!

-- System Information:
Debian Release: 10.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armel (armv6l)

Kernel: Linux 4.19.0-5-rpi
Kernel taint flags: TAINT_CRAP
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

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:
ROOTPART=UUID=7ffc98fc-1970-4289-a7ed-d89c844c3675


-- no debconf information

-- 
J.P. Larocque <jpl-debian-bts at thoughtcrime.us>



More information about the Pkg-raspi-maintainers mailing list