Skip to contentSkip to conversation

New: 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

Buildroot bugzilla at busybox.net 1 participant 10 messages May 16, 2015 – Oct 16, 2015

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=8116

Summary: 2015.05-rc2 raspberrypi2_defconfig network interface
not coming up
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: albert.david at gmail.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0

in 2015.05-rc2, default configuration of raspberrypi2(raspberrypi2_defconfig) network interface doesnt show up after boot, but adding a "sleep 1" in S40network(before line "/sbin/ifup -a") fixes the problem.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

https://bugs.busybox.net/show_bug.cgi?id=8116

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #1 from Peter Korsgaard <[email protected]> 2015-05-16 07:03:26 UTC --- It is because the rpi uses a usb<>ethernet adapter, and USB initialization happens after (or rather in parallel) with the rootfs getting mounted and init running - So eth0 isn't available by the time ifup runs.

Busybox ifup/ifdown isn't made to handle such dynamic setups, but perhaps we could add a wait-for-eth0 init script for the rpi that does something like:

etc/init.d/S40eth0
#!/bin/sh
#
# Wait for (usb based) eth0 to get detected
#

case "$1" in
start)
echo -n "Waiting for eth0 ... "
while [ ! -d /sys/class/net/eth0 ]; do sleep 1; done echo "done"
;;
stop)

        ;;
  restart|reload)
        "$0" stop
        "$0" start
        ;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #2 from Floris Bos <[email protected]> 2015-05-16 10:58:19 UTC --- Was wondering if we shouldn't just (offer an option to) enable busybox's ifplugd?

While the Pi is one of the few that has Ethernet through USB, I think this also affects other platforms that have their Wifi through USB.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #3 from Peter Korsgaard <[email protected]> 2015-05-16 13:16:52 UTC --- (In reply to comment #2)

Quoted 5 lines

Was wondering if we shouldn't just (offer an option to) enable busybox's ifplugd?

While the Pi is one of the few that has Ethernet through USB, I think this also affects other platforms that have their Wifi through USB.

Ifplugd is nice, but it wouldn't fix anything here as the problem is that eth0 isn't available yet when S40network runs, so ifplugd would also fail.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #4 from Floris Bos <[email protected]> 2015-05-16 13:24:41 UTC ---

Quoted 2 lines

Ifplugd is nice, but it wouldn't fix anything here as the problem is that eth0 isn't available yet when S40network runs, so ifplugd would also fail.

Thought it also had an option for dealing with interfaces that do not exist yet.

http://git.busybox.net/busybox/tree/networking/ifplugd.c

"-M Monitor creation/destruction of interface
(otherwise it must exist)"

Although I haven't tested it.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #5 from Peter Korsgaard <[email protected]> 2015-05-16 13:33:44 UTC --- (In reply to comment #4)

Quoted 7 lines
Quoted 2 lines

Ifplugd is nice, but it wouldn't fix anything here as the problem is that eth0 isn't available yet when S40network runs, so ifplugd would also fail.

Thought it also had an option for dealing with interfaces that do not exist yet.

Quoted 6 lines

http://git.busybox.net/busybox/tree/networking/ifplugd.c

"-M Monitor creation/destruction of interface
(otherwise it must exist)"

Although I haven't tested it.

Ahh, you're right. I've never noticed that option. Sorry!

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at buildroot.uclibc |yann.morin.1998 at free.fr
|.org |

--- Comment #6 from Thomas Petazzoni <[email protected]> 2015-07-07 15:53:23 UTC --- Yann, is this something you would like to fix in the default
raspberrypi2_defconfig, for improve the out of the box user experience for
users?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Peter Korsgaard <[email protected]> 2015-10-16 09:46:17 UTC --- Fixed in git by:

commit 49964858f45d2243c513e6d362e992ad89ec7a45

Author: Yann E. MORIN <[email protected]>
Date:   Sat Oct 3 14:31:45 2015 +0100

package/initscripts: S40network: wait for network interfaces to appear

On some machines, the network interface is slow to appear. For example, on the Raspberry Pi, the network interface eth0 is an ethernet-over-USB, and our standard boot process is too fast, so our network startup script is called before the USB bus is compeltely enumerated, thus it can't configure eth0.

Closes #8116.

[Peter: move to S40network, handle multiple interfaces]
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #8 from Beno?t Th?baudeau <[email protected]> 2015-10-16 20:00:53 UTC --- I had experienced the same issue, and I had fixed it using BusyBox's ifplugd
with -M as suggested in comment #2. eth0 should be more "allow-hotplug" than
"auto" on RPi.

However, some services started quickly after S40network and configured to use eth0 might be unhappy if it is not yet up, but it is the same issue if the Ethernet cable is plugged later. So their configurations have to be adjusted anyway.

At least, there is now a configurable choice between the sleeping S40network and ifplugd.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 8116] 2015.05-rc2 raspberrypi2_defconfig network interface not coming up

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8116

--- Comment #9 from Yann E. MORIN <[email protected]> 2015-10-16 20:52:01 UTC --- [--SNIP--]

Quoted 2 lines

At least, there is now a configurable choice between the sleeping S40network and ifplugd.

The sleeping solution is to make our RPi defconfig (as well as all our default configs) "just work" out-of-the-box, nothing more.

Any more serious system would probably have to use something along the lines of connman (my personal favourite) or NetworkManager or ifplugd. Or even custom startup scripts.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.