| Summary: | All qemu and BSPs fail to boot via nfs with 1.5 M5 rc1 build | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Yi Zhao <yi.zhao> |
| Component: | connectivity | Assignee: | Jukka Rissanen <jukka.rissanen> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Medium+ | CC: | alexandru.c.georgescu, chandrak, cristian.iorga, ke.zou, meta.mr.watcher, meta.watcher, richard.purdie, sgw, yi.zhao |
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M5 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Yi Zhao
2013-09-13 06:00:11 UTC
This issue is introduced by the commit:c73487302270a7c2d3bbbb191ce1dd63ee2016dc
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index 67ba7c8..2625ade 100644
--- a/meta/recipes-connectivity/connman/connman/connman
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -29,8 +29,18 @@ done
do_start() {
EXTRA_PARAM=""
if test $nfsroot -eq 1 ; then
- ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
- EXTRA_PARAM="-I $ethn"
+ NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'`
+ NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ ]*\):.*$/\1/p'`
+
+ if [ x$NET_ADDR != x ]; then
+ for i in $NET_DEVS; do
+ ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'`
+ if [ "$NET_ADDR" = "$ADDR" ]; then
+ EXTRA_PARAM="-I $i"
+ break
+ fi
+ done
+ fi
fi
if [ -f @LIBDIR@/connman/wired-setup ] ; then
. @LIBDIR@/connman/wired-setup
This patch can not get the correct NET_ADDR, so the connman doesn't ignore the interface which is used by NFS root.
Furthermore, this patch can not deal with NFS dhcp method like below:
# cat /proc/cmdline
root=/dev/nfs rw nfsroot=128.224.159.157:/export/pxeboot/rootfs ip=dhcp console=ttyS0,115200 diufb=15M video=fslfb:800x600-24@60,monitor=1 tty0 debug cache-sram=0xfff00000,0x8000
Fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=42ef04b3648f4e29ed130ff8e37800f5aac44b15, would appreciate QA verifying this. verified. |