Bug 1131

Summary: [Beagleboard] init error and can not login with 20110527 build
Product: [Build System, Metadata & Runtime] BSPs Reporter: Yi Zhao <yi.zhao>
Component: bsps-configurationAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: High CC: dvhart, elizabeth.flanagan, jiajun.xu, jingdong.lu, liang.li2, liangliang.wang, pokylinux, richard.purdie, sgw, yi.zhao, yp.bsp.watcher, yp.watcher
Version: 1.0   
Target Milestone: 1.1 M1   
Hardware: Beagleboard   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yi Zhao 2011-05-31 22:09:52 UTC
Testing Env:    
Host: Ubuntu 10.10 x86_64
Kernel: 2.6.35-28-generic

Image location:
http://autobuilder.yoctoproject.org/nightly/20110527-1/machines/beagleboard/
Tree/Branch: Poky/1.1_M1
Poky Commit: 4ff7af11ef69849ef9c16f585eae58ac920b222b

When boot up beagleboard with minimal or sato image, 'init' will print some messages:

####################
...
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
   ...done.
Starting tcf-agent: OK
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes

##################

The message will loop forever and can not login.

With 20110520-2 build (git commit: fc55b224caa3eeac4abda099ec9ed505db59fb28), there is no this issue.

I diff /etc/inittab with these two build:
###############
diff -Nurp 20/etc/inittab 27/etc/inittab
--- 20/etc/inittab  2011-05-21 21:39:10.000000000 +0800
+++ 27/etc/inittab  2011-05-29 06:06:03.000000000 +0800
@@ -28,7 +28,7 @@ l5:5:wait:/etc/init.d/rc 5
 l6:6:wait:/etc/init.d/rc 6
 # Normally not reached, but fallthrough in case of emergency.
 z6:6:respawn:/sbin/sulogin
-S:2345:respawn:/sbin/getty 115200 ttyO2
+S:2345:respawn:/sbin/getty 115200 ttyAMA0
 # /sbin/getty invocations for the runlevels.
 #
 # The "id" field MUST be the same as the last
###############

When I modified ‘ttyAMA0' to 'ttyO2', it works.


My u-boot setting:
###############
setenv bootcmd 'mmc rescan 0; mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000' 
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro' 
boot 
###############
Comment 1 Darren Hart 2011-06-01 00:23:40 UTC
That looks like a misconfiguration on the autobuilder to me. meta-yocto beagleboard machine still specifies:

SERIAL_CONSOLE = "115200 ttyO2"

