Re: meta-cedartrail - serial console


Jim Abernathy
 

On 05/31/2012 03:41 PM, Darren Hart wrote:

On 05/31/2012 11:54 AM, jfabernathy wrote:
On 05/31/2012 02:13 PM, Darren Hart wrote:
On 05/31/2012 09:11 AM, jfabernathy wrote:
Using a DN2800MT (Marshalltown) Intel board, I'm testing the
meta-cedartrail using edison branch and noticed an issues with the
serial console.

The cedartrail.conf in the machine directory has the following statements:

SYSLINUX_OPTS = "serial 0 115200"
SERIAL_CONSOLE = "115200 ttyS0"
APPEND += "console=ttyS0,115200 console=tty0"

However, when the image booted, I had no serial console on ttyS0. I
checked /etc/inittab and noticed that the following line existed:

S:2345:respawn:/sbin/getty 115200 ttyS3

I changed the ttyS3 to ttyS0 and then I have a serial console on the
next reboot. So it appears the override in the .conf file is not
working. Also I only have the console from getty, and not the kernel
logging console.

Anyone have a solution??

If this is considered a bug I can put it on bugzilla.
Lets make sure your environment is what we expect. Please provide the
output of:

$ bitbake core-image-minimal -e | grep SERIAL_CONSOLE=

If it is not "115200 ttyS0" then it is getting overwritten somewhere
either in your config, or possibly by an inappropriate selection of an
assignment operator (=, ?=, etc.) in edison.
okay now I'm confused. while the cedartrail.conf file has the following:
SYSLINUX_OPTS = "serial 3 115200"
SERIAL_CONSOLE = "115200 ttyS3"
APPEND += "console=ttyS3,115200 console=tty3"


The output of the bitbake command you suggested above gives:
jim@ubuntu-x64:~/poky/build$ bitbake core-image-minimal -e | grep
SERIAL_CONSOLE=

# SERIAL_CONSOLE=115200 ttyS0
SERIAL_CONSOLE="115200 ttyS0"
jim@ubuntu-x64:~/poky/build$

So is the bitbake command showing the results before the cedartrail.conf
options take affect??
variable assignments can be tricky, and are not the easiest things to
track down. I suggest looking through your configured layers and looking
for all the SERIAL_CONSOLE assignments using ttyS3 and ttyS0 and see if
you can determine what is overriding your cedartrail.conf setting.
What I found out is the only variable that matters for login console in my situation is SERIAL_CONSOLE because I have to use grub and the boot from hard drive method because my image can't be put on a USB Flash for some reason. So I manually have to edit the grub.cfg file as documented on the wiki "How Do I" section of putting Yocto on a hard drive. Adding console=ttyS0,115200 on the linux statement takes care of the boot console.

So the question is has there been any thought about automating the choice of boot loader and the parameters that are needed or optional? In the case of meta-cedartrail, the cedartrail.conf assumes syslinux is the boot loader. When I could use a USB Flash key, creating a boot device was a trivial dd statement. Because I have to use a hard drive now, I have to do a number of manual steps. Or is there a way to create a boot-able hard drive with syslinux so the cedartrail.conf parameters are all that is needed to adjust?

Jim A

Join yocto@lists.yoctoproject.org to automatically receive all group messages.