On Mon, Apr 25, 2016 at 02:56:29PM +0100, Daniel Thompson wrote:
On 25/04/16 14:14, Dave Pigott wrote:
I’ve compared the “working” and “non-working” kernel logs and there are only two differences I can find.
- In the non working one it has to run an fsck:
https://validation.linaro.org/scheduler/job/845472/log_file#L_349_223
- I can’t imagine that this is causing the problem
- A little later on, you see it tries to bring the network interfaces up:
I was curious about this.
I looked at the kernel traces and was interested to see that the working version has an smsc911x message coming out as soon as the network adapter is used. On close inspection it looks to me like in the working case the smsc911x driver compiled into the kernel, whilst for the non-working version smsc911x is loaded as a module. Worse the module is not loaded until well after we have started trying to bring up the network.
- Working one:
https://validation.linaro.org/scheduler/job/845552/log_file#L_285_9
[ 0.000000] Linux version 3.10.63.0-1-linaro-lt-vexpress64 (buildslave@x86-64-07) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #1ubuntu1~ci+150113192220 SMP Tue Jan 13 19:25:14 UTC 2015
- Non working one:
https://validation.linaro.org/scheduler/job/845472/log_file#L_351_10
[ 0.000000] Linux version 4.4.0-rc2+ (leoy@leoy-linaro) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09
- Linaro GCC 4.9-2014.09) ) #73 SMP PREEMPT Sat Apr 23 23:11:46 CST
2016
I think non-working version either needs the module building into the kenrel or a line in modprobe.d to ensure the smsc911x driver is loaded when eth0 is used.
Checked config file, smsc911x driver has been built into my kernel image:
CONFIG_SMC91X=y CONFIG_SMSC911X=y
With Dave's reminding, I checked into rootfs the networking will be enabled by command: ifup -a; but sometimes it will not really bring up all ethernet devices: "ifup tries to keep track of the whether the interface is up or down using the file /etc/network/run/ifstate Sometimes this can get out of sync with the true state of the device. In such a case you can use "ifdown eth0" to get the ifstate file back in sync, or you can use the --force option to ignore the ifstate file." [1]
I will try to change the script etc/init.d/networking to "ifup -a --force". But still cannot understand why it will mismatch issue between /etc/network/run/ifstate and true devices state.
[1] http://www.linuxquestions.org/questions/linux-newbie-8/ifup-a-not-working-79...
Thanks, Leo Yan