Ethernet not working in iMX6UL EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ethernet not working in iMX6UL EVK

Jump to solution
2,483 Views
kanimozhi_t
Contributor V

I built Yocto project for iMX 6UL EVK from imx-4.19.35-1.1.0.xml - imx-manifest - i.MX Release Manifest  and unable to get Ethernet on this build.

root@imx6ulevk:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:80 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:6080 (5.9 KiB) TX bytes:6080 (5.9 KiB)

However, if I use Linux BSP's from NXP site(L4.19.35_1.1.0_images_MX6UL7D) Ethernet is working fine. So, can someone help me on how to add Ethernet support on the Yocto build?

NOTE: Build is is attached as file for your reference.

Labels (3)
1 Solution
2,281 Views
kanimozhi_t
Contributor V

After various trials, we included rc.local recipe to be included in Yocto build as follows,

IMAGE_INSTALL_append = " fsl-rc-local"    # Append this in local.conf

And editing rc.local to include the following line,

udhcpc -i eth1    # It will bring up Network client in eth1 interface and configure by DHCP

REF: https://community.nxp.com/thread/450170#comment-901134 

View solution in original post

6 Replies
2,282 Views
kanimozhi_t
Contributor V

After various trials, we included rc.local recipe to be included in Yocto build as follows,

IMAGE_INSTALL_append = " fsl-rc-local"    # Append this in local.conf

And editing rc.local to include the following line,

udhcpc -i eth1    # It will bring up Network client in eth1 interface and configure by DHCP

REF: https://community.nxp.com/thread/450170#comment-901134 

2,281 Views
jimmychan
NXP TechSupport
NXP TechSupport

For adding the script file to the target image's rootfs, you may refer to this:

https://community.nxp.com/docs/DOC-105374 

0 Kudos
2,281 Views
jimmychan
NXP TechSupport
NXP TechSupport

There is i.MX_Yocto_Project_User's_Guide.pdf. Are you follow the steps in this document to build the BSP?

0 Kudos
2,281 Views
kanimozhi_t
Contributor V

Hey jimmychan‌,

    Thanks for your reply. I'm not exactly following the i.MX_Yocto_Project_User's_Guide.pdf but I'm well aware of it and it's configurations.

 The current build step is as follows,

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-warrior -m imx-4.19.35-1.1.0.xml
repo sync
MACHINE=imx6ulevk DISTRO=fslc-xwayland source setup-environment test_build

bitbake -e core-image-base | egrep '^PREFERRED_PROVIDER_(virtual/bootloader|u-boot)=' # U-boot name => u-boot-fslc
bitbake -e virtual/kernel | grep "^PN" # kernel name => linux-fslc-imx

bitbake core-image-base

Do I need to change DISTRO(fslc-xwayland) or component(core-image-base) or configuration as in iMX Yocto guide(DISTRO=<distro_name> MACHINE=<machine_name> source fsl-setup-release.sh -b <build_dir>)?

NOTE: I've tried changing component to core-image-full-cmdline yet no success. The log is as follows,

root@imx6ulevk:~# ifconfig
eth0    Link encap:Ethernet HWaddr 6a:38:5e:f7:e5:32
        UP BROADCAST MULTICAST MTU:1500 Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo      Link encap:Local Loopback
        inet addr:127.0.0.1 Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING MTU:65536 Metric:1
        RX packets:2 errors:0 dropped:0 overruns:0 frame:0
        TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1
        RX bytes:140 (140.0 B) TX bytes:140 (140.0 B)

root@imx6ulevk:~# ifdown eth0
root@imx6ulevk:~# ifup eth0
Micrel KSZ8081 or KSZ8091 20b4000.ethernet-1:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet-1:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Looking forward to hear from you.

0 Kudos
2,281 Views
jimmychan
NXP TechSupport
NXP TechSupport

Have you try the exactly steps in Yocto guide to build the BSP?

You may also compare two logs (demo image and the image you built) to check where is the issue.

0 Kudos
2,281 Views
kanimozhi_t
Contributor V

Hi,

    Thanks for the reply. We're integrating mender into Yocto project and hence cannot proceed "exactly" as in NXP guide but the essence is the same, hope you can understand.

    Yet, we somehow managed to bring up the network by editing/adding /etc/network/interfaces file and manually entering ifup eth1 after each u-boot.

 

root@imx6ulevk:~# cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
iface eth1 inet dhcp
root@imx6ulevk:~# ifup eth1
ifdown: interface eth1 not configured
run-parts: /etc/network/if-pre-up.d: No such file or directory
Micrel KSZ8081 or KSZ8091 20b4000.ethernet-1:02: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet-1:02, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
udhcpc: started, v1.30.1
udhcpc: sending discover
fec 2188000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
udhcpc: sending discover
udhcpc: sending select for 192.168.1.4
udhcpc: lease of 192.168.1.4 obtained, lease time 259200
/etc/udhcpc.d/50default: Adding DNS 192.168.1.1
run-parts: /etc/network/if-up.d: No such file or directory

  Now it'll be convenient if you could point us in the direction of adding it (network service) in the build time or anything like one-time process to make it seamless. If you still insist in following the NXP guide plainly, I'll be glad to update.

The full log file is attached for your reference.

0 Kudos