Network Problem Buildroot for Raspberry Pi 2

Hi Everyone;

I made a build for Raspberry Pi 2. RPi started and detected smsc95xxx USB 2.0 Ethernet. But not got an ip. I edited /etc/network/interfaces for dhcp ip getting.

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

When i write command : ifup eth0

Console error : smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

Then restart Rpi;
/etc/network/interfaces became default. Only:

auto lo
iface lo inet loopback

What is the problem?

What is the outputs of following commands:

dmesg | grep eth
ifconfig -a

And at the top of /etc/network/interfaces , # interface file auto-generated by buildroot is written.

It seems that you got an ip address but ethernet link up event comes from 20 minutes later (1196.983108)

Warning messages about remote wakeup capabilities of the hardware is not important. If you plug the ethernet cable after 20 minutes from boot, everything is normal.

If I understand correctly, your modifications on /etc/network/interfaces getting lost on every reboot. You should check your root filesystem type. If it is not ramdisk based, there may be a script which overrides the interfaces file on boot or make this file as a link to a temprorary file under tmpfs.

Yes, my modifications on /etc/network/interfaces getting lost on every reboot. Raspberry Pi is working with sdcard, How to fix it on buildroot?

This is not a complex problem but it is hard to find correct answer without same working setup.

But I can list some items which you need to check:

  • Your buildroot version is important. If you’re using newer buildroot versions and systemd selected as Init system under System configuration, try to change this as Busybox. There are lots of flame about systemd in Linux community and I think it is not good for embedded projects. You must check this first.

  • There may be a script which makes /etc/network/interfaces as a link. Check output of this command: stat /etc/network/interfaces. If it is a link, you have to analyze all the scripts which runs on boot.

  • You may using ramdisk based root partitions. Send the output of cat /proc/mounts command.

I checked list.

  • Just Busybox, it is ok.
  • Image doesn’t have stat application, I can’t find it in buildroot
  • Output of cat /proc/mounts

Problem founded.

My kernel compiled for initramfs filesystem type.

I compiled kernel without buildroot, Now system is working succesfully :blush:

But now small problem :
in inittab ::sysinit:/etc/init.d/rcS is called. But not working? Why? it’s required. Because ethernet ifup in this script.

Now , I noticed that ; When i reboot Rpi, /etc/inittab not working But reenergy Rpi, it is working on boot. I learned new thing :blush:

There must be a problem, it is not possible to skip reading /etc/inittab on soft reboot in your setup described above.

Last steps of Linux boot process for the kernel side (if initramfs setup is not used):

  • Try to mount root filesystem under / directory
  • If an init= boot argument exists, try to load and execute that binary
  • Otherwise, just run /sbin/init

If you’re using busybox /sbin/init is a link to busybox itself. When busybox’s init start to work, it reads the contents of the /etc/inittab and execute the tasks which starts with ::sysinit: sequentially.

If you deeply analyze your situation, it will be more clear to you.

Thanks a lot , I will try this.
I am new on linux, I am not able to go to deep, beacuse may be I drown :neutral_face: and When I learn something I will notice to here. :+1: