<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Peter,<div class=""><br class=""></div><div class="">First question, after you manually configure with ifconfig, can you actually connect to external devices on the network?  If so that implies that your driver is functioning properly and that you really only need to figure out how to configure DHCP and automatic configuration.  If no connections are possible after the manual configuration then the you likely have a driver issue.</div><div class=""><br class=""></div><div class="">I played with both sysvinit and systemd based configurations and it seems the automatic DHCP addressing is handled slightly differently in these environments. </div><div class=""><br class=""></div><div class="">In the case of sysvinit, busybox-udhcpc client is installed and _should_ be bringing your interface up automatically. This worked out-of-the-box for me with no extra config changes needed.</div><div class=""><br class=""></div><div class="">In the case of systemd, there didn’t seem to be a DHCP client configured in the default configuration (for my Beaglebone and Raspberry Pi builds anyway).  I manually included the connman package in my build and the interface was automatically configured. It looks like using the networkd PACKAGECONFIG option for the systemd package may be another solution but I had mixed results with that; it may require extra config files in /etc/systemd/networkd or some such but since connman worked for me I stopped investigating.</div><div class=""><br class=""></div><div class="">I’m not sure that’s the best answer and I’d love to hear if there is a cleaner solution for getting a DHCP client in a systemd-based configuration but it may work to at least get you up and running.  Of course this solution requires a rebuild of your target image.  If your image truly does not have a DHCP client installed then you may have to rebuild.</div><div class=""><br class=""></div><div class="">HTH,</div><div class=""><br class=""></div><div class="">Drew</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On May 13, 2017, at 5:25 AM, Peter Balazovic <<a href="mailto:balazovic.peter@gmail.com" class="">balazovic.peter@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hello,</div><div class=""><br class=""></div>Unfortunately I have no knowledge about that how image is built :(  I got just that image downloaded which is already built. <div class=""><br class=""></div><div class="">BUT after applying <font face="monospace, monospace" class="">ifconfig</font> I got network working and connection established... Now I wanna do it permanetly and dhcp instead of static IP.<div class=""><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">root@imx6qpsabreauto:~# ifconfig eth0 10.171.88.8 netmask 255.0.0.0 up</font></div><div class=""><font face="monospace, monospace" class="">root@imx6qpsabreauto:~# ifconfig</font></div><div class=""><font face="monospace, monospace" class="">eth0      Link encap:Ethernet  HWaddr ee:d2:50:0d:f3:33</font></div><div class=""><font face="monospace, monospace" class="">          inet addr:10.171.88.8  Bcast:10.255.255.255  Mask:255.0.0.0</font></div><div class=""><font face="monospace, monospace" class="">          inet6 addr: fe80::ecd2:50ff:fe0d:f333/64 Scope:Link</font></div><div class=""><font face="monospace, monospace" class="">          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1</font></div><div class=""><font face="monospace, monospace" class="">          RX packets:4447 errors:0 dropped:951 overruns:0 frame:0</font></div><div class=""><font face="monospace, monospace" class="">          TX packets:254 errors:0 dropped:0 overruns:0 carrier:0</font></div><div class=""><font face="monospace, monospace" class="">          collisions:0 txqueuelen:1000</font></div><div class=""><font face="monospace, monospace" class="">          RX bytes:640741 (625.7 KiB)  TX bytes:37067 (36.1 KiB)</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">lo        Link encap:Local Loopback</font></div><div class=""><font face="monospace, monospace" class="">          inet addr:127.0.0.1  Mask:255.0.0.0</font></div><div class=""><font face="monospace, monospace" class="">          inet6 addr: ::1/128 Scope:Host</font></div><div class=""><font face="monospace, monospace" class="">          UP LOOPBACK RUNNING  MTU:65536  Metric:1</font></div><div class=""><font face="monospace, monospace" class="">          RX packets:2000 errors:0 dropped:0 overruns:0 frame:0</font></div><div class=""><font face="monospace, monospace" class="">          TX packets:2000 errors:0 dropped:0 overruns:0 carrier:0</font></div><div class=""><font face="monospace, monospace" class="">          collisions:0 txqueuelen:0</font></div><div class=""><font face="monospace, monospace" class="">          RX bytes:152000 (148.4 KiB)  TX bytes:152000 (148.4 KiB)</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">root@imx6qpsabreauto:~#</font></div></div></div><div class=""><br class=""></div><div class="">within /etc/network directory</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">root@imx6qpsabreauto:/etc/network# ls</font></div><div class=""><font face="monospace, monospace" class="">if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces</font></div></div><div class=""><div class=""><font face="monospace, monospace" class="">root@</font><span style="font-family:monospace,monospace" class="">imx6qp</span><font face="monospace, monospace" class="">sabreauto:/etc/network# vi interfaces</font></div></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><div class=""><font face="monospace, monospace" class="">auto lo</font></div><div class=""><font face="monospace, monospace" class="">iface lo inet loopback</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">auto eth0</font></div><div class=""><font face="monospace, monospace" class="">iface eth0 inet dhcp</font></div><div class=""><font face="monospace, monospace" class="">~</font></div><div class=""><font face="monospace, monospace" class="">~</font></div><div class=""><font face="monospace, monospace" class="">~</font></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">After reset I need to set network again and static ...</div><div class=""><br class=""></div><div class="">cheers,</div><div class="">Peter</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, May 12, 2017 at 9:55 PM, Trevor Woerner <span dir="ltr" class=""><<a href="mailto:twoerner@gmail.com" target="_blank" class="">twoerner@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Peter,<br class="">
<br class="">
There isn't enough information here for me to help you.<br class="">
<br class="">
Could you please list the commands and steps you used to build the image?<br class="">
- what repositories are you using?<br class="">
- what branches of those repositories?<br class="">
- if you changed any config files, what did you change?<br class="">
- what command did you run to build your image?<br class="">
- what did bitbake print as your build configuration?<br class="">
<br class="">
Which <a href="http://i.mx/" rel="noreferrer" target="_blank" class="">i.mx</a> board are you using? There are dozens of them.<br class="">
<br class="">
Best regards,<br class="">
    Trevor<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
<br class="">
On Fri, May 12, 2017 at 3:34 PM, <a href="mailto:peter@gmail.com" class="">peter@gmail.com</a><br class="">
<<a href="mailto:balazovic.peter@gmail.com" class="">balazovic.peter@gmail.com</a>> wrote:<br class="">
> I build on <a href="http://i.mx/" rel="noreferrer" target="_blank" class="">i.mx</a> (NXP) machine, I want to get configured as dhcp  (no<br class="">
> static)...<br class="">
><br class="">
><br class="">
> ------ Original Message ------<br class="">
> From: "Trevor Woerner" <<a href="mailto:twoerner@gmail.com" class="">twoerner@gmail.com</a>><br class="">
> To: "Peter Balazovic" <<a href="mailto:balazovic.peter@gmail.com" class="">balazovic.peter@gmail.com</a>><br class="">
> Cc: "Yocto list discussion" <<a href="mailto:yocto@yoctoproject.org" class="">yocto@yoctoproject.org</a>><br class="">
> Sent: 5/12/2017 9:32:17 PM<br class="">
> Subject: Re: [yocto] dhcp eth0 network<br class="">
><br class="">
>> Hi Peter,<br class="">
>><br class="">
>> For what MACHINE are you building? What's your target hardware? Can<br class="">
>> you summarize the steps you took to build your image?<br class="">
>><br class="">
>> What do you want eth0 to do? dhcp or static ip?<br class="">
>><br class="">
>> Best regards,<br class="">
>>     Trevor<br class="">
>><br class="">
>><br class="">
>> On Fri, May 12, 2017 at 12:01 PM, Peter Balazovic<br class="">
>> <<a href="mailto:balazovic.peter@gmail.com" class="">balazovic.peter@gmail.com</a>> wrote:<br class="">
>>><br class="">
>>>  Dears,<br class="">
>>><br class="">
>>>  I got Yocto image and unfortunatelly network is not somehow enabled &<br class="">
>>>  proprely configured. After "ifconfig" no eth0 configured.<br class="">
>>><br class="">
>>><br class="">
>>>>  ifconfig<br class="">
>>><br class="">
>>>  lo    Link encap:Local Loopback<br class="">
>>>         inet addr:127.0.0.1 Mask:255.0.0.0<br class="">
>>>   ....<br class="">
>>><br class="">
>>><br class="">
>>><br class="">
>>>>  /etc/network<br class="">
>>>>  ls<br class="">
>>><br class="">
>>>  if-down.d if-post-down.d if-pre-up.d  if-up.d<br class="">
>>><br class="">
>>><br class="">
>>>  How should I setup "eth0" to get network working properly?<br class="">
>>><br class="">
>>>  Thanks.<br class="">
>>><br class="">
>>><br class="">
>>><br class="">
>>>  --<br class="">
>>>  ______________________________<wbr class="">_________________<br class="">
>>>  yocto mailing list<br class="">
>>>  <a href="mailto:yocto@yoctoproject.org" class="">yocto@yoctoproject.org</a><br class="">
>>>  <a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank" class="">https://lists.yoctoproject.<wbr class="">org/listinfo/yocto</a><br class="">
>>><br class="">
><br class="">
</div></div></blockquote></div><br class=""></div>
-- <br class="">_______________________________________________<br class="">yocto mailing list<br class=""><a href="mailto:yocto@yoctoproject.org" class="">yocto@yoctoproject.org</a><br class="">https://lists.yoctoproject.org/listinfo/yocto<br class=""></div></blockquote></div><br class=""></div></body></html>