etc/network/interfaces静态IP配置不起作用

使用的是tisk-rootfs-image-am437x-evm.tar.xz这个镜像

修改了etc/network/interfaces配置eth0为静态IP,脚本内容如下:

# interface file auto-generated by buildroot
		
auto lo
iface lo inet loopback
		
auto eth0
iface eth0 inet static
    address 172.16.214.199
    netmask 255.255.254.0
    gateway 172.16.214.1

但是每次重启后eth0都未被配置为设定的IP,使用ifconfig eth0查询得到如下信息

eth0 Link encap:Ethernet HWaddr A8:1B:6A:57:49:9C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6902 (6.7 KiB) TX bytes:1670 (1.6 KiB)
Interrupt:143

需要手动使用ifup -a命令手动配置后静态IP才起作用

root@am437x-evm:~# ifup -a
root@am437x-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr A8:1B:6A:57:49:9C
inet addr:172.16.214.199 Bcast:172.16.215.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:171 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14866 (14.5 KiB) TX bytes:4842 (4.7 KiB)
Interrupt:143