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?
The problem is that make overwrites your changes with the default. You need to enable Root Filesystem Overlay:
System Configuration -> Root Filesystem Overlay
Root Filesystem Overlay points to a folder in your host (/home/user/overlay, for instance). That folder can contain any files which will be copied to the target image before is built. Put your interface file in overlay/etc/network/interface and it will be copied to your target image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With