I had several experiences with buildroot, it is a "simple" way to build your own embedded operating system.
From http://buildroot.uclibc.org/:
"Buildroot is a set of Makefiles and patches that makes it easy to generate a complete embedded Linux system. Buildroot can generate any or all of a cross-compilation toolchain, a root filesystem, a kernel image and a bootloader image. Buildroot is useful mainly for people working with small or embedded systems, using various CPU architectures (x86, ARM, MIPS, PowerPC, etc.) : it automates the building process of your embedded system and eases the cross-compilation process."
Anyway, normally, when you have a buildroot system you don't have any of the graphical configuration tools you normally have when you are using your desktop Linux.
So you have to know something about the configuration of a buildroot environment.
Configuring the network interfaces is one of the most important step to use buildroot, because sometimes on the embedded system you don't have display, keyboard or similar input devices, so to use your E.S. you have to use the network.
The configuration shall be done into the file /etc/network/interfaces:
$ cat /etc/network/interfaces
# Configure Loopback
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.10
network 192.168.1.0
netmask 255.255.255.0
# Configure eth0 with dhcp IP
# auto eth0
# iface eth0 inet dhcp
In the above code I've configured the eth0 interface with a static IP address. Normally with buildroot the eth0 is configured to use the dhcp to obtain an IP address (the last two lines do this, I've commented out them).
Gg1.
The buildroot docs suggest keeping custom config in a 'skeleton' that gets overlayed onto the file system after building.
See: 3.3.1. Customizing the generated target filesystem
This should be stored using the same file structure as the rootfs, it makes managing custom config easy especially if you rebuild the images a lot 🙂
i am not getting any eth0 entry on ifconfig (only lo is present)
moreover any attempt restart the network interface after editing /etc/network/interfaces gives
ip: can't find device eth0
ip: SI0CGIFFALGS :No such device
how can i resolve this issue
thanks and regards
rh
Hi rh,
the problem could depend from several different reasons.
Are you sure your target board (which one are you using?) has an eth device that linux can handle as eth0?
Did you build a linux system with support for ethernet?
Gg
I have the same problem. Am using an AT91sam9x25ek demo kit.
In buildroot, i have enabled dnsmasq, iptables and other entworking parameters.
Hi, Where do you change the file to be included in the next build?
If I change it in output/target/etc/network/interfaces in the next “make” this is overwrited. I have tried to copy this interfaces to system/skeleton but it is ignored and the file interfaces in the target directoriy is rewrited.
I changed the/etc/network/interfaces file.
I did what you shared in this article but it didn’t work for me..