Static network interface

时间:2016-05-05 08:45:11

标签: network-programming buildroot

When editing a file: /etc/network/interface

Something like this:

auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0

and when I enter the command make, my interface bacome default. How can I set a static address interface eth0 in Buildroot?

1 个答案:

答案 0 :(得分:4)

问题是make会使用默认值覆盖您的更改。您需要启用根文件系统覆盖

系统配置 - >根文件系统覆盖

Root Filesystem Overlay 指向主机中的文件夹(例如/home/user/overlay)。该文件夹可以包含在构建之前将复制到目标图像的任何文件。将您的界面文件放在overlay/etc/network/interface中,它将被复制到您的目标图像。