summaryrefslogtreecommitdiffstats
path: root/sys/mips/conf
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-08-28 06:17:44 +0000
committeradrian <adrian@FreeBSD.org>2012-08-28 06:17:44 +0000
commitd43b881935988c2ffb442563879e2ccec7283b7e (patch)
treeddf1e95ab717c1c5bd092cbaaf427c4c1f914f89 /sys/mips/conf
parentd79b1491cdd512d7505b159c73656e5d15ae8f04 (diff)
downloadFreeBSD-src-d43b881935988c2ffb442563879e2ccec7283b7e.zip
FreeBSD-src-d43b881935988c2ffb442563879e2ccec7283b7e.tar.gz
This is an initial board configuration for the D-Link DIR-825 dual-band
802.11n router. The flash layout defaults to a 1 MiB section for the kernel so I'm trying very hard to squeeze a minimialistic (LZMA compressde) kernel image into that. I've verified that it boots through to single user mode fine. Issues: * USB doesn't yet work as a module - I need to add something else to the USB AR71xx build before that will work. * There's no switch PHY support - but for now it quite happily behaves as a useful dumb switch out of the box. Phew. * Since a previous flash attempt trashed my radio configuration block, I haven't yet verified whether the wireless works correctly. I'll test that out shortly (read: once I re-calibrate the board somehow.) Thanks to ray@ and the zrouter project for doing some of the initial hard work in figuring out how to bring this board up.
Diffstat (limited to 'sys/mips/conf')
-rw-r--r--sys/mips/conf/DIR-82568
-rw-r--r--sys/mips/conf/DIR-825.hints67
2 files changed, 135 insertions, 0 deletions
diff --git a/sys/mips/conf/DIR-825 b/sys/mips/conf/DIR-825
new file mode 100644
index 0000000..3609d76
--- /dev/null
+++ b/sys/mips/conf/DIR-825
@@ -0,0 +1,68 @@
+#
+# Specific board setup for the D-Link DIR-825 router.
+#
+# The DIR-825 has the following hardware:
+#
+# + AR7161 CPU SoC
+# + AR9223 2.4GHz 11n
+# + AR9220 5GHz 11n
+# + RealTek RTL8366S Gigabit switch
+# + m25p64 based 8MB flash
+# + 64MB RAM
+# + uboot environment
+
+# $FreeBSD$
+
+include "AR71XX_BASE"
+ident "DIR-825"
+hints "DIR-825.hints"
+
+# Since the kernel image must fit inside 1024KiB, we have to build almost
+# everything as modules.
+nodevice random
+nodevice gpio
+nodevice gpioled
+nodevice gif
+nodevice gre
+nodevice bridge
+nodevice usb
+nodevice ehci
+nodevice wlan
+nodevice wlan_xauth
+nodevice wlan_acl
+nodevice wlan_wep
+nodevice wlan_tkip
+nodevice wlan_ccmp
+nodevice wlan_rssadapt
+nodevice wlan_amrr
+nodevice ath
+nodevice ath_pci
+nodevice ath_hal
+nodevice umass
+nodevice ath_rate_sample
+
+nooptions INET6
+
+# Don't include the SCSI/CAM strings in the default build
+options SCSI_NO_SENSE_STRINGS
+options SCSI_NO_OP_STRINGS
+
+# .. And no sysctl strings
+options NO_SYSCTL_DESCR
+
+# GEOM modules
+device geom_map # to get access to the SPI flash partitions
+device geom_uncompress # compressed in-memory filesystem hackery!
+options GEOM_UNCOMPRESS
+
+options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\"
+options AR71XX_REALMEM=64*1024*1024
+
+options AR71XX_ENV_UBOOT
+
+# options MD_ROOT
+# options MD_ROOT_SIZE="6144"
+
+options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash
+options ATH_EEPROM_FIRMWARE # Use EEPROM from flash
+device firmware # Used by the above
diff --git a/sys/mips/conf/DIR-825.hints b/sys/mips/conf/DIR-825.hints
new file mode 100644
index 0000000..98a350e
--- /dev/null
+++ b/sys/mips/conf/DIR-825.hints
@@ -0,0 +1,67 @@
+# $FreeBSD$
+
+# arge0 is connected to the LAN side of the switch PHY.
+# arge1 is connected to the single port WAN side of the switch PHY.
+
+hint.arge.0.phymask=0x0
+hint.arge.0.media=1000
+hint.arge.0.fduplex=1
+
+# XXX grab these from uboot?
+# hint.arge.0.eeprommac=0x1f01fc00
+
+hint.arge.1.phymask=0x0
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+
+# ath0 - slot 17
+hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000
+hint.pcib.0.bus.0.17.0.ath_fixup_size=4096
+
+# ath1 - slot 18
+hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000
+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"
+
+# TODO: gpio LEDs
+
+# Geom MAP
+
+# mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs),64k(caldata)
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x000040000
+hint.map.0.name="uboot"
+hint.map.0.readonly=1
+
+# This config partition is the D-Link specific configuration area.
+# I'm re-purposing it for FreeBSD.
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x00040000
+hint.map.1.end=0x00050000
+hint.map.1.name="cfg"
+hint.map.1.readonly=1
+
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x0050000
+hint.map.2.end=0x00150000
+hint.map.2.name="kernel"
+hint.map.2.readonly=1
+
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x00150000
+hint.map.3.end=0x007f0000
+hint.map.3.name="rootfs"
+hint.map.3.readonly=0
+
+hint.map.4.at="flash/spi0"
+hint.map.4.start=0x007f0000
+hint.map.4.end=0x00800000
+hint.map.4.name="art"
+hint.map.4.readonly=1
+
OpenPOWER on IntegriCloud