(1)设置DHCP
①可以在buildroot 里面勾选
新唐NUC980设置DHCP或者静态IP_cedar_king的博客-CSDN博客
*make编译内核后,我们修改的interfaces文件会被覆盖掉
②或者直接修改:
etc/network/interfaces:
interface file auto-generated by buildroot
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
(2)静态IP设置
etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.20.119
gateway 192.168.20.1
netmask 255.255.255.0
或者在 /etc/profile 修改
ifconfig eth0 up
ifconfig eth0 192.168.20.119
route add default gw 192.168.20.1
|