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
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
# 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"}
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" ] && {
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
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"
ipkg
iptables
iwlib
-kmod-brcm-et
kmod-brcm-wl
kmod-diag
kmod-ppp
kmod-pppoe
+kmod-switch
kmod-wlcompat
libgcc
mtd
ipkg-sh
iptables
iwlib
-kmod-brcm-et
kmod-brcm-wl
kmod-diag
+kmod-switch
kmod-wlcompat
libgcc
mtd
ipkg
iptables
iwlib
-kmod-brcm-et
kmod-brcm-wl
kmod-diag
kmod-ppp
kmod-gre
+kmod-switch
kmod-wlcompat
libgcc
mtd
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
# 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