
Hi Bin,
On 01/06/2016 09:42 PM, Bin Meng wrote:
Could you please elaborate more under what situation the offset of '/aliases' will change?
I believe the offset of '/aliases' will change because we're editing the device tree in place (adding the MAC address to it where it wasn't before), and 'aliases' is at the very end of the device tree. I've seen this happen on my board (Freescale LS1043A-RDB). I added some debugging printf's to my code, and saw that all ethernet interfaces after ethernet0 get a 'FDT_ERR_BADOFFSET' from the fdt_getprop() call , and Linux comes up with only 1 interface. After this fix all the interfaces come up properly in Linux with the right MAC addresses.
Can you please rebase your patch on top of the following two:
http://patchwork.ozlabs.org/patch/539373/ http://patchwork.ozlabs.org/patch/539374/
The second patch seems like a rewrite of the scan through interfaces loop, so it's not a simple rebase. I will attempt to do this, and send another patch soon.
Thanks,
Lev