The ethernet isn't working on my EVK. It's detected at boot but fails to get an IP address from the router (which I've checked is working).
Configuring network interfaces... fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
I read this thread (I.MX6UL EVK: Ethernet ports not working) and think that the required patch has been applied though I'm very new to Yocto! I rooted around until I found a file called mach-imx6ul.c then found that git said that it had a change not staged for commit (it wasn't me that patched it - how did I get someone else's unstaged commits ...)
chris:kernel-source$ pwd
/home/chris/opensource/fsl-release-bsp/build/tmp/work-shared/imx6ull14x14evk/kernel-source
chris:kernel-source$ git status
On branch imx_4.1.15_2.0.0_ga
Your branch is up-to-date with 'origin/imx_4.1.15_2.0.0_ga'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: arch/arm/mach-imx/mach-imx6ul.c
modified: sound/soc/codecs/wm8960.c
no changes added to commit (use "git add" and/or "git commit -a")
chris:kernel-source$ git diff arch
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index 034db69..25760bd 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -50,10 +50,22 @@ static int ksz8081_phy_fixup(struct phy_device *dev)
return 0;
}
-#define PHY_ID_KSZ8081 0x00221560
+/*
+ * i.MX6UL EVK board RevA, RevB, RevC all use KSZ8081
+ * Silicon revision 00, the PHY ID is 0x00221560, pass our
+ * test with the phy fixup.
+ */
+#define PHY_ID_KSZ8081_MNRN60 0x00221560
+/*
+ * i.MX6UL EVK board RevC1 board use KSZ8081
+ * Silicon revision 01, the PHY ID is 0x00221561.
+ * This silicon revision still need the phy fixup setting.
+ */
+#define PHY_ID_KSZ8081_MNRN61 0x00221561
static void __init imx6ul_enet_phy_init(void)
{
- phy_register_fixup_for_uid(PHY_ID_KSZ8081, 0xffffffff, ksz8081_phy_fixup);
+ phy_register_fixup(PHY_ANY_ID, PHY_ID_KSZ8081_MNRN60, 0xffffffff, ksz8081_phy_fixup);
+ phy_register_fixup(PHY_ANY_ID, PHY_ID_KSZ8081_MNRN61, 0xffffffff, ksz8081_phy_fixup);
}
#define OCOTP_CFG3 0x440
Any clues would be gratefully received.
已解决! 转到解答。
It appears that I had the ethernet cable plugged in to the wrong ethernet socket on the EVK. I didn't realise that I only had one of the two ethernet ports configured somewhere.
Nothing to see here.
Hi Chris,
for further details...
The Eth1 port is not defined in /etc/network/interfaces file, only Eth0 is defined. To define Eth0 please edit /etc/network/interfaces adding the following information:
For a DHCP client:
auto eth1
iface eth1 inet dhcp
For a Static IP (of course this is an example, your numbers will be different):
auto eth1
iface eth1 inet static
address 192.168.0.100
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
Regards,
Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Chris,
if the USB dongle uses generic CDC and VNIC classes functionalities it should work just when connected. But if not it may be necessary to add the driver. To do this you may ask for the module (.ko file) or the source code that you may cross compile in an Ubuntu host to generate the .ko file. Once you have the module you can copy it into sdcard and install it using insmod when the image is running.
If you are not familiar to modules you can find here a very nice reference:
An introduction to Linux kernel programming - An introduction to Linux kernel programming
Regards,
Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks. I think that's enough to go on. The dongle that I have works when plugged into Ubuntu 16.04 but on the EVK, the new USB device is recognised but I guess there's no driver for it because it doesn't appear as a new network device listed in ifconfig. I'll find which driver is being used on Ubuntu and go from there.
It appears that I had the ethernet cable plugged in to the wrong ethernet socket on the EVK. I didn't realise that I only had one of the two ethernet ports configured somewhere.
Nothing to see here.