how to remove(or disable) dhcp_client executable in yocto image?

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

how to remove(or disable) dhcp_client executable in yocto image?

1,941 次查看
gonewithwind-peter
Senior Contributor I

hi all,

I use imx8 maaxboard (yocto sumo & zues branch) iwave board(yocto zues branch),

for our app, we do not need to get ip address from DHCP_server(routers),  we set static IP address(or vlan ip address), but when we connect to a router, it always obtain a IP address from the router to make our code error.

so how to disable  dhcp_clinet in linux (yocto sumo and zues) or directly remove dhcp_client executable from yocto local.conf?

we try to  change  /etc/systemd/network/99-default.link

to 

[Network]
DHCP=no

 

it seems can not work well.

 

Thank you.

 

0 项奖励
2 回复数

1,924 次查看
BiyongSUN
NXP Employee
NXP Employee
you need to change the systemd 
It is systemd knowledge, not imx.
 
 
/etc/systemd/network/wired.network
[Match]
Name=eth0
 
[Network]
Address=10.10.10.10/24
Gateway=10.10.10.1
#DHCP=yes #no, yes, ipv4, ipv6
# KeepConfiguration=static ifconfig ip and not using the ip in config file.
 
L5.4
/etc/systemd/network/80-wired.network
 
[Match]
Name=eth0
 
[Network]
 
Address=10.10.10.10/24
Gateway=10.10.10.1
#DHCP=yes #no, yes, ipv4, ipv6
 
# KeepConfiguration=static ifconfig ip and not using the ip in config file.
 
0 项奖励

1,929 次查看
jimmychan
NXP TechSupport
NXP TechSupport

I think it depend on the configuration of the system you used on your board. You may check 'ps aux' if there is any dhcp client running. Or add a fix IP in your network interface setting in system .. etc.

0 项奖励