Bug 1227 - [mpc8315e-rdb] NFS root boot failure - unable to find eth0
Summary: [mpc8315e-rdb] NFS root boot failure - unable to find eth0
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-configuration (show other bugs)
Version: unspecified
Hardware: mpc8315e-rdb ppc
: High major
Target Milestone: 1.1 M3
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-07-07 03:40 UTC by Paul Eggleton
Modified: 2011-07-21 18:34 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Log of interaction with u-boot and boot process (9.88 KB, text/plain)
2011-07-07 03:41 UTC, Paul Eggleton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2011-07-07 03:40:29 UTC
I followed the instructions in README.hardware with my MPC8315E-RDBA using a minimal image from master, and unfortunately the machine does not boot correctly from NFS, apparently because it can't find eth0 - despite it being clearly initialised earlier in the kernel log. The log of my entire interaction with the system is attached.

(If I've done something wrong here it may just be a case of fixing the instructions.)
Comment 1 Paul Eggleton 2011-07-07 03:41:37 UTC
Created attachment 185 [details]
Log of interaction with u-boot and boot process
Comment 2 Darren Hart 2011-07-07 14:33:44 UTC
If you boot with an on disk image does the interface come up properly?
Comment 3 Darren Hart 2011-07-07 14:34:52 UTC
Bruce, can you find someone to take a look at this? I think there are only 3 of these things working at the moment.
Comment 4 Bruce Ashfield 2011-07-12 06:35:43 UTC
Here's the error in the log:

  IP-Config: Failed to open eth0
  IP-Config: Device `eth0' not found.

The ethernet isn't being brought up properly, but from the
kernel point of view, the driver is loading and initializing the
gianfar properly.

I'm betting that this is a MAC address problem, what does the
DTB have for the MAC ?
Comment 5 Paul Eggleton 2011-07-12 09:55:11 UTC
Not sure if you mean the dts file from which the dtb is produced - ${WORKDIR}/linux/arch/powerpc/boot/dts/mpc8315erdb.dts - if so, it has some lines like the following:

local-mac-address = [ 00 00 00 00 00 00 ];
Comment 6 Bruce Ashfield 2011-07-12 10:13:29 UTC
Aha. So that is the issue (most likely). There's two ways that the mac 
gets to the kernel. On a modern u-boot it is pulled from nvram and then
passed to the kernel via the right OF structures. The uboot here is likely
to old for that. If you update the dts with the mac off the board (there
should be a sticker with it), you'll have more like. 

I also recall a command line way to set this, but can't find it at the moment.
Comment 7 Paul Eggleton 2011-07-13 09:17:10 UTC
OK, this worked, thanks. My MPC8315E-RDBA had no sticker with the MAC addresses (to be fair I did not unscrew the board and examine the underside, but it's likely there wasn't one there either) so in the end I just booted the factory OS and grabbed them that way.

We'd probably rather not have to get users to patch the kernel source in order to get working ethernet at boot, however. Presumably the proper solution is to tell people to upgrade their u-boot? If that's the case, Darren ran into problems doing this so I don't necessarily want to try it until we have some confidence that his experiences won't be repeated.

(As an aside, the MAC addresses were 04:00:00:00:00:0A and 04:00:00:00:00:0B - these don't look valid; maybe the rules are different for reference platforms rather than actual products.)
Comment 8 Bruce Ashfield 2011-07-13 11:36:19 UTC
The MACs can be 'whatever' and largely semi-random on the dev boards. unlike many platforms, they can be easily changed/controlled from both linux and the bootloader on these boards.

This is worth documenting the the README.hardware, want to send a quick patch with your experience / technique ? We should just point out that the default is "unset" (all zeros) and with the vendor u-boot,  you need to modify the dts to have a mac address that works in your configuration.

And yes, a u-boot udpate would address the issue, and we are getting ready to try to look into this here, but need to have an ICE handy to un-brick the board if it goes bad. so at the moment, we can stick with the documentation route, with plans to address it properly in the future.
Comment 9 Paul Eggleton 2011-07-14 08:56:55 UTC
Have posted patches to add a workaround and updated README.hardware to the poky ML.
Comment 11 Bruce Ashfield 2011-07-21 18:34:47 UTC
NFS boot works.