[Zrouter-src] ZRouter.org: push to ZRouter boards/Buffalo/WZR-HP-AG300H/README...

zrouter-src at zrouter.org zrouter-src at zrouter.org
Thu Oct 11 22:43:49 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/6c9a018ba342
changeset: 478:6c9a018ba342
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Fri Oct 12 01:43:26 2012 +0300
description:
Add Buffalo WZR-HP-AG300H device basic support.
Submitted by:	Alexey Trenikhin

diffstat:

 boards/Buffalo/WZR-HP-AG300H/README                    |    8 +
 boards/Buffalo/WZR-HP-AG300H/board.hints               |  104 +++++++++++++++++
 boards/Buffalo/WZR-HP-AG300H/board.mk                  |  104 +++++++++++++++++
 boards/Buffalo/WZR-HP-AG300H/files/etc/rc.d/ADAPTATION |   73 +++++++++++
 4 files changed, 289 insertions(+), 0 deletions(-)

diffs (307 lines):

diff -r 49a14435cb56 -r 6c9a018ba342 boards/Buffalo/WZR-HP-AG300H/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/Buffalo/WZR-HP-AG300H/README	Fri Oct 12 01:43:26 2012 +0300
@@ -0,0 +1,8 @@
+
+
+mtdparts=ar7100-nor0:
+256k(uboot),	0xbf000000 - 0xbf040000
+64k(Config),	0xbf040000 - 0xbf050000
+1024k(vmlinux),	0xbf050000 - 0xbf150000
+5184k(rootfs),	0xbf150000 - 0xbf660000
+64k(caldata)	0xbf7f0000 - 0xbf800000
\ No newline at end of file
diff -r 49a14435cb56 -r 6c9a018ba342 boards/Buffalo/WZR-HP-AG300H/board.hints
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/Buffalo/WZR-HP-AG300H/board.hints	Fri Oct 12 01:43:26 2012 +0300
@@ -0,0 +1,104 @@
+hint.arge.0.media=1000
+hint.arge.0.fduplex=1
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+
+# No probe at all
+hint.miibus.0.phymask="0x00000000"
+hint.miibus.1.phymask="0x00000000"
+
+hint.floatphy.0.at="miibus0"
+hint.floatphy.0.phyno=0
+hint.floatphy.0.flags=0x00000000
+hint.floatphy.0.speed=1000
+
+hint.floatphy.1.at="miibus1"
+hint.floatphy.1.phyno=0
+hint.floatphy.1.flags=0x00000000
+hint.floatphy.1.speed=1000
+
+# compatible value, device with 4M/8M/16M of flash, may found it on same
+# location, because flash just aliased to upper segments
+hint.ath.0.eepromdata=0x1fff1000
+
+# ath0 - slot 17
+hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1f051000
+hint.pcib.0.bus.0.17.0.ath_fixup_size=4096
+# ath1 - slot 18
+hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1f055000
+hint.pcib.0.bus.0.18.0.ath_fixup_size=4096
+# .. and now, telling each ath(4) NIC where to find the firmware
+# image.
+hint.ath.0.eeprom_firmware="pcib.0.bus.0.17.0.eeprom_firmware"
+hint.ath.1.eeprom_firmware="pcib.0.bus.0.18.0.eeprom_firmware"
+
+# 0	LED	WPS
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="wps"
+hint.gpioled.0.pins=0x0001
+hint.gpioled.0.flags="0x0102"
+
+# 1	LED	STATUS Yellow
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.name="status"
+hint.gpioled.1.pins=0x0002
+hint.gpioled.1.flags="0x0102"
+
+# 11	LED	USB
+hint.gpioled.2.at="gpiobus0"
+hint.gpioled.2.name="usb"
+hint.gpioled.2.pins=0x0800
+hint.gpioled.2.flags="0x0102"
+
+# ? 	BUTTON	RESET
+#hint.gpioreset.0.at="gpiobus0"
+#hint.gpioreset.0.pins="0x0400"
+#hint.gpioreset.0.name="reset"
+#hint.gpioreset.0.flags="0x04a1"
+
+# 12 	BUTTON	WPS
+hint.gpiobutton.0.at="gpiobus0"
+hint.gpiobutton.0.pins="0x1000"
+hint.gpiobutton.0.name="wps"
+hint.gpiobutton.0.flags="0x04a1"
+
+hint.mx25l.0.at="spibus0"
+hint.mx25l.0.cs=0
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x00040000
+hint.map.0.name="bootloader"
+hint.map.0.readonly=1
+
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x00040000
+hint.map.1.end=0x00050000
+hint.map.1.name="bootloader-env"
+hint.map.1.readonly=1
+
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x00050000
+hint.map.2.end=0x00060000
+hint.map.2.name="art"
+hint.map.2.readonly=1
+
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x00060000
+hint.map.3.end=0x007c0000
+hint.map.3.name="upgrade"
+
+hint.map.4.at="flash/spi0"
+hint.map.4.start=0x00060000
+hint.map.4.end="search:0x00100000:0x10000:.!/bin/sh"
+hint.map.4.name="kernel"
+
+hint.map.5.at="flash/spi0"
+hint.map.5.start="search:0x00100000:0x10000:.!/bin/sh"
+hint.map.5.end=0x007c0000
+hint.map.5.name="rootfs"
+
+hint.map.6.start=0x007c0000
+hint.map.6.end=0x007f0000
+hint.map.6.name="config"
+#hint.map.6.readonly=1
diff -r 49a14435cb56 -r 6c9a018ba342 boards/Buffalo/WZR-HP-AG300H/board.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/Buffalo/WZR-HP-AG300H/board.mk	Fri Oct 12 01:43:26 2012 +0300
@@ -0,0 +1,104 @@
+###################################################
+#
+# Board used hardware/chip`s
+#
+###################################################
+
+SOC_VENDOR=Atheros
+SOC_CHIP=AR7161
+BOARD_FLASH_SIZE=32M
+
+###################################################
+#
+# Vars for kernel config
+#
+###################################################
+
+# ident
+KERNCONF_IDENT=${TARGET_VENDOR}_${TARGET_DEVICE}
+
+# Board have 128M of RAM
+KERNCONF_OPTIONS+=	AR71XX_REALMEM=128*1024*1024
+
+KERNCONF_OPTIONS+=	ROOTDEVNAME=\\\"cd9660:/dev/map/rootfs.uncompress\\\"
+KERNCONF_DEVICES+=	geom_map
+
+# Include usb and SoC usb controller drivers
+WITH_USB=yes
+WITH_IPSEC=yes
+WITH_WIRELESS=yes
+# Builded modules
+KERNCONF_MODULES_OVERRIDE+=	usb/uplcom usb/u3g usb/umodem usb/umass \
+    usb/ucom cam zlib
+
+# Additional utilities
+WORLD_SUBDIRS_ZROUTER+=target/sbin/upgrade
+
+KERNCONF_OPTIONS+=	DDB
+KERNCONF_OPTIONS+=	KDB
+KERNCONF_OPTIONS+=	ALT_BREAK_TO_DEBUGGER
+KERNCONF_OPTIONS+=	BREAK_TO_DEBUGGER
+
+KERNCONF_DEVICES+=	switch
+#KERNCONF_DEVICES+=	switch_rtl8366
+
+.if !defined(WITHOUT_WIRELESS)
+KERNCONF_MODULES_OVERRIDE+=	wlan_xauth wlan_wep wlan_tkip wlan_acl \
+    wlan_amrr wlan_ccmp wlan_rssadapt
+KERNCONF_OPTIONS+=	IEEE80211_DEBUG
+KERNCONF_OPTIONS+=	IEEE80211_SUPPORT_MESH
+KERNCONF_OPTIONS+=	IEEE80211_SUPPORT_TDMA
+KERNCONF_DEVICES+=	wlan
+KERNCONF_DEVICES+=	wlan_amrr
+KERNCONF_DEVICES+=	wlan_wep
+KERNCONF_DEVICES+=	wlan_ccmp
+KERNCONF_DEVICES+=	wlan_tkip
+
+KERNCONF_OPTIONS+=	AR71XX_ATH_EEPROM
+KERNCONF_OPTIONS+=	ATH_EEPROM_FIRMWARE
+KERNCONF_DEVICES+=	firmware
+
+KERNCONF_OPTIONS+=	AH_DEBUG
+KERNCONF_OPTIONS+=	ATH_DEBUG
+KERNCONF_OPTIONS+=	ATH_DIAGAPI
+KERNCONF_OPTIONS+=	ATH_ENABLE_11N
+KERNCONF_OPTIONS+=	AH_SUPPORT_AR5416
+#KERNCONF_OPTIONS+=	AH_SUPPORT_AR9130
+KERNCONF_OPTIONS+=	AH_RXCFG_SDMAMW_4BYTES
+# interrupt mitigation not possible on AR9130
+# option		AH_AR5416_INTERRUPT_MITIGATION
+KERNCONF_DEVICES+=	ath
+KERNCONF_DEVICES+=	ath_hal
+KERNCONF_DEVICES+=	ath_pci
+KERNCONF_DEVICES+=	ath_rate_sample
+.endif
+
+###################################################
+#
+#       Limits
+#
+###################################################
+
+# Image must not be biggest than GEOM_MAP_P2 (upgrade part.)
+FIRMWARE_IMAGE_SIZE_MAX=0x00760000
+
+###################################################
+#
+#       Firmware Image Options
+#
+###################################################
+
+TARGET_PROFILES+=SMALL_ mpd ssh ipfw lua_web_ui dhcp mroute ntpdate dnsmasq \
+    racoon openvpn ppp hostap ath nfs_client
+
+KERNEL_COMPRESSION=oldlzma
+KERNEL_COMPRESSION_TYPE=oldlzma
+UBOOT_KERNEL_COMPRESSION_TYPE=lzma
+
+MKULZMA_BLOCKSIZE=65536
+
+PACKING_KERNEL_IMAGE?=kernel.kbin.oldlzma.uboot.sync
+PACKING_ROOTFS_IMAGE?=rootfs_clean.iso.ulzma
+
+IMAGE_SUFFIX=zimage
+NEW_IMAGE_TYPE=zimage
diff -r 49a14435cb56 -r 6c9a018ba342 boards/Buffalo/WZR-HP-AG300H/files/etc/rc.d/ADAPTATION
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/Buffalo/WZR-HP-AG300H/files/etc/rc.d/ADAPTATION	Fri Oct 12 01:43:26 2012 +0300
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# PROVIDE: ADAPTATION
+
+. /etc/rc.subr
+. /etc/network.subr
+
+name="ADAPTATION"
+start_cmd="adapt_start"
+start_precmd="adapt_prestart"
+start_postcmd="adapt_poststart"
+stop_cmd="adapt_stop"
+
+adapt_prestart()
+{
+#	switchctl /dev/switch0 set vlan 0 vid 1
+#	switchctl /dev/switch0 set vlan 0 add 0 u
+#	switchctl /dev/switch0 set vlan 0 add 1 u
+#	switchctl /dev/switch0 set vlan 0 add 2 u
+#	switchctl /dev/switch0 set vlan 0 add 3 u
+#	switchctl /dev/switch0 set vlan 0 del 4
+#	switchctl /dev/switch0 set vlan 0 add 5 t
+#	switchctl /dev/switch0 set vlan 0 add 6 t
+#
+#	switchctl /dev/switch0 set vlan 1 vid 2
+#	switchctl /dev/switch0 set vlan 1 del 0
+#	switchctl /dev/switch0 set vlan 1 del 1
+#	switchctl /dev/switch0 set vlan 1 del 2
+#	switchctl /dev/switch0 set vlan 1 del 3
+#	switchctl /dev/switch0 set vlan 1 add 4 u
+#	switchctl /dev/switch0 set vlan 1 add 5 t
+#	switchctl /dev/switch0 set vlan 1 add 6 t
+#
+#	switchctl /dev/switch0 set port 0 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 1 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 2 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 3 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 4 pvid 2 flags Untag
+#
+#	switchctl /dev/switch0 set port 5 pvid 1 flags Tag
+#	switchctl /dev/switch0 set port 6 pvid 1 flags Tag
+
+	gpioctl -f /dev/gpioc0 -c 10 IN II PU INT
+
+	# Import MAC addresses with known names
+#	kenv LAN_MAC_ADDR=`kenv ethaddr`
+#	kenv WAN_MAC_ADDR=`kenv wanmac`
+
+	ifconfig arge0 name lan0
+	ifconfig arge1 name wan0
+
+	ifconfig lan0 ether `kenv LAN_MAC_ADDR`
+	ifconfig wan0 ether `kenv WAN_MAC_ADDR`
+
+	hostname `kenv HostName`
+
+}
+
+adapt_start()
+{
+}
+
+adapt_poststart()
+{
+}
+
+adapt_stop()
+{
+}
+
+load_rc_config $name
+
+run_rc_command $*
\ No newline at end of file


More information about the Zrouter-src mailing list