From: Darren Hart <dvhart@linux.intel.com>
To: Wolfgang Denk <wd@denx.de>
Cc: poky@yoctoproject.org
Subject: Re: Serial console unusable with poky-image-sdk
Date: Fri, 28 Jan 2011 08:44:25 -0800 [thread overview]
Message-ID: <4D42F269.1080005@linux.intel.com> (raw)
In-Reply-To: <20110128070520.31A2BD42A86@gemini.denx.de>
On 01/27/2011 11:05 PM, Wolfgang Denk wrote:
> Dear Darren Hart,
>
> In message<4D41F2D6.4040406@linux.intel.com> you wrote:
>>
>>>> Is there a way to stop dbus-launch from concurring with a login shell
>>>> on the serial console port?
>>>
>>> This patch appears to be working fine for me:
>>>
>>>> From: Wolfgang Denk<wd@denx.de>
>>>> Subject: Stop dbus-launch from interfering with a serial console
>>>
>>> Signed-off-by: Wolfgang Denk<wd@denx.de>
>>> ---
>>>
>>> diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession
>>> index a87447a..0b73127 100644
>>> --- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession
>>> +++ b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession
>>> @@ -2,7 +2,7 @@
>>>
>>> if [ -x /usr/bin/dbus-launch ]; then
>>> # As this is the X session script, always start a new DBus session.
>>> - eval `dbus-launch --sh-syntax --exit-with-session`
>>> + eval `dbus-launch --sh-syntax --exit-with-session</dev/null`
>>> echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
>>> fi
>>>
>>
>> you can also append "console=tty" to the kernel command line and the
>> serial console should work. I've run into this on a couple platforms as
>> well and addressed it this way. This isn't just an X11 issue as I
>> usually boot -minimal images.
>
> I think you misunderstand. It is not that the serial console port is
> not working at all, or that there are any wrong assignments to the
> Linux console device.
>
> The problem is that after logging in both the shell and the
> dbus-launch processes will read from the same device, and it is pur
> chance which of these provesses will read which input character.
>
> The problem is that dbus-launch should not read from the console
> terminal at all, and this is what above patch enforces.
Actually, this is precisely the behavior I was seeing on other boards.
The serial console would show all the output of the boot process and
then present a getty. It would accept my login and my password, but as
soon as I was logged in, things went weird. Only every Nth character I
typed made it to the console, where N was somewhere between 2 and 30.
I believe this had something to do with the automatic consoles the
kernel will setup based on the console= parameters. By default, the last
console= parameter becomes /dev/console, if only serial is specified
this seems to conflict with the getty started via inittab. If you add a
second console directive after the first, /dev/console will point to
that. console=/dev/tty0 works for example. Using /dev/tty however
instructs the kernel to use an automatic console on all tty's - except
the serial ports, which also resolves the problem for me.
What I haven't been able to explain yet is why just omitting the getty
from the tty doesn't result in console on the serial port due to the
kernel's automatic console thing. So clearly there are some gaps in my
explanation here, but please try this approach and let me know what your
results are. Based on that, we can dig a bit more and figure out how to
best setup the console= directives on the default images.
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-01-28 16:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 11:11 Serial console unusable with poky-image-sdk Wolfgang Denk
2011-01-27 11:42 ` Wolfgang Denk
2011-01-27 22:33 ` Darren Hart
2011-01-28 7:05 ` Wolfgang Denk
2011-01-28 16:44 ` Darren Hart [this message]
2011-01-28 16:51 ` Wolfgang Denk
2011-01-28 16:56 ` Gary Thomas
2011-01-28 17:51 ` Richard Purdie
2011-01-28 17:16 ` Darren Hart
2011-01-28 17:20 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D42F269.1080005@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=poky@yoctoproject.org \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.