Cannot get DHCP IP assigned in core-image-minimal - imx6ulevk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Cannot get DHCP IP assigned in core-image-minimal - imx6ulevk

1,264 次查看
gbassi1
Contributor II

Hello,

After bitbake core-image-minimal, I cannot get IP assigned in eth0/1 interfaces:

This is the startup log:

root@imx6ulevk:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: can0: <NOARP40000> mtu 16 qdisc noop qlen 10
    link/[280]
3: can1: <NOARP40000> mtu 16 qdisc noop qlen 10
    link/[280]
4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:04:9f:04:eb:ab brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:04:9f:04:eb:aa brd ff:ff:ff:ff:ff:ff
6: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1
    link/sit 0.0.0.0 brd 0.0.0.0

The bblayers.conf file appends BBLAYERS /sources/meta-openembedded/meta-networking but when I do bitbake core-image-minimal, when it parses recipes does not show any HEAD:xxxx for that layer.

What do I need to do to get all the Ethernet working from core-image-minimal?

Thanks

标记 (4)
0 项奖励
回复
3 回复数

1,159 次查看
b36401
NXP Employee
NXP Employee

Please try to perform "ifconfig eth0 up" command and then assign the IP with the command like "ifconfig eth0 192.168.0.1"

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,159 次查看
gbassi1
Contributor II

It worked :smileyhappy:

How can I automate this? Is it possible to get IP assigned by DHCP automatically instead of setting one manually?

0 项奖励
回复

1,159 次查看
b36401
NXP Employee
NXP Employee

You can use "udhcpc" command to get the IP with DHCP and assing to the interface.