2 Replies Latest reply on Apr 17, 2015 2:41 PM by enginec

    eth0 not found on Galileo gen 2 when using custom image built with yocto

    enginec

      When I using linux image for galileo gen 2 provided from intel(Intel® Galileo Boards and Kits — Software Downloads, SD-Card Linux Image), it works fine. I put it on microSD card and type command "ifconfig", it shows two network interface "eth0" and "lo" correctly.


      SD-card image provided from intel

      root@clanton:~# ifconfig

      eth0      Link encap:Ethernet  HWaddr 98:4F:EE:01:7F:D2 

                inet addr:192.168.1.5  Bcast:0.0.0.0  Mask:255.255.255.0

                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                RX packets:66 errors:0 dropped:0 overruns:0 frame:0

                TX packets:92 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:1000

                RX bytes:15886 (15.5 KiB)  TX bytes:14921 (14.5 KiB)

                Interrupt:40

       

      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:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:0

                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

       

      and "/etc/init.d/networking" script exists and works fine

       

      but when I built custom image through Board_Support_Package_Sources_for_Intel_Quark_v1.0.0.7z (from Intel® Download Center) with yocto and image-full recipes by default, I found that the there is no eth0 interface.

      Here is the ifconfig command result

       

      custom built image

      root@quark:~# ifconfig

      enp0s20f6 Link encap:Ethernet  HWaddr 98:4F:EE:01:7F:D2 

                inet addr:169.254.66.118  Bcast:169.254.255.255  Mask:255.255.0.0

                inet6 addr: fe80::9a4f:eeff:fe01:7fd2/64 Scope:Link

                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:22 errors:5 dropped:0 overruns:0 carrier:3

                collisions:30 txqueuelen:1000

                RX bytes:0 (0.0 B)  TX bytes:7766 (7.5 KiB)

                Interrupt:40 Base address:0x4000

       

      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:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:0

                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

       

      eth0 is replaced by enp0s20f6. There is no /etc/init.d/networking and /etc/network/interfaces files too.

       

      I am not familiar with development of embedded linux. Can someone explain what's going on, what are the packages original image included by default, and how could I build a custom image with same network?

      Thank you.

        • 1. Re: eth0 not found on Galileo gen 2 when using custom image built with yocto
          Intel_Peter

          Hello enginec,

           

          Maybe you didin't include the network interface when you were trying to build your custom image, what steps did you take to create it?

          Also, maybe you could try to  manage your Intel® Galileo's network interfaces through Connman.

           

          Peter.

          • 2. Re: eth0 not found on Galileo gen 2 when using custom image built with yocto
            enginec

            Thank you Intel_Peter, after googling with network interface related reference, I found that the package including /etc/network/interfaces and /etc/init.d/networking script, which is called "init-ifupdown". Building your image with "init-ifupdown" will bring those network script back.

             

            But the naming of interface "enp0s20f6" is another issue, the name comes from new naming convention PredictableNetworkInterfaceNames brought by systemd. This naming convention is used to avoid multiple interface like eth0, eth1 ...point to different physical devices.

             

            If you want to bring "eth0" back, you can simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208) and reboot your galileo, eth0 is back again.

             

            By the way, you can use "ifconfig <interface> up/down" to bring interface up or down.