linaro omap3 image: serial device name change breaks serial console

Bug #697824 reported by Peter Maydell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
High
Guilherme Salgado

Bug Description

The most kernel in the recent linaro snapshot and omap3 hwpack (20110105-0) seems to give the serial ports a different device name. Where the 1105 release said:

[ 1.022338] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a 16550A
[ 1.036956] serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a 16550A
[ 1.052947] serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a 16550A

the snapshot says:
[ 1.040313] omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[ 1.041381] omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[ 1.042175] omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2

Fairly obviously, this breaks all the things like kernel command lines and so on which set the console to be ttyS2. (The symptoms, at least on qemu's beagle model, are that you get kernel output via earlyprintk but eventually the kernel says
[ 3.755493] turn off boot console earlycon0
and all further output is to the video only.

Related branches

Revision history for this message
Loïc Minier (lool) wrote :

Yeah; it's a different driver providing the device now; it's specific to OMAP and uses DMA

I think there was discussion about avoid the rename, but it's been in for a while; I think you can configure the kernel to use the regular driver, but then you miss DMA. I think we might have to just live with that rename and go over the transition. :-/

Revision history for this message
Steve Langasek (vorlon) wrote :

In that case, it seems we need an update to linaro-image-tools to get the kernel boot args set right

affects: linaro → linaro-image-tools
Changed in linaro-image-tools:
importance: Undecided → High
Revision history for this message
Loïc Minier (lool) wrote :

Hmm it would be nice if latest linaro-image-tools could keep supporting older images though

Grepping for ttyS2, there are two blocks matching in linaro-media-create:
- the beagle|igep case (console=ttyS2,115200n8 and serialtty=ttyS2)
- a seeminly bogus consoles snippet:
serial_opts=""
if [ "$consoles" ]; then
  for c in ${consoles}; do
    serial_opts="$serial_opts console=$c"
  done
  if [ "$IS_LIVE" -eq 1 ]; then
    serial_opts="$serial_opts serialtty=ttyS2"
  fi
fi

(I think this second snippet is currently bogus in that it hardcodes ttyS2 for all boards.)

I can't think of something elegant right now to handle this change; in an ideal world, we would simply be telling the kernel we want to see console output on the usual serial port, and keep the information about which serial port that is in the kernel itself. We could do something clever in the initramfs or in the rootfs, but not for kernel boot messages :-/

For now, maybe we should just duplicate beagle|igep support into an oldbeagle|oldigep and use ttyS2 in the latter and ttyO2 in the former? alternatively, we could have a new --omap-newserial or --omap-oldserial flag which would select the other tty device.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 697824] Re: linaro omap3 image: serial device name change breaks serial console

On Thu, Jan 06, 2011 at 09:18:48AM -0000, Loïc Minier wrote:
> Grepping for ttyS2, there are two blocks matching in linaro-media-create:
> - the beagle|igep case (console=ttyS2,115200n8 and serialtty=ttyS2)
> - a seeminly bogus consoles snippet:
> serial_opts=""
> if [ "$consoles" ]; then
> for c in ${consoles}; do
> serial_opts="$serial_opts console=$c"
> done
> if [ "$IS_LIVE" -eq 1 ]; then
> serial_opts="$serial_opts serialtty=ttyS2"
> fi
> fi

> (I think this second snippet is currently bogus in that it hardcodes
> ttyS2 for all boards.)

If the only part of this that's bogus is the 'ttyS2' hard-coding, does that
mean the kernel does have the capability to send console output to multiple
TTYs? I've never tried this before, but had noticed this bit of code; if it
works, we could just have --dev beagle set both consoles on a transitional
basis, right?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Loïc Minier (lool) wrote :

Yes, you can send output to multiple consoles, but only one can get input, and I think the last one wins; also, some messages only make it to one console (I think /dev/console is the problem, it is the last specified console= or current active VT).

serialtty= is handled by some initramfs foo which will create upstart jobs spawning a getty. If you spawn a respawn getty on a non-existing tty, you get regular syslog output that it's not available. We could re-engineer this bit to use udev events to setup gettys on well known consoles if the devices exists?

Revision history for this message
Paul Larson (pwlars) wrote :

For anyone else who might be reading this and getting garbage output on the console, lool just pointed out on IRC that the device is now ttyO2 (the letter O as in OMAP), and not the number 0

Changed in linaro-image-tools:
status: New → In Progress
assignee: nobody → Guilherme Salgado (salgado)
Changed in linaro-image-tools:
status: In Progress → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

Guilherme, I'm really not happy with this as a solution. Having to keep the l-m-c and hwpack versions in lockstep is going to be a problem. How do we enable users of lucid and maverick to install beagle hwpacks that use the latest kernel? How do we do that without also breaking their ability to install our already-released hwpacks from 10.11?

Until we have an answer to that, I don't think we can treat this as solved.

Changed in linaro-image-tools:
status: Fix Released → New
Revision history for this message
Guilherme Salgado (salgado) wrote :

This is just an interim solution while the board-specific configs are
not moved to hwpacks -- which I'm planning to work on next. Once that's
done and l-m-c uses them we'll revert this change so that it can, once
again, be used to generate bootable images using the released 10.11
hwpacks.

Remember that the version of l-m-c in Lucid/Maverick can be used to
generate images using the 10.11 hwpacks, but currently there's no
version of l-m-c that can generate a bootable beagle image using the
latest hwpacks.

If you're not happy with just closing this bug before the real solution
is implemented, then I guess we're in agreement, but if you're not happy
with this as an interim solution, I guess we'll need to discuss
alternatives.

Revision history for this message
Steve Langasek (vorlon) wrote :

On Wed, Jan 19, 2011 at 12:26:25PM -0000, Guilherme Salgado wrote:
> If you're not happy with just closing this bug before the real solution
> is implemented, then I guess we're in agreement

Yep, that's exactly it :)

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Changed in linaro-image-tools:
status: New → Triaged
Loïc Minier (lool)
Changed in linaro-image-tools:
milestone: none → 0.5.0
Revision history for this message
Guilherme Salgado (salgado) wrote :

As discussed with Loïc yesterday, we'll change our interim solution to look up the kernel version that is installed and if it's less than 2.6.36 we'll use ttyS2, else we'll use ttyO2.

Changed in linaro-image-tools:
status: Triaged → In Progress
Loïc Minier (lool)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Loïc Minier (lool)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
milestone: 0.5.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.