From a3dc4fa5ae2a92dbc70c5ab7c403bad347a0c367 Mon Sep 17 00:00:00 2001 From: kaloz Date: Sat, 19 Mar 2005 17:52:30 +0000 Subject: [PATCH] support for the asus wl-500g deluxe and the buffalo v2 units. dnsmasq update, control file fixes. add back other boardtypes to make wl.o happy on other routers git-svn-id: svn://svn.openwrt.org/openwrt/trunk@390 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/package/dnsmasq/Makefile | 2 +- openwrt/package/dnsmasq/dnsmasq.control | 2 +- openwrt/package/dropbear/dropbear.control | 2 +- .../package/iptables/control/ip6tables.control | 2 +- .../iptables/control/iptables-extra.control | 2 +- .../package/iptables/control/iptables.control | 2 +- .../arch/mips/brcm-boards/bcm947xx/sbpci.c | 2 +- .../kernel-source/drivers/net/diag/diag_led.c | 16 ++++++++++++++++ .../default/target_skeleton/etc/init.d/S10boot | 10 ++++++++++ .../target_skeleton/etc/nvram.overrides | 18 ++++++++++++++++++ 10 files changed, 51 insertions(+), 7 deletions(-) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 899bad799..761b79843 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.15 +PKG_VERSION:=2.20 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/openwrt/package/dnsmasq/dnsmasq.control b/openwrt/package/dnsmasq/dnsmasq.control index ef6bd0db3..3aba02b51 100644 --- a/openwrt/package/dnsmasq/dnsmasq.control +++ b/openwrt/package/dnsmasq/dnsmasq.control @@ -1,7 +1,7 @@ Package: dnsmasq Priority: essential Section: net -Version: 2.15-1 +Version: 2.20-1 Architecture: mipsel Maintainer: Felix Fietkau Source: buildroot internal diff --git a/openwrt/package/dropbear/dropbear.control b/openwrt/package/dropbear/dropbear.control index e30f02ac5..1a2f5ed97 100644 --- a/openwrt/package/dropbear/dropbear.control +++ b/openwrt/package/dropbear/dropbear.control @@ -2,7 +2,7 @@ Package: dropbear Priority: optional Depends: zlib Section: net -Version: 0.44-1 +Version: 0.45-1 Architecture: mipsel Maintainer: Felix Fietkau Source: buildroot internal diff --git a/openwrt/package/iptables/control/ip6tables.control b/openwrt/package/iptables/control/ip6tables.control index 4f7da5645..6739656c7 100644 --- a/openwrt/package/iptables/control/ip6tables.control +++ b/openwrt/package/iptables/control/ip6tables.control @@ -2,7 +2,7 @@ Package: ip6tables Priority: optional Depends: kmod-ipv6 Section: net -Version: 1.2.11-1 +Version: 1.3.0-1 Architecture: mipsel Maintainer: Felix Fietkau Source: buildroot internal diff --git a/openwrt/package/iptables/control/iptables-extra.control b/openwrt/package/iptables/control/iptables-extra.control index 2ce604464..eb3dd7bed 100644 --- a/openwrt/package/iptables/control/iptables-extra.control +++ b/openwrt/package/iptables/control/iptables-extra.control @@ -1,7 +1,7 @@ Package: iptables-extra Priority: optional Section: net -Version: 1.2.11-1 +Version: 1.3.0-1 Architecture: mipsel Maintainer: Felix Fietkau Source: buildroot internal diff --git a/openwrt/package/iptables/control/iptables.control b/openwrt/package/iptables/control/iptables.control index 09a99b5b0..6b7ab38a6 100644 --- a/openwrt/package/iptables/control/iptables.control +++ b/openwrt/package/iptables/control/iptables.control @@ -1,7 +1,7 @@ Package: iptables Priority: optional Section: net -Version: 1.2.11-1 +Version: 1.3.0-1 Architecture: mipsel Maintainer: Felix Fietkau Source: buildroot internal diff --git a/openwrt/package/linux/kernel-source/arch/mips/brcm-boards/bcm947xx/sbpci.c b/openwrt/package/linux/kernel-source/arch/mips/brcm-boards/bcm947xx/sbpci.c index b3469134e..ead31e9aa 100644 --- a/openwrt/package/linux/kernel-source/arch/mips/brcm-boards/bcm947xx/sbpci.c +++ b/openwrt/package/linux/kernel-source/arch/mips/brcm-boards/bcm947xx/sbpci.c @@ -275,7 +275,7 @@ sbpci_init(void *sbh) sb_core_reset(sbh, 0); /* In some board, */ - if(nvram_match("boardtype", "bcm94710dev")) + if(nvram_match("boardtype", "bcm94710dev") || nvram_match("boardtype", "bcm94710ap")|| nvram_match("boardtype", "bcm94710r4")|| nvram_match("boardtype", "bcm94710r4")|| nvram_match("boardtype", "bcm95365r")) CT4712_WR = 0; else CT4712_WR = 1; diff --git a/openwrt/package/linux/kernel-source/drivers/net/diag/diag_led.c b/openwrt/package/linux/kernel-source/drivers/net/diag/diag_led.c index 41cb17bf4..6f1ba9732 100644 --- a/openwrt/package/linux/kernel-source/drivers/net/diag/diag_led.c +++ b/openwrt/package/linux/kernel-source/drivers/net/diag/diag_led.c @@ -5,6 +5,7 @@ // initial release 2004/03/28 // // 2004/08/26 asus & buffalo support added +// 2005/03/14 asus wl-500g deluxe and buffalo v2 support added #include #include @@ -187,11 +188,26 @@ static int __init diag_init() reset_polarity=0; buf=nvram_get("boardnum")?:""; if (!strcmp(buf,"44")) { + //motorola set_diag=ignore; set_dmz=ignore; reset_gpio=(1<<5); reset_polarity=0; } + if (!strcmp(buf,"00")) { + //buffalo + set_diag=ignore; + set_dmz=ignore; + reset_gpio=(1<<7); + reset_polarity=1; + } + if (!strcmp(buf,"45")) { + //wl-500g deluxe + set_diag=ignore; + set_dmz=ignore; + reset_gpio=(1<<6); + reset_polarity=1; + } } printk(KERN_INFO "using v%d hardware\n",board_type); diff --git a/openwrt/target/default/target_skeleton/etc/init.d/S10boot b/openwrt/target/default/target_skeleton/etc/init.d/S10boot index 928fc585f..1a36583cc 100755 --- a/openwrt/target/default/target_skeleton/etc/init.d/S10boot +++ b/openwrt/target/default/target_skeleton/etc/init.d/S10boot @@ -15,6 +15,16 @@ touch /var/log/lastlog awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') } +# set up the vlan*ports variables for the asus wl-500g deluxe, if they aren't exist +[ "$(nvram get boardtype)" = "bcm95365r" ] && \ +[ "$(nvram get boardnum)" = "45" ] && { + [ -z "$(nvram get vlan0ports)" ] && \ + [ -z "$(nvram get vlan1ports)" ] && { + nvram set vlan0ports="1 2 3 4 5*" + nvram set vlan1ports="0 5" + } +} + sed 's/^[^#]/insmod &/' /etc/modules 2>&-|ash ifconfig lo 127.0.0.1 up diff --git a/openwrt/target/default/target_skeleton/etc/nvram.overrides b/openwrt/target/default/target_skeleton/etc/nvram.overrides index 206c90b0d..82c15900e 100644 --- a/openwrt/target/default/target_skeleton/etc/nvram.overrides +++ b/openwrt/target/default/target_skeleton/etc/nvram.overrides @@ -45,11 +45,29 @@ NVRAM_lan_proto="static" FAILSAFE_ifnames="eth0 eth1" } +# hacks for buffalo wla2-g54l +[ "$(nvram get boardnum)" = "00" ] && \ +[ "$(nvram get product_name)" = "Product_name" ] && { + debug "### wla2-g54l hacks ###" + NVRAM_lan_ifnames="vlan0" + NVRAM_wan_ifname="none" +} + # hack for asus wl-500g hardware [ $asus ] && { FAILSAFE_lan_ifnames="eth0 eth2" } +# hacks for asus wl-500g deluxe +[ "$(nvram get boardtype)" = "bcm95365r" ] && \ +[ "$(nvram get boardnum)" = "45" ] && { + debug "### wl-500g deluxe hacks ###" + NVRAM_vlan0hwname="et0" + NVRAM_vlan1hwname="et0" + NVRAM_lan_ifnames="vlan0 eth1" + NVRAM_wan_ifname="vlan1" +} + # defaults if lan_ifname is missing [ -z "$(nvram get lan_ifname)" ] && { NVRAM_lan_ifname="br0"