Date: Fri, 11 Jun 2010 15:05:01 +0300 From: Alexander Mogilny <sg@sg.org.ua> To: freebsd-mips@freebsd.org Subject: RouterBOARD RB450G Message-ID: <9C6B899F-0361-4E20-A9C4-20C002A3CA1D@sg.org.ua>
next in thread | raw e-mail | index | archive | help
--Apple-Mail-1--549525150
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Hi all!
I have recently purchased RB450G router and was not
satisfied with RouterOS so I decided to install FreeBSD
on this device.
There are some issues with starting FreeBSD on this device
so I would like to help community to fix some code and get
this device working.
Default AR71XX kernel failed to boot. Boot process stopped
at ohci device detection (it just hanged). When I commented
it out in hints file I got following:
=3D=3D=3D=3D=3D=3D=3D=3D
RouterBOOT booter 2.23
RouterBoard 450G
CPU frequency: 680 MHz
Memory size: 256 MB
Press any key within 2 seconds to enter setup..
Please, check ethernet cable...
trying bootp protocol... OK
Got IP address: 172.16.0.40
resolved mac address 00:E0:81:49:87:F7
Gateway: 172.16.0.1
transfer started ...................................... transfer ok, =
time=3D3.02s
setting up elf image... OK
jumping to kernel code
platform frequency: 680000000
arguments:=20
a0 =3D 00000008
a1 =3D a0861c00
a2 =3D 00000000
a3 =3D 00000000
Cmd line: console=3DttyS0,115200 gpio=3D1983 HZ=3D340000000 mem=3D256M =
kmac=3D00:0C:42:59:30:FF board=3D450G boot=3D1 mlc=3D2
Environment:
envp is invalid
Cache info:
picache_stride =3D 4096
picache_loopcount =3D 16
pdcache_stride =3D 4096
pdcache_loopcount =3D 8
cpu0: MIPS Technologies processor v116.147
MMU: Standard TLB, 16 entries
L1 i-cache: 4 ways of 512 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
Config1=3D0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
Config3=3D0x20
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2010 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 #17: Thu Jun 10 14:40:34 EEST 2010
root@tbilisi.intra:/usr/obj/mips/mips/usr/src.mips/sys/MIKROTIK mips
WARNING: WITNESS option enabled, expect reduced performance.
real memory =3D 33554432 (32768K bytes)
avail memory =3D 25894912 (24MB)
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
clock0: [FILTER]
apb0 at irq 4 on nexus0
apb0: [FILTER]
uart0: <16550 or compatible> on apb0
uart0: [FILTER]
uart0: console (115200,n,8,1)
ehci0: <AR71XX Integrated USB 2.0 controller> at mem =
0x1b000000-0x1bffffff irq 1 on nexus0
ehci0: [ITHREAD]
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0: <AR71XX Integrated USB 2.0 controller> on ehci0
pcib0 at irq 0 on nexus0
pcib0: [FILTER]
pci0: <PCI bus> on pcib0
pci0: <old, non-VGA display device> at device 0.0 (no driver attached)
...
[ skipped ]
...
pci0: <old, non-VGA display device> at device 31.0 (no driver attached)
arge0: <Atheros AR71xx built-in ethernet interface> at mem =
0x19000000-0x19000fff irq 2 on nexus0
miibus0: <MII bus> on arge0
ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, =
auto
arge0: Ethernet address: 62:73:64:40:64:4b
arge0: [FILTER+ITHREAD]
arge1: <Atheros AR71xx built-in ethernet interface> at mem =
0x1a000000-0x1a000fff irq 3 on nexus0
arge1: Ethernet address: 62:73:64:ca:db:ce
arge1: [FILTER+ITHREAD]
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
spibus0: <unknown card> at cs 1
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
Unknown SPI flash device. Vendor: ff, device id: ffff
device_attach: mx25l0 attach returned 6
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Timecounter "MIPS32" frequency 340000000 Hz quality 800
Timecounters tick every 1.000 msec
bootpc_init: wired to interface 'arge0'
Sending DHCP Discover packet from interface arge0 (62:73:64:40:64:4b)
arge0: link state changed to DOWN
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <Atheros> at usbus0
uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on =
usbus0
uhub0: 2 ports with 2 removable, self powered
DHCP/BOOTP timeout for server 255.255.255.255
arge0: link state changed to UP
=3D=3D=3D=3D=3D=3D=3D
As you can see ethernet card got incorrect ethernet address.
What could cause this? Perhaps I can somehow give you some more
debug information?
Kern conf and hints file are in attachment.
--=20
AIM-UANIC | AIM-RIPE +-----[ FreeBSD ]-----+
Alexander Mogilny | The Power to Serve! |
<> sg@sg.org.ua +---------------------+
--Apple-Mail-1--549525150
Content-Disposition: attachment;
filename=AR71XX.hints
Content-Type: application/octet-stream; x-unix-mode=0644; name="AR71XX.hints"
Content-Transfer-Encoding: 7bit
# $FreeBSD: src/sys/mips/conf/AR71XX.hints,v 1.2 2010/01/22 22:14:12 gonzo Exp $
hint.apb.0.at="nexus0"
hint.apb.0.irq=4
# uart0
hint.uart.0.at="apb0"
# see atheros/uart_cpu_ar71xx.c why +3
hint.uart.0.maddr=0x18020003
hint.uart.0.msize=0x18
hint.uart.0.irq=3
#ohci
#hint.ohci.0.at="apb0"
#hint.ohci.0.maddr=0x1c000000
#hint.ohci.0.msize=0x01000000
#hint.ohci.0.irq=6
#ehci
hint.ehci.0.at="nexus0"
hint.ehci.0.maddr=0x1b000000
hint.ehci.0.msize=0x01000000
hint.ehci.0.irq=1
# pci
hint.pcib.0.at="nexus0"
hint.pcib.0.irq=0
hint.arge.0.at="nexus0"
hint.arge.0.maddr=0x19000000
hint.arge.0.msize=0x1000
hint.arge.0.irq=2
hint.arge.0.phymask=0x10
hint.arge.1.at="nexus0"
hint.arge.1.maddr=0x1a000000
hint.arge.1.msize=0x1000
hint.arge.1.irq=3
# PHY1, PHY2, PHY3
hint.arge.1.phymask=0x0e
# should be 100 for RS
hint.arge.1.media=1000
hint.arge.1.fduplex=1
# GPIO
hint.gpio.0.at="apb0"
hint.gpio.0.maddr=0x18040000
hint.gpio.0.msize=0x1000
hint.gpio.0.irq=2
# User led - pin 4
hint.gpioled.0.at="gpiobus0"
hint.gpioled.0.name="userled"
hint.gpioled.0.pins=0x0010
# RB NAND Flash - read busy status from SoC gpio pin 5
hint.rb_nandbusy.0.at="gpiobus0"
hint.rb_nandbusy.0.pins=0x0020
# RouterBoard CPLD
hint.rb_cpldbus.0.at="spibus0"
hint.rb_cpldbus.0.cs=1
# RouterBoard CPLD leds
hint.gpioled.1.at="gpiobus1"
hint.gpioled.1.name="led1"
hint.gpioled.1.pins=0x0001
hint.gpioled.2.at="gpiobus1"
hint.gpioled.2.name="led2"
hint.gpioled.2.pins=0x0002
hint.gpioled.3.at="gpiobus1"
hint.gpioled.3.name="led3"
hint.gpioled.3.pins=0x0004
hint.gpioled.4.at="gpiobus1"
hint.gpioled.4.name="led4"
hint.gpioled.4.pins=0x0008
# NAND slices for RouterBoard
hint.flash.0.at="nand0"
hint.flash.0.start=0x0
hint.flash.0.end=0x42000
hint.flash.0.name="bootloader"
hint.flash.0.readonly=1
hint.flash.1.at="nand0"
hint.flash.1.start=0x42000
hint.flash.1.end=0x420000
hint.flash.1.name="kernelfs"
hint.flash.2.at="nand0"
hint.flash.2.start=0x420000
hint.flash.2.end=0x4200000
hint.flash.2.name="rootfs"
# SPI flash
hint.spi.0.at="nexus0"
hint.spi.0.maddr=0x1f000000
hint.spi.0.msize=0x10
hint.mx25l.0.at="spibus0"
hint.mx25l.0.cs=0
# shares the same bus with mx25l.
# CE low for flash, CE high for RTC
# at the moment it's just stub until SPI bus is ready for such hacks
# hint.rtc.0.at="spibus0"
# hint.rtc.0.cs=0
# Watchdog
hint.ar71xx_wdog.0.at="nexus0"
--Apple-Mail-1--549525150
Content-Disposition: attachment;
filename=dmesg.boot
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="dmesg.boot"
Content-Transfer-Encoding: 7bit
RouterBOOT booter 2.23
RouterBoard 450G
CPU frequency: 680 MHz
Memory size: 256 MB
Press any key within 2 seconds to enter setup..
Please, check ethernet cable...
trying bootp protocol... OK
Got IP address: 172.16.0.40
resolved mac address 00:E0:81:49:87:F7
Gateway: 172.16.0.1
transfer started ...................................... transfer ok, time=3.02s
setting up elf image... OK
jumping to kernel code
platform frequency: 680000000
arguments:
a0 = 00000008
a1 = a0861c00
a2 = 00000000
a3 = 00000000
Cmd line: console=ttyS0,115200 gpio=1983 HZ=340000000 mem=256M kmac=00:0C:42:59:30:FF board=450G boot=1 mlc=2
Environment:
envp is invalid
Cache info:
picache_stride = 4096
picache_loopcount = 16
pdcache_stride = 4096
pdcache_loopcount = 8
cpu0: MIPS Technologies processor v116.147
MMU: Standard TLB, 16 entries
L1 i-cache: 4 ways of 512 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
Config3=0x20
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2010 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 #17: Thu Jun 10 14:40:34 EEST 2010
root@tbilisi.intra:/usr/obj/mips/mips/usr/src.mips/sys/MIKROTIK mips
WARNING: WITNESS option enabled, expect reduced performance.
real memory = 33554432 (32768K bytes)
avail memory = 25894912 (24MB)
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
clock0: [FILTER]
apb0 at irq 4 on nexus0
apb0: [FILTER]
uart0: <16550 or compatible> on apb0
uart0: [FILTER]
uart0: console (115200,n,8,1)
ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000000-0x1bffffff irq 1 on nexus0
ehci0: [ITHREAD]
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0: <AR71XX Integrated USB 2.0 controller> on ehci0
pcib0 at irq 0 on nexus0
pcib0: [FILTER]
pci0: <PCI bus> on pcib0
pci0: <old, non-VGA display device> at device 0.0 (no driver attached)
pci0: <old, non-VGA display device> at device 1.0 (no driver attached)
pci0: <old, non-VGA display device> at device 2.0 (no driver attached)
pci0: <old, non-VGA display device> at device 3.0 (no driver attached)
pci0: <old, non-VGA display device> at device 4.0 (no driver attached)
pci0: <old, non-VGA display device> at device 5.0 (no driver attached)
pci0: <old, non-VGA display device> at device 6.0 (no driver attached)
pci0: <old, non-VGA display device> at device 7.0 (no driver attached)
pci0: <old, non-VGA display device> at device 8.0 (no driver attached)
pci0: <old, non-VGA display device> at device 9.0 (no driver attached)
pci0: <old, non-VGA display device> at device 10.0 (no driver attached)
pci0: <old, non-VGA display device> at device 11.0 (no driver attached)
pci0: <old, non-VGA display device> at device 12.0 (no driver attached)
pci0: <old, non-VGA display device> at device 13.0 (no driver attached)
pci0: <old, non-VGA display device> at device 14.0 (no driver attached)
pci0: <old, non-VGA display device> at device 15.0 (no driver attached)
pci0: <old, non-VGA display device> at device 16.0 (no driver attached)
pci0: <old, non-VGA display device> at device 17.0 (no driver attached)
pci0: <old, non-VGA display device> at device 18.0 (no driver attached)
pci0: <old, non-VGA display device> at device 19.0 (no driver attached)
pci0: <old, non-VGA display device> at device 20.0 (no driver attached)
pci0: <old, non-VGA display device> at device 21.0 (no driver attached)
pci0: <old, non-VGA display device> at device 22.0 (no driver attached)
pci0: <old, non-VGA display device> at device 23.0 (no driver attached)
pci0: <old, non-VGA display device> at device 24.0 (no driver attached)
pci0: <old, non-VGA display device> at device 25.0 (no driver attached)
pci0: <old, non-VGA display device> at device 26.0 (no driver attached)
pci0: <old, non-VGA display device> at device 27.0 (no driver attached)
pci0: <old, non-VGA display device> at device 28.0 (no driver attached)
pci0: <old, non-VGA display device> at device 29.0 (no driver attached)
pci0: <old, non-VGA display device> at device 30.0 (no driver attached)
pci0: <old, non-VGA display device> at device 31.0 (no driver attached)
arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0
miibus0: <MII bus> on arge0
ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
arge0: Ethernet address: 62:73:64:40:64:4b
arge0: [FILTER+ITHREAD]
arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0
arge1: Ethernet address: 62:73:64:ca:db:ce
arge1: [FILTER+ITHREAD]
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
spibus0: <unknown card> at cs 1
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
Unknown SPI flash device. Vendor: ff, device id: ffff
device_attach: mx25l0 attach returned 6
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Timecounter "MIPS32" frequency 340000000 Hz quality 800
Timecounters tick every 1.000 msec
bootpc_init: wired to interface 'arge0'
Sending DHCP Discover packet from interface arge0 (62:73:64:40:64:4b)
arge0: link state changed to DOWN
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <Atheros> at usbus0
uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 2 ports with 2 removable, self powered
DHCP/BOOTP timeout for server 255.255.255.255
arge0: link state changed to UP
--Apple-Mail-1--549525150
Content-Disposition: attachment;
filename=MIKROTIK
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="MIKROTIK"
Content-Transfer-Encoding: 7bit
#
# AR71XX
#
ident MIKROTIK
cpu CPU_MIPS4KC
options ISA_MIPS32
makeoptions TARGET_BIG_ENDIAN
makeoptions KERNLOADADDR=0x80050000
options HZ=1000
files "../atheros/files.ar71xx"
hints "AR71XX.hints"
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
#makeoptions MODULES_OVERRIDE=""
options DDB
options KDB
options SCHED_4BSD #4BSD scheduler
options INET #InterNETworking
options NFSCLIENT #Network Filesystem Client
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
options PSEUDOFS #Pseudo-filesystem framework
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
# options NFS_LEGACYRPC
# Debugging for use in -current
options DEADLKRES
options INVARIANTS
options INVARIANT_SUPPORT
options WITNESS
options WITNESS_SKIPSPIN
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options BOOTP
options BOOTP_NFSROOT
options BOOTP_NFSV3
options BOOTP_WIRED_TO=arge0
options BOOTP_COMPAT
options ROOTDEVNAME=\"nfs:172.16.0.100:/home/nfs\"
device pci
# Wireless NIC cards
options IEEE80211_DEBUG
options IEEE80211_SUPPORT_MESH
options IEEE80211_SUPPORT_TDMA
device wlan # 802.11 support
device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
device ath # Atheros pci/cardbus NIC's
options ATH_DEBUG
device ath_hal
option AH_SUPPORT_AR5416
option AH_RXCFG_SDMAMW_4BYTES # See NOTES for details of this WAR
device ath_rate_sample
device mii
device arge
device usb
options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order
options USB_DEBUG
device ohci
device ehci
device spibus
device ar71xx_spi
device mx25l
device geom_redboot
device ar71xx_wdog
device uart
device loop
device ether
device md
device bpf
device random
device if_bridge
--Apple-Mail-1--549525150
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
--Apple-Mail-1--549525150--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9C6B899F-0361-4E20-A9C4-20C002A3CA1D>
