Integrate yocto-install/fix-ethphy-detection-tanaro
Commit: seco-ne/tools/yocto-install@d639d5c2
prepare-ethphy.sh: fix phy detection when interface is down
The detection of PHY is based on "phydev" node in sysfs. But this node exist only when corresponding Ethernet interface is up.
root@FLASH-N-GO:# ip link set dev eth0 down
root@FLASH-N-GO:# stat /sys/class/net/eth0/phydev
stat: can't stat '/sys/class/net/eth0/phydev': No such file or directory
root@FLASH-N-GO:# ip link set dev eth0 up
[ 2416.704190] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL)
[ 2419.776455] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2419.783612] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
root@FLASH-N-GO:# stat /sys/class/net/eth0/phydev
File: '/sys/class/net/eth0/phydev' -> '../../mdio_bus/30be0000.ethernet-1/30be0000.ethernet-1:00'
Size: 0 Blocks: 0 IO Block: 4096 symbolic link
Device: 17h/23d Inode: 28272 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-03-09 14:07:06.420000000 +0000
Modify: 2018-03-09 14:07:06.420000000 +0000
Change: 2018-03-09 14:07:06.420000000 +0000
root@FLASH-N-GO:~#
By default all interfaces are down when system start. And if installation of FNGSystem is performed using second Ethernet interface, SD card or USB Flash Drive, the prepare-ethphy.sh will not detect Ethernet PHY and will add ethernet-without-gb-phy-overlay.dtbo to /boot/overlays.txt file. Thus FEC interface will not be available after reboot.
This patch bring up FEC interface before checking "phydev" node.