Thursday, April 28, 2011

AR913x support in -HEAD, or TP-Link WR-1043nd

In summary:

KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #6 r220911:221160M: Thu Apr 28 20:09:28 WST 2011
adrian@pcbsd-3114:/data/freebsd/mips/head/obj/mipseb/mips.mipseb/data/freebsd/mips/head/src/sys/TP-WN1043ND mips
real memory = 33554432 (32768K bytes)
avail memory = 21123072 (20MB)
nexus0:
clock0: on nexus0
Timecounter "MIPS32" frequency 200000000 Hz quality 800
Event timer "MIPS32" frequency 200000000 Hz quality 800
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
ehci0: at mem 0x1b000100-0x1bffffff irq 1 on nexus0
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0: on ehci0
arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0
arge0: Overriding MAC from EEPROM
arge0: Ethernet address: 94:0c:6d:fe:4f:20
arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0
device_attach: arge1 attach returned 22
ath0: at mem 0x180c0000-0x180effff irq 0 on nexus0
ath0: eeprom @ 0x1fff1000
ath0: eeprom data @ 0xbfff1000
ath0: [HT] enabling HT modes
ath0: [HT] 2 RX streams; 2 TX streams
ath0: AR9130 mac 20.1 RF2133 phy 10.2
spi0: at mem 0x1f000000-0x1f00000f on nexus0
spibus0: on spi0
mx25l0: at cs 0 on spibus0
mx25l0: s25sl064a, sector 65536 bytes, 128 sectors
ar71xx_wdog0: on nexus0
ar71xx_wdog0: Previous reset was due to watchdog timeout
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
md0.uzip: 855 x 16384 blocks
ugen0.1: at usbus0
uhub0: on usbus0
Root mount waiting for: usbus0
uhub0: 1 port with 1 removable, self powered
Root mount waiting for: usbus0
ugen0.2: at usbus0
umass0: on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x0000
Root mount waiting for: usbus0
umass0:0:0:-1: Attached to scbus0
Trying to mount root from ufs:/dev/md0 []...
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 3835MB (7856127 512 byte sectors: 255H 63S/T 489C)
Mounting from ufs:/dev/md0 failed with error 22.
Trying to mount root from ufs:/dev/md0.uzip []...
warning: no time-of-day clock registered, system time will not be set accurately
bridge0: Ethernet address: 06:26:1a:6f:d5:e7
wlan0: Ethernet address: 00:19:e0:66:66:68


And the wireless:

# ifconfig wlan0
wlan0: flags=8943 metric 0 mtu 1500
ether 00:19:e0:66:66:68
inet6 fe80::219:e0ff:fe66:6668%wlan0 prefixlen 64 scopeid 0x6
nd6 options=21
media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
status: running
ssid CACHEBOY_RS channel 6 (2437 MHz 11g ht/40+) bssid 00:19:e0:66:66:68
regdomain ROW country AU ecm authmode WPA1+WPA2/802.11i privacy MIXED
deftxkey 2 TKIP 2:128-bit txpower 30 scanvalid 60 protmode CTS
-ampdutx ampdurx ampdulimit 64k -amsdu shortgi wme burst dtimperiod 1
-dfs

I'll see about sneaking this into -HEAD soon.

Tuesday, April 12, 2011

Oh god, so much wireless hardware..

Since I've started doing wireless development, people seem to be sending me more and more hardware. (I've also bought some stuff off of ebay too, so I'm partially to blame for this. :-)

So there's this group of developers over in Europe/Russia who have been busy porting FreeBSD to a variety of wireless devices, but their work hasn't made it into the main FreeBSD tree (or been published at all in any public way.) I've been liaising with Aleksandr Rybalko to push their work into -HEAD in time for FreeBSD-9.0.

So far this has included:

  • Support for the Ralink RT305x MIPS SoC, with initial peripheral support;
  • nvram2env, a way of importing the environment from various bootloaders (eg uboot) into the kernel environment;
  • geom_map, a GEOM module which describes the flash layout for fixed flash partitioning schemes (again like uboot, but it can be used for anything.)
There's a few other things coming up soon, such as support for one of the Broadcom MIPS SoCs, further peripheral support for the RT305x (including the embedded wireless MAC/radio) and other bits and pieces which will prove to be useful.

It's been a pleasure working with them