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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

871 Views
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 Kudos
2 Replies

854 Views
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 Kudos

859 Views
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 Kudos