changeset 191:c863ad17335a

Add DSA-3110-A1 board
author ray@terran.dlink.ua
date Thu, 01 Sep 2011 12:36:26 +0300
parents e4fec0fbc446
children 20320aa1f338
files boards/D-Link/DSA-3110-A1/README boards/D-Link/DSA-3110-A1/board.hints boards/D-Link/DSA-3110-A1/board.mk boards/D-Link/DSA-3110-A1/files/etc/rc.d/ADAPTATION
diffstat 3 files changed, 227 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DSA-3110-A1/board.hints	Thu Sep 01 12:36:26 2011 +0300
@@ -0,0 +1,87 @@
+# $FreeBSD$
+
+#
+# Device wiring for the Gateworks Cambria 2358.
+#
+
+# DBGU is unit 0
+hint.uart.0.at="ixp0"
+hint.uart.0.addr=0xc8000000
+hint.uart.0.irq=15
+hint.uart.0.flags=0x10
+hint.uart.0.ier_rxbits=0x5d	# NB: need UUE+RTOIE
+
+# NB: no UART1 on ixp435
+
+# optional GPS serial port
+#hint.uart.1.at="ixp0"
+#hint.uart.1.addr=0x53fc0000
+#hint.uart.1.irq=20
+#hint.uart.1.ier_rxbits=0x1
+#hint.uart.1.rclk=1843200
+# optional RS485 serial port
+#hint.uart.2.at="ixp0"
+#hint.uart.2.addr=0x53f80000
+#hint.uart.2.irq=21
+#hint.uart.2.rclk=1843200
+
+# NPE Hardware Queue Manager
+hint.ixpqmgr.0.at="ixp0"
+
+# NPE wired NIC's, requires ixpqmgr
+hint.npe.0.at="ixp0"
+hint.npe.0.npeid="C"
+hint.npe.0.mac="C"
+hint.npe.0.mii="C"
+#hint.npe.0.phy=1
+hint.npe.0.phy=-1 # MII_PHY_ANY
+hint.npe.1.at="ixp0"
+hint.npe.1.npeid="A"
+hint.npe.1.mac="A"
+hint.npe.1.mii="C"
+hint.npe.1.phy=2
+
+
+# FLASH
+hint.cfi.0.at="ixp0"
+hint.cfi.0.addr=0x50000000
+
+# CF IDE controller
+#hint.ata_avila.0.at="ixp0"
+
+#hint.ata.0.at="isa"
+#hint.ata.0.port="0x1F0"
+#hint.ata.0.irq="14"
+
+# GPIO pins
+hint.gpio_avila.0.at="ixp0"
+
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.pins="0x01"
+hint.gpioled.0.name="status"
+hint.gpioled.0.flags="0x0002"
+
+#hint.gpioiic.0.at="gpiobus0"
+#hint.gpioiic.0.pins="0xc0"
+
+
+# Realtek RTL8367R switch
+#hint.switch.0.iface="npe0"
+hint.switch.0.at="iicbus0"
+hint.switch.0.addr=0xa8
+hint.switch.0.driver="rtl830x_switch"
+
+# Dallas Semiconductor DS1337S+ RTC
+hint.ds133x_rtc.0.at="iicbus0"
+hint.ds133x_rtc.0.addr=0xd0
+
+
+
+# USB is part of the chip
+hint.ehci.0.at="ixp0"
+hint.ehci.0.addr=0xcd000000
+hint.ehci.0.irq=32
+hint.ehci.1.at="ixp0"
+hint.ehci.1.addr=0xce000000
+hint.ehci.1.irq=33
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DSA-3110-A1/board.mk	Thu Sep 01 12:36:26 2011 +0300
@@ -0,0 +1,67 @@
+
+###################################################
+#
+# Board used hardware/chip`s
+#
+###################################################
+
+
+SOC_VENDOR=Intel
+SOC_CHIP=ixp435
+# Maybe used for kernel config and maybe multiple e.g. "cfi nand"
+BOARD_FLASH_TYPE=cfi
+# TODO: size suffixes
+BOARD_FLASH_SIZE=4194304
+
+
+
+###################################################
+#
+# Vars for kernel config 
+#
+###################################################
+
+# ident 
+KERNCONF_IDENT=${TARGET_VENDOR}_${TARGET_DEVICE}
+# 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 atp8620
+
+# Additional utilities
+WORLD_SUBDIRS_ZROUTER+=target/sbin/upgrade
+
+KERNCONF_OPTIONS+=	ALT_BREAK_TO_DEBUGGER
+KERNCONF_OPTIONS+=	BREAK_TO_DEBUGGER
+
+###################################################
+#
+#       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
+# nfs_client
+128M!=sh -c 'echo $$((128 * 1024 * 1024))'
+ROOTFS_WITH_KERNEL=yes
+ROOTFS_MEDIA_SIZE?=${128M}
+PACKING_KERNEL_IMAGE?=kernel
+PACKING_ROOTFS_IMAGE?=rootfs
+
+
+IMAGE_SUFFIX=zimage
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DSA-3110-A1/files/etc/rc.d/ADAPTATION	Thu Sep 01 12:36:26 2011 +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