aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2010-05-10 17:10:47 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2010-05-10 17:10:47 +0000
commit3b7e21a679be8bf8dca7c6a2f215631f0f6eabdd (patch)
tree6d0b6d1a84bc7dfef8d6844bc2b71431ffe0fb0c
parent0910a01ef60a12ce2e4614d2a4a826981d506cdf (diff)
downloadupstream-3b7e21a679be8bf8dca7c6a2f215631f0f6eabdd.tar.gz
upstream-3b7e21a679be8bf8dca7c6a2f215631f0f6eabdd.tar.bz2
upstream-3b7e21a679be8bf8dca7c6a2f215631f0f6eabdd.zip
brcm-2.4: Fixed preinit and failsafe switch configuration
SVN-Revision: 21417
-rw-r--r--.gitignore3
-rw-r--r--target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm10
-rw-r--r--target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm5
-rw-r--r--target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo12
4 files changed, 25 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index e3479758d0..6142076be2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
.*.swp
/env
/dl
-/.config
/.config.old
/bin
/build_dir
@@ -9,7 +8,5 @@
/tmp
/logs
/feeds
-/feeds.conf
-/files
/package/feeds
/package/openwrt-packages
diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm b/target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
new file mode 100644
index 0000000000..0bfce5f1ef
--- /dev/null
+++ b/target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+failsafe_config_switch() {
+ [ -d /proc/switch/eth0 ] && [ "$ifname" = "eth0" ] && {
+ echo "0 1 2 3 4 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
+ }
+}
+
+boot_hook_add failsafe failsafe_config_switch
+
diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm b/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm
index 1bef26bf00..fdc7c71ca7 100644
--- a/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm
+++ b/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm
@@ -30,9 +30,10 @@ preinit_net_echo() {
echo "$port ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
port_net_echo $1
}; done
+
+ echo "0 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
+
} || port_net_echo $1
-
- preinit_ip_deconfig
}
diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo b/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo
new file mode 100644
index 0000000000..f030cb2837
--- /dev/null
+++ b/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+indicate_failsafe() {
+ preinit_net_echo() {
+ port_net_echo $1
+ }
+ echo "- failsafe -"
+ preinit_net_echo "Entering Failsafe!\n"
+ indicate_failsafe_led
+}
+
+