switch whiterussian over to b44 and kmod-switch, use netmsg to send messages for...
authorFelix Fietkau <nbd@openwrt.org>
Sat, 14 Jan 2006 20:27:34 +0000 (20:27 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 14 Jan 2006 20:27:34 +0000 (20:27 +0000)
SVN-Revision: 2984

openwrt/package/base-files/Makefile
openwrt/package/base-files/default/etc/init.d/S10boot
openwrt/package/base-files/default/etc/nvram.overrides
openwrt/package/base-files/default/etc/preinit
openwrt/target/linux/Config.in
openwrt/target/linux/imagebuilder/lists/default.brcm-2.4
openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4
openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4
openwrt/target/linux/linux-2.4/Makefile
openwrt/target/linux/linux-2.4/config/brcm
openwrt/target/linux/linux-2.4/config/brcm.modules

index 8beff8c3da999bd5759f3b05557a1bf50db6a553..09df0abeea128a2f38254b8304c1de8953612143 100644 (file)
@@ -3,7 +3,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files
 
 include $(TOPDIR)/package/rules.mk
index 86d514d23fece845f06eb13146f65ffe3654596f..cb8be94b5cbe1abd407359cf3635e884bafa7360 100755 (executable)
@@ -11,6 +11,16 @@ sed 's/^[^#]/insmod &/' /etc/modules /etc/modules.d/* 2>&-|ash
 ifconfig lo 127.0.0.1 up
 ifconfig eth0 promisc
 
+# configure the switch based on nvram if not in failsafe mode
+[ -d /proc/switch/eth0 -a -z "$FAILSAFE" ] && {
+       for nr in `seq 0 15`; do
+               vp="$(nvram get vlan${nr}ports)"
+               [ -z "$vp" -o -z "$(nvram get vlan${nr}hwname)" ] || {
+                       echo "$vp" > /proc/switch/eth0/vlan/$nr/ports
+               }
+       done
+}
+
 HOSTNAME=$(nvram get wan_hostname)
 HOSTNAME=${HOSTNAME%%.*}
 echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
index 3b45fa4f250a848d408b3b0a5147ad116097a0b6..c965f7d28455086930af36ec269064a1d079af62 100644 (file)
@@ -27,8 +27,7 @@ FAILSAFE_ifnames=${FAILSAFE_ifnames:-"vlan0 eth1 eth2"}
 # failsafe if reset is held
 [ "$FAILSAFE" = "true" ] && {
   echo "### YOU ARE IN FAILSAFE MODE ####"
-  NVRAM_lan_ifname="br0"
-  NVRAM_lan_ifnames=$FAILSAFE_ifnames
+  NVRAM_lan_ifname="eth0"
   NVRAM_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"}
   NVRAM_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"}
   NVRAM_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}
index b23f8833ef0a4c368af13bb5cae458cd32e9cc48..575b30ba9c905ae181e922c84033e1082aa12349 100755 (executable)
@@ -3,7 +3,23 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 mount none /proc -t proc
 insmod diag
 echo 0x01 > /proc/sys/diag
-sleep 1
+
+ifconfig eth0 up
+insmod switch-core
+insmod switch-robo || insmod switch-adm || rmmod switch-core
+
+[ -d /proc/switch/eth0 ] && {
+       echo 1 > /proc/switch/eth0/reset
+       echo "0 1 2 3 4 5u*" > /proc/switch/eth0/vlan/0/ports
+}
+
+# this delay is apparently necessary because the link isn't up yet
+ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
+netmsg 192.168.1.0 "(dummy message)" # b44 eats the first packet
+netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
+
+sleep 2
+
 if [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
        export FAILSAFE=true
        [ "$(nvram get boot_wait)" != "on" ] && {
@@ -11,8 +27,17 @@ if [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
                nvram commit
        }
        while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done &
+       netmsg 192.168.1.255 "Entering Failsafe!"
+else
+       netmsg 192.168.1.255 "Normal startup."
 fi
 
 mount_root ${FAILSAFE:+failsafe}
 
+# remove the drivers for now, just in case the user has newer versions on the jffs2 partition
+rmmod switch-robo
+rmmod switch-adm
+rmmod switch-core
+ifconfig eth0 0.0.0.0
+
 exec /sbin/init
index e65c2f017e7ed30df0b3729bbb5341d264bec5b4..98cd3fe5b683ab6fc1a23de7253a089e01df370d 100644 (file)
@@ -32,15 +32,9 @@ config BR2_PACKAGE_KMOD_BRCM_WL
 config BR2_PACKAGE_KMOD_BRCM_ET
        tristate "Broadcom Ethernet Driver"
        depends BR2_LINUX_2_4_BRCM
-       default y
-       help
-         Proprietary driver for Broadcom Ethernet chipsets
-
-config BR2_PACKAGE_KMOD_B44
-       tristate "Broadcom 44XX, 47XX ethernet driver"
        default m
        help
-         Free driver for Broadcom Ethernet chipsets (without switch support)
+         Proprietary driver for Broadcom Ethernet chipsets
 
 config BR2_PACKAGE_KMOD_ARPT
        tristate "ARP firewalling support"
index 3de5c0981961958972e7d93ab1998be1fc1d64e5..37f52710cb9c82425415f6927ee1331fde554922 100644 (file)
@@ -8,11 +8,11 @@ haserl
 ipkg
 iptables
 iwlib
-kmod-brcm-et
 kmod-brcm-wl
 kmod-diag
 kmod-ppp
 kmod-pppoe
+kmod-switch
 kmod-wlcompat
 libgcc
 mtd
index f10696f54d3f75c835ddd404d4cfc92e167a91dd..2d696cf3598183bb2af34cee70bc643372463b98 100644 (file)
@@ -7,9 +7,9 @@ dropbear
 ipkg-sh
 iptables
 iwlib
-kmod-brcm-et
 kmod-brcm-wl
 kmod-diag
+kmod-switch
 kmod-wlcompat
 libgcc
 mtd
index f54b06d9805b1837162d3ef8d63a478bff108298..f035268a0fb5f28288913571ae9253ebd4650e7d 100644 (file)
@@ -8,11 +8,11 @@ haserl
 ipkg
 iptables
 iwlib
-kmod-brcm-et
 kmod-brcm-wl
 kmod-diag
 kmod-ppp
 kmod-gre
+kmod-switch
 kmod-wlcompat
 libgcc
 mtd
index fb3e1b9ded667bf6cd0ab55a869ebeed7f50a5c2..04d817f5e0c9133fbbb297fa61cb440eea5cdbed 100644 (file)
@@ -33,7 +33,7 @@ TARGET_MODULES_DIR := $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)
 IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
 
 PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
-PKG_RELEASE := 2
+PKG_RELEASE := 3
 
 KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk
 KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
index ff0513d923bc05536a06aecc65be2402d73b8ace..18416e37aa09d40473f9acedf375f6624fa91473 100644 (file)
@@ -733,7 +733,7 @@ CONFIG_NET_PCI=y
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_APRICOT is not set
-CONFIG_B44=m
+CONFIG_B44=y
 CONFIG_ET=m
 # CONFIG_CS89x0 is not set
 # CONFIG_TULIP is not set
index e717eae577f39ddd9e8eb1f87164885661370204..cf26dd1bd40bf54e85e11327d53f232b2af7f5ec 100644 (file)
@@ -1,2 +1 @@
-et
 wl