changeset 388:a95f08196f9a

Add D-Link DIR-825
author Aleksandr Rybalko <ray@ddteam.net>
date Tue, 17 Apr 2012 17:44:28 +0300
parents baee591c0ae5
children 5b491c71f689
files boards/D-Link/DIR-825/README boards/D-Link/DIR-825/board.hints boards/D-Link/DIR-825/board.mk boards/D-Link/DIR-825/board_firmware.sig boards/D-Link/DIR-825/files/etc/rc.d/ADAPTATION
diffstat 5 files changed, 316 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DIR-825/README	Tue Apr 17 17:44:28 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DIR-825/board.hints	Tue Apr 17 17:44:28 2012 +0300
@@ -0,0 +1,105 @@
+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
+
+# (1 | (1<<1) | (1<<6) | (1<<7) | (1<<17) | (1<<13) | (1<<14) | (1<<15) | (1<<16)
+#  000011 11100000 11000011
+# Output: 0,1,6,7,13,14,15,16,17
+
+# 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="nvram"
+
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x00050000
+hint.map.2.end=0x007e0000
+hint.map.2.name="upgrade"
+
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x00050000
+hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh"
+hint.map.3.name="kernel"
+
+hint.map.4.at="flash/spi0"
+hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh"
+hint.map.4.end=0x007b0000
+hint.map.4.name="rootfs"
+
+hint.map.5.at="flash/spi0"
+hint.map.5.start=0x007b0000
+hint.map.5.end=0x007c0000
+hint.map.5.name="MAC"
+#hint.map.5.readonly=1
+
+hint.map.6.at="flash/spi0"
+hint.map.6.start=0x007c0000
+hint.map.6.end=0x007f0000
+hint.map.6.name="config"
+#hint.map.6.readonly=1
+
+hint.map.7.at="flash/spi0"
+hint.map.7.start=0x007f0000
+hint.map.7.end=0x00800000
+hint.map.7.name="ART"
+#hint.map.7.readonly=1
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DIR-825/board.mk	Tue Apr 17 17:44:28 2012 +0300
@@ -0,0 +1,129 @@
+
+###################################################
+#
+# Board used hardware/chip`s
+#
+###################################################
+
+
+SOC_VENDOR=Atheros
+SOC_CHIP=AR7161
+# TODO: size suffixes
+BOARD_FLASH_SIZE=8388608
+
+
+###################################################
+#
+# Vars for kernel config 
+#
+###################################################
+
+# ident 
+KERNCONF_IDENT=${TARGET_VENDOR}_${TARGET_DEVICE}
+
+# Board have 64M of RAM
+KERNCONF_OPTIONS+=	AR71XX_REALMEM=64*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+=	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
+
+
+#.if !defined(WITHOUT_WIRELESS)
+#KERNCONF_OPTIONS+=	IEEE80211_DEBUG
+##KERNCONF_OPTIONS+=	IEEE80211_SUPPORT_MESH
+##KERNCONF_OPTIONS+=	IEEE80211_SUPPORT_TDMA
+#KERNCONF_MODULES_OVERRIDE+=	wlan
+#KERNCONF_MODULES_OVERRIDE+=	wlan_amrr
+#KERNCONF_MODULES_OVERRIDE+=	wlan_wep
+#KERNCONF_MODULES_OVERRIDE+=	wlan_ccmp
+#KERNCONF_MODULES_OVERRIDE+=	wlan_tkip
+#
+#KERNCONF_OPTIONS+=	AH_DEBUG
+#KERNCONF_OPTIONS+=	ATH_DEBUG
+#KERNCONF_OPTIONS+=	AH_SUPPORT_AR5416
+#KERNCONF_OPTIONS+=	AH_RXCFG_SDMAMW_4BYTES
+#KERNCONF_MODULES_OVERRIDE+=	ath
+##KERNCONF_MODULES_OVERRIDE+=	ath_hal
+#KERNCONF_MODULES_OVERRIDE+=	ath_pci
+##KERNCONF_MODULES_OVERRIDE+=	ath_rate_sample
+#.endif
+
+
+
+###################################################
+#
+#       Limits
+#
+###################################################
+
+
+
+# Image must not be biggest than GEOM_MAP_P2 (upgrade part.)
+FIRMWARE_IMAGE_SIZE_MAX=0x007a0000
+
+
+###################################################
+#
+#       Firmware Image Options
+#
+###################################################
+
+TARGET_PROFILES+=SMALL_ mpd ssh dlink.ua.web 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DIR-825/board_firmware.sig	Tue Apr 17 17:44:28 2012 +0300
@@ -0,0 +1,1 @@
+01AP94-AR7161-RT-080619-00
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DIR-825/files/etc/rc.d/ADAPTATION	Tue Apr 17 17:44:28 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