From 47db7efdd0e114f0c7959f01631be9de44b0106e Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Sat, 15 Aug 2015 13:49:16 +0300 Subject: [PATCH] Better networking thanks to Ronny Kalusniok. Updated the configuration to use Linux kernel 4.1.5. --- src/.config | 2 +- src/5_generate_rootfs.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/.config b/src/.config index 72c6e3cb8..6f88677ed 100644 --- a/src/.config +++ b/src/.config @@ -2,7 +2,7 @@ # # http://kernel.org # -KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz +KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.5.tar.xz # You can find the latest BusyBox source bundles here: # diff --git a/src/5_generate_rootfs.sh b/src/5_generate_rootfs.sh index 2a28d98f3..3d8e6ad16 100755 --- a/src/5_generate_rootfs.sh +++ b/src/5_generate_rootfs.sh @@ -31,9 +31,10 @@ mount -t devtmpfs none /dev mount -t proc none /proc mount -t sysfs none /sys -ip link set lo up -ip link set eth0 up -udhcpc -b -i eth0 -s /etc/rc.dhcp +for DEVICE in /sys/class/net/* ; do + ip link set \${DEVICE##*/} up + [ \${DEVICE##*/} != lo ] && udhcpc -b -i \${DEVICE##*/} -s /etc/rc.dhcp +done EOF @@ -44,7 +45,7 @@ cat > rc.dhcp << EOF ip addr add \$ip/\$mask dev \$interface -if [ -n "$router"]; then +if [ "\$router" ]; then ip route add default via \$router dev \$interface fi