Has anything changed on the autobuilder that might modify SERIAL_CONSOLE?
Comment 2 Beth Flanagan 2011-06-01 08:01:37 UTC
No, nothing should have changed from my end.
Comment 3 Beth Flanagan 2011-06-01 11:05:03 UTC
(In reply to comment #1)
> That looks like a misconfiguration on the autobuilder to me. meta-yocto
> beagleboard machine still specifies:
> 
> SERIAL_CONSOLE = "115200 ttyO2"
> 
> Has anything changed on the autobuilder that might modify SERIAL_CONSOLE?

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-yocto/conf/machine/beagleboard.conf?h=1.1_M1

On the 1.1_M1 branch, this is still in the meta-yocto beagleboard conf. I'll look for the patch and cherry-pick into branch.
Comment 4 Darren Hart 2011-06-01 12:04:42 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > That looks like a misconfiguration on the autobuilder to me. meta-yocto
> > beagleboard machine still specifies:
> > 
> > SERIAL_CONSOLE = "115200 ttyO2"
> > 
> > Has anything changed on the autobuilder that might modify SERIAL_CONSOLE?
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-yocto/conf/machine/beagleboard.conf?h=1.1_M1
> 
> On the 1.1_M1 branch, this is still in the meta-yocto beagleboard conf. I'll
> look for the patch and cherry-pick into branch.

Then it is correct as is - sorry if my wording was confusing. What we would be looking for is something that changes SERIAL_CONSOLE to something other than what I have listed above. Specifically, to something like:

SERIAL_CONSOLE = "115200 ttyAMA0"

That is what would be causing the breakage.
Comment 5 Beth Flanagan 2011-06-01 13:03:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > That looks like a misconfiguration on the autobuilder to me. meta-yocto
> > > beagleboard machine still specifies:
> > > 
> > > SERIAL_CONSOLE = "115200 ttyO2"
> > > 
> > > Has anything changed on the autobuilder that might modify SERIAL_CONSOLE?
> > 
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-yocto/conf/machine/beagleboard.conf?h=1.1_M1
> > 
> > On the 1.1_M1 branch, this is still in the meta-yocto beagleboard conf. I'll
> > look for the patch and cherry-pick into branch.
> 
> Then it is correct as is - sorry if my wording was confusing. What we would be
> looking for is something that changes SERIAL_CONSOLE to something other than
> what I have listed above. Specifically, to something like:
> 
> SERIAL_CONSOLE = "115200 ttyAMA0"
> 
> That is what would be causing the breakage.

I've looked and nothing appears to be doing that.
Comment 6 Darren Hart 2011-06-01 15:11:57 UTC
I built core-image-sato w/ 4ff7af11ef69849ef9c16f585eae58ac920b222b and /etc/inittab in the generated rootfs contains the correct line:

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

Checking the root image of:
http://autobuilder.yoctoproject.org/nightly/20110527-1/machines/beagleboard/arm/core-image-minimal-beagleboard-20110529133331.rootfs.tar.bz2

and

http://autobuilder.yoctoproject.org/nightly/20110527-1/machines/beagleboard/arm/core-image-sato-beagleboard-20110529133331.rootfs.tar.bz2

reveals both have the bad getty line in inittab before initial boot:

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

A quick git grep reveals:

$ git grep AMA0
meta/conf/machine/qemuarm.conf:SERIAL_CONSOLE = "115200 ttyAMA0"

This suggests some confusion to me on the part of the autobuilder regarding which machine it is building for since the files do indeed include "beagleboard" in the name, but it is picking up the SERIAL_CONSOLE from qemuarm.conf.

Beth, can you have a look at the autobuilder local.conf to see if anything there might give us a hint? Does the build try and share any sstate with qemuarm?
Comment 7 Beth Flanagan 2011-06-01 15:34:05 UTC
(In reply to comment #6)
> I built core-image-sato w/ 4ff7af11ef69849ef9c16f585eae58ac920b222b and
> /etc/inittab in the generated rootfs contains the correct line:
> 
> S:2345:respawn:/sbin/getty 115200 ttyO2
> 
> Checking the root image of:
> http://autobuilder.yoctoproject.org/nightly/20110527-1/machines/beagleboard/arm/core-image-minimal-beagleboard-20110529133331.rootfs.tar.bz2
> 
> and
> 
> http://autobuilder.yoctoproject.org/nightly/20110527-1/machines/beagleboard/arm/core-image-sato-beagleboard-20110529133331.rootfs.tar.bz2
> 
> reveals both have the bad getty line in inittab before initial boot:
> 
> S:2345:respawn:/sbin/getty 115200 ttyAMA0
> 
> A quick git grep reveals:
> 
> $ git grep AMA0
> meta/conf/machine/qemuarm.conf:SERIAL_CONSOLE = "115200 ttyAMA0"
> 
> This suggests some confusion to me on the part of the autobuilder regarding
> which machine it is building for since the files do indeed include
> "beagleboard" in the name, but it is picking up the SERIAL_CONSOLE from
> qemuarm.conf.
> 
> Beth, can you have a look at the autobuilder local.conf to see if anything
> there might give us a hint? Does the build try and share any sstate with
> qemuarm?

Yes. It does share sstate with qemuarm. If it can't share sstate, then this may cause some performance issues on the AB.
Comment 8 Richard Purdie 2011-06-02 00:57:33 UTC
This looks like the opposite problem to an sstate issue. If sstate basichash was enabled we'd actually not see this problem!

The bug looks like sysvinit needs PACKAGE_ARCH = "${MACHINE_ARCH}" adding to it since the sysvinit-inittab package is machine specific (correctly) but the recipe is only being built per arch (roughly speaking).

The alternative is to split out the conf file into a separate machine specific recipe.
Comment 10 Darren Hart 2011-06-02 15:22:57 UTC
*** Bug 1071 has been marked as a duplicate of this bug. ***
Comment 11 Saul Wold 2011-06-03 14:32:58 UTC
Merged to M1 now also
Comment 12 Yi Zhao 2011-06-16 20:04:03 UTC
Verified it with 20110602 build

Tree/Branch: Poky/1.1_M1
Poky Commit: b4a215bd94cf1508782e49b1a3f8c6b1f7effbb9
Comment 13 Yi Zhao 2011-06-16 20:05:39 UTC
Verified it with 20110613 build

Image location:
http://autobuilder.yoctoproject.org/nightly/20110613-1/
Tree/Branch: Poky/master
Commit: e5f3cc34df74c08c8cab3e1cf9207fafaec6cb9a