Flameman/routerstation-pro

From eLinux.org
< Flameman
Revision as of 12:24, 17 April 2012 by Legacy (Talk | contribs) (freebsd/mips ???)

Jump to: navigation, search

For more interesting projects done by Flameman, be sure to check out his project index


this page is under development ...

main

The RouterStation Pro is an Atheros AR7161 MIPS.v2-based board. Geared towards networking applications, it has all of the usual features as well as three type IIIA mini-PCI slots and an on-board 3-port 10/100/1000 Ethernet switch, in addition to the 10/100/1000 Ethernet WAN port which supports Power-over-Ethernet.

Hardware
Info
Architecture: MIPS.v2, BigEndian
Vendor: Atheros
Bootloader: RedBoot
System-On-Chip: Atheros MIPS 24K
CPU Speed: 680 Mhz
Flash-Chip:
Flash size: 16 MiB
RAM: 64 MiB DDR
Wireless: 3x 32-bit Mini-PCI slots (None included)
Switch: Ethernet Phy switch, ADMTEK "Infineon" ADM6996FC
Ethernet ports: 3x 10/100 BASE-TX (Cat. 5, RJ-45) Ethernet Interface with PoE on WAN
USB: Yes v2.0
Serial: Yes
JTAG: Yes


Boot Process

The RouterStation uses RedBoot as its boot loader. In the default configuration (shipping as of December 2008), a basic Linux kernel and BusyBox userspace is loaded from flash. The RedBoot boot sequence can be interrupted and a kernel loaded via TFTP instead.

RedBoot uses the WAN port for its network interface.

Once the system is booted, login with username/password ubnt to access the shell.

memory layout

Board: Ubiquiti RouterStation PRO
 Arch: ar7100pro
  RAM: 0x80000000-0x88000000, [0x8003bf00-0x87fe1000] available
Flash: 0xbf000000-0xc0000000, in 256 blocks of 0x00010000 bytes each


redboot

flameman/redboot

do not use this

load -r -b 0x80040000 -h 192.168.1.14 gentoo-ubiquiti

put a kernel.elf in the /tftpboot folder and just type

load kernel.elf


Just a quick note

more to myself than anyone else, but I wasn't able to easily find this information online, trolling through the OpenWRT and Ubiquiti forums.

I wanted to try booting different kernels on the device before committing to flashing, so that all I had to do was reboot the board and everything would come back up as normal. It seems obvious that this should be possible, and with a bit of digging around in RedBoot docs, trial and error, and a few lucky guesses I was able to figure out the incantation to make RedBoot load an uncompressed linux kernel (ELF) and boot it:

load -m tftp -h 192.168.1.1 openwrt-ar71xx-generic-vmlinux.elf
exec -c "board=UBNT-RSPRO panic=1"

Note that this does not change the root filesystem, so if your modules aren't compatible, this won't work, but I suspect if you use an embedded initrd you can run the system entirely out of RAM without touching flash.




linux kernel

expected lzma compressed kernel ( -d means decompress )

RedBoot> cache off
RedBoot> fis load -d -e kernel
RedBoot> go

i am integrating 2.6.32.27 to mips-v2 ar71xx, a lot of patches to be committed

issue

miniPci problem

on routerboard pro all the 3 miniPci are is incompatible with many non-Atheros miniPCI cards, especially with

  • wifi cards ipw2x00
  • multi uart 16c650


not tested, but it seems they are supported

  • TP-Link TL-WN861N wireless minipci card
  • Ubiquiti SR2 WiFi Mini-PCI Radio


bad thing happening on pci

insmod ipw2200

ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq
ipw2200: Copyright(c) 2003-2006 Intel Corporation
PCI: Enabling device 0000:00:11.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:11.0 to 64
ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
PCI error 1 at PCI addr 0x10000024
Data bus error, epc == 87141c58, ra == 8714d360
Oops[#1]:
Broadcom 43xx wireless support

pci 0000:00:13.0: BAR 0: assigned [mem 0x10000000-0x10001fff]
pci 0000:00:13.0: BAR 0: set to [mem 0x10000000-0x10001fff] (PCI address [0x10000000-0x10001fff])
PCI: mapping irq 74 to pin1@0000:00:13.0
Switching to clocksource MIPS
cfg80211: Calling CRDA to update world regulatory domain
Switched to NOHz mode on CPU #0
PCI error 1 at PCI addr 0x10001000
Data bus error, epc == 80204808, ra == 802f207c


it seems an hardware issue (may bepossible ???)

reason why

static struct resource ar71xx_pci_io_resource = 
       {
       .name = "PCI IO space",
       .start = 0,
       .end = 0,
       .flags = IORESOURCE_IO,
       };
static struct resource ar71xx_pci_mem_resource = 
       {
       .name = "PCI memory space",
       .start = AR71XX_PCI_MEM_BASE,
       .end = AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE - 1,
       .flags = IORESOURCE_MEM
       };
static struct pci_controller ar71xx_pci_controller = 
       {
       .pci_ops = &ar71xx_pci_ops,
       .mem_resource = &ar71xx_pci_mem_resource,
       .io_resource = &ar71xx_pci_io_resource,
       };


  • pci_io_resource size is equal to 0
  • the PCI driver for ar71xx currently (1) doesn't support I/O allocations, only memory allocations
  • therefore any card requiring I/O won't work for now on ar71xx.
  • I/O can only be accessed indirectly on ar71xx, so the driver needs special handling for I/O accesses.


(1) currently: dunno if it is possible, it may be an hardware limitation, i have to investigate about this, i mean having the data sheet doesn't help since reading/writing to IO space is already possible, but it isn't exposed. the problem is that the PCI IO space can't be mapped directly into the normal address space, so it may be you need to write special handling for IO space accesses. Which, in case it is enough to fix the problem, nobody hasn't done yet.

see http://en.wikipedia.org/wiki/Conventional_PCI#PCI_command_codes


  • 0010 I/O Read - performs a read from I/O space. All 32 bits of the read address are provided, so that a device can (for compatibility reasons) implement less than 4 bytes worth of I/O registers. If the byte enables request data not within the address range supported by the PCI device (e.g. a 4-byte read from a device which only supports 2 bytes of I/O address space), it must be terminated with a target abort. Multiple data cycles are permitted, using linear (simple incrementing) burst ordering.The PCI standard is discouraging the use of I/O space in new devices, preferring that as much as possible be done through main memory mapping.
  • 0011 I/O Write - performs a write to I/O space.
  • 0110 Memory Read - performs a read cycle from memory space. Because the smallest memory space a PCI device is permitted to implement is 16 bits, the two least significant bits of the address are not needed; equivalent information will arrive in the form of byte select signals. They instead specify the order in which burst data must be returned. If a device does not support the requested order, it must provide the first word and then disconnect. If a memory space is marked as "prefetchable", then the target device must ignore the byte select signals on a memory read and always return 32 valid bits.
  • 0111 Memory Write - operates similarly to a memory read. The byte select signals are more important in a write, as unselected bytes must not be written to memory.Generally, PCI writes are faster than PCI reads, because a device can buffer the incoming write data and release the bus faster. For a read, it must delay the data phase until the data has been fetched.

currently working mini pci board

the PCI controller in ar71xx SoCs only provides access to PCI memory space and PCI configuration space, but not to PCI IO space. you need to write special handling for IO space accesses, which handle the pci io request mapping it into a memory request: this piece of code is missing.

so currently, generally

  • wont work: any mini pci card that needs PCI IO space
  • will work: any mini pci card that ONLY needs PCI mem space

tested board

  • ...
  • wifi tp-link, which is atheros-wifi, it uses pci_mem only

dmesg-vanilla-2.6.39+hack

[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa2
[    0.000000] Kernel command line: root=/dev/sda2 console=ttyS0,115200 init=/bO
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32s
[    0.000000] Writing ErrCtl register=00002822
[    0.000000] Readback ErrCtl register=00002822
[    0.000000] Memory: 124160k/131072k available (3680k kernel code, 6912k rese)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, N1
[    0.000000] NR_IRQS:80
[    0.000000] Console: colour dummy device 80x25
[    0.000000] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.060000] devtmpfs: initialized
[    0.070000] NET: Registered protocol family 16
[    0.070000] MIPS: machine is Ubiquiti RouterStation Pro
[    0.380000] registering PCI controller with io_map_base unset
[    0.380000] ar71xx: using random MAC address for eth0
[    2.690000] bio: create slab <bio-0> at 0
[    2.700000] SCSI subsystem initialized
[    2.700000] usbcore: registered new interface driver usbfs
[    2.710000] usbcore: registered new interface driver hub
[    2.710000] usbcore: registered new device driver usb
[    2.720000] pci_bus 0000:00: scanning bus
[    2.720000] pci 0000:00:00.0: [0700:1107] type 0 class 0x000000
[    2.720000] pci 0000:00:00.0: calling 0x803f0238
[    2.720000] pci 0000:00:00.0: calling 0x80315434
[    2.720000] pci 0000:00:00.0: calling 0x803159fc
[    2.720000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0fffffff pref]
[    2.720000] pci 0000:00:00.0: reg 14: [io  0x0000-0x00ff]
[    2.720000] pci 0000:00:00.0: calling 0x803f06ac
[    2.720000] pci 0000:00:00.0: supports D1 D2
[    2.720000] pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
[    2.720000] pci 0000:00:00.0: PME# disabled
[    2.720000] pci 0000:00:13.0: [168c:0029] type 0 class 0x000280
[    2.720000] pci 0000:00:13.0: calling 0x80061e20
[    2.720000] pci 0000:00:13.0: calling 0x803f0238
[    2.720000] pci 0000:00:13.0: calling 0x80315434
[    2.720000] pci 0000:00:13.0: calling 0x803159fc
[    2.720000] pci 0000:00:13.0: reg 10: [mem 0x00000000-0x0000ffff]
[    2.720000] pci 0000:00:13.0: calling 0x803f06ac
[    2.720000] pci 0000:00:13.0: PME# supported from D0 D3hot
[    2.720000] pci 0000:00:13.0: PME# disabled
[    2.720000] pci_bus 0000:00: fixups for bus
[    2.720000] pci_bus 0000:00: bus scan returning with max=00
[    2.720000] pci 0000:00:13.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[    2.720000] pci 0000:00:13.0: BAR 0: set to [mem 0x10000000-0x1000ffff] (PCI)
[    2.730000] pci 0000:00:00.0: fixup irq: got 0
[    2.730000] PCI: mapping irq 74 to pin1@0000:00:13.0
[    2.730000] pci 0000:00:13.0: fixup irq: got 74
[    2.730000] Switching to clocksource MIPS
[    2.740000] cfg80211: Calling CRDA to update world regulatory domain
[    2.750000] Switched to NOHz mode on CPU #0
[    2.760000] NET: Registered protocol family 2
[    2.760000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.770000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    2.780000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    2.780000] TCP: Hash tables configured (established 4096 bind 4096)
[    2.790000] TCP reno registered
[    2.790000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.800000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.810000] NET: Registered protocol family 1
[    2.810000] pci 0000:00:00.0: calling 0x80212b30
[    2.810000] pci 0000:00:00.0: calling 0x803f2f74
[    2.810000] pci 0000:00:13.0: calling 0x80212b30
[    2.810000] pci 0000:00:13.0: calling 0x803f2f74
[    2.810000] PCI: CLS 0 bytes, default 32
[    2.820000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.830000] msgmni has been set to 242
[    2.840000] io scheduler noop registered
[    2.840000] io scheduler deadline registered (default)
[    2.840000] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    2.850000] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    3.130000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.160000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    3.160000] console [ttyS0] enabled, bootconsole disabled
[    3.180000] loop: module loaded
[    3.180000] lkdtm: No crash points registered, enable through debugfs
[    3.190000] SCSI Media Changer driver v0.25 
[    3.190000] Atheros AR71xx SPI Controller driver version 0.2.4
[    4.300000] ag71xx_mdio: probed
[    4.300000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    4.830000] eth0: connected to PHY at ag71xx-mdio:04 [uid=004dd041, driver=A]
[    4.830000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    5.350000] eth1: AR8316 switch driver attached.
[    5.370000] ar8316: Using port 4 as PHY
[    6.330000] eth1: connected to PHY at ag71xx-mdio:00 [uid=004dd041, driver=A]
[    6.330000] PCI: Enabling device 0000:00:13.0 (0000 -> 0002)
[    6.330000] ath9k 0000:00:13.0: enabling bus mastering
[    7.890000] ath: EEPROM regdomain: 0x809c
[    7.890000] ath: EEPROM indicates we should expect a country code
[    7.890000] ath: doing EEPROM country->regdmn map search
[    7.890000] ath: country maps to regdmn code: 0x52
[    7.890000] ath: Country alpha2 being used: CN
[    7.890000] ath: Regpair used: 0x52
[    7.890000] cfg80211: Updating information on frequency 2412 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2417 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2422 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2427 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2432 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2437 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2442 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2447 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2452 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2457 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2462 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (N/A mBi, 2000 mBm)
[    7.890000] cfg80211: Disabling freq 2467 MHz as custom regd has no rule thal
[    7.890000] cfg80211: Disabling freq 2472 MHz as custom regd has no rule thal
[    7.890000] cfg80211: Disabling freq 2484 MHz as custom regd has no rule thal
[    7.890000] cfg80211: Updating information on frequency 2412 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2417 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2422 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2427 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2432 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2437 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2442 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2447 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2452 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2457 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2462 MHz for a 20 MH:
[    7.890000] cfg80211: 2402000 KHz - 2472000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2467 MHz for a 20 MH:
[    7.890000] cfg80211: 2457000 KHz - 2482000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2472 MHz for a 20 MH:
[    7.890000] cfg80211: 2457000 KHz - 2482000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] cfg80211: Updating information on frequency 2484 MHz for a 20 MH:
[    7.890000] cfg80211: 2474000 KHz - 2494000 KHz @  KHz), (600 mBi, 2000 mBm)
[    7.890000] ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_cont'
[    7.890000] cfg80211: Pending regulatory request, waiting for it to be proce.
[    7.890000] Registered led device: ath9k-phy0
[    7.890000] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=74
[    7.900000] usbcore: registered new interface driver ath9k_htc
[    7.910000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.910000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    7.920000] ar71xx-ohci ar71xx-ohci: Atheros AR71xx built-in OHCI controller
[    7.930000] ar71xx-ohci ar71xx-ohci: new USB bus registered, assigned bus nu1
[    7.930000] ar71xx-ohci ar71xx-ohci: irq 14, io mem 0x1c000000
[    8.000000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[    8.010000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber1
[    8.010000] usb usb1: Product: Atheros AR71xx built-in OHCI controller
[    8.020000] usb usb1: Manufacturer: Linux 2.6.39-flesh-eating-bats-ubiquiti-d
[    8.030000] usb usb1: SerialNumber: ar71xx-ohci
[    8.030000] hub 1-0:1.0: USB hub found
[    8.040000] hub 1-0:1.0: 2 ports detected
[    8.040000] usbcore: registered new interface driver uas
[    8.050000] Initializing USB Mass Storage driver...
[    8.050000] usbcore: registered new interface driver usb-storage
[    8.060000] USB Mass Storage support registered.
[    8.060000] Atheros AR71xx hardware watchdog driver version 0.1.0
[    8.070000] ar71xx-wdt: timeout=15 secs (max=23)
[    8.070000] TCP westwood registered
[    8.080000] NET: Registered protocol family 17
[    8.080000] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[    8.090000] All bugs added by David S. Miller <davem@redhat.com>
[    8.090000] lib80211: common routines for IEEE802.11 drivers
[    8.100000] lib80211_crypt: registered algorithm 'NULL'
[    8.100000] lib80211_crypt: registered algorithm 'WEP'
[    8.100000] lib80211_crypt: registered algorithm 'CCMP'
[    8.100000] lib80211_crypt: registered algorithm 'TKIP'
[    8.100000] Waiting 2sec before mounting root device...
[    8.380000] usb 1-1: new full speed USB device number 2 using ar71xx-ohci
[    8.560000] usb 1-1: New USB device found, idVendor=0781, idProduct=5567
[    8.560000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    8.570000] usb 1-1: Product: Cruzer Blade
[    8.580000] usb 1-1: Manufacturer: SanDisk
[    8.580000] usb 1-1: SerialNumber: 35503304FBA0FA0F
[    8.590000] scsi0 : usb-storage 1-1:1.0
[    8.730000] usb 1-2: new full speed USB device number 3 using ar71xx-ohci
[    8.910000] usb 1-2: New USB device found, idVendor=05e3, idProduct=0723
[    8.910000] usb 1-2: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[    8.920000] usb 1-2: Product: USB Storage
[    8.930000] usb 1-2: Manufacturer: Generic 
[    8.930000] usb 1-2: SerialNumber: 000000009454
[    8.940000] scsi1 : usb-storage 1-2:1.0
[    9.590000] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     8.02 PS
[    9.610000] sd 0:0:0:0: [sda] 7856127 512-byte logical blocks: (4.02 GB/3.74)
[    9.620000] sd 0:0:0:0: [sda] Write Protect is off
[    9.630000] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
[    9.630000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    9.650000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    9.680000]  sda: sda1 sda2
[    9.700000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    9.710000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    9.940000] scsi 1:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9454 P0
[    9.970000] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[   10.160000] EXT3-fs: barriers not enabled
[   10.170000] EXT3-fs (sda2): mounted filesystem with writeback data mode
[   10.170000] VFS: Mounted root (ext3 filesystem) readonly on device 8:2.
[   10.180000] kjournald starting.  Commit interval 5 seconds
[   10.200000] devtmpfs: mounted
[   10.210000] Freeing unused kernel memory: 176k freed
[   10.730000] Algorithmics/MIPS FPU Emulator v1.5
[   31.530000] EXT3-fs (sda2): warning: mounting unchecked fs, running e2fsck id
[   31.550000] EXT3-fs (sda2): using internal journal
mips32-routerboard-pro / # 

currently not working mini pci board

  • wont work uart: PCI one chip solution OXFORD OXuPCI954, for uart 16c950 [1]
  • wont work sata: PCI one chip solution VIA VT6421A

if you ever thought to build your own miniPCI card

From this bad experience i also understand that the PCI bus specifiction requires appropriate electrical signals for interface logic, so if you want to interface some chip to PCI bus you must use only PCI compliance chips!!!

One solution is to use commercial ASIC PCI bridge. Another is to implement PCI interface with PCI compliance programmable logic chip. For additional information about PCI interfaces look at PLD vendors site.

So the conclusion is: if you don't need high transfer data rate use serial or parallel port, or USB bus.

doc

http://wiki.openwrt.org/toh/ubiquiti/routerstation.pro

http://www.ubnt.com/forum/


redboot manual

http://ecos.sourceware.org/docs-latest/redboot/redboot-guide.html

an idea to install openWrt

Setup instructions

You will need the following:

  • A serial cable - female to female (or female to male + gender changer). The cable must be straight through, *not* a null modem cable.
  • USB flash drive or hard disk that is able to be powered from the board's USB port.
  • tftp server installed on your workstation.

Preparation

The following instructions assume that /dev/sdb corresponds to the USB disk when it is plugged into your workstation. If this is not the case in your setup, please be careful to substitute the correct device name in all commands where appropriate.

   Build an image using "routerstationpro" as the MACHINE. For example, you can build core-image-minimal.
   Partition the USB drive so that primary partition 1 is type Linux (83). Minimum size depends on your root image size - core-image-minimal probably only needs 8-16MB, while other images will need more.# fdisk /dev/sdb
   Command (m for help): pDisk /dev/sdb: 4011 MB, 4011491328 bytes
   124 heads, 62 sectors/track, 1019 cylinders, total 7834944 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 512 bytes
   I/O size (minimum/optimal): 512 bytes / 512 bytes
   Disk identifier: 0x0009e87dDevice Boot Start End Blocks Id System
   /dev/sdb1 62 1952751 976345 83 Linux
   Format partition 1 on the USB as ext3# mke2fs -j /dev/sdb1
   Mount partition 1 and then extract the contents of tmp/deploy/images/core-image-XXXX.tar.bz2 into it (preserving permissions).# mount /dev/sdb1 /media/sdb1
   # cd /media/sdb1
   # tar -xvjpf tmp/deploy/images/core-image-XXXX.tar.bz2
   Unmount the USB drive and then plug it into the board's USB port
   Connect the board's serial port to your workstation and then start up your favourite serial terminal so that you will be able to interact with the serial console. If you don't have a favourite, picocom is suggested:$ picocom /dev/ttyUSB0 -b 115200
   Connect the network into eth0 (the one that is NOT the 3 port switch). If you are using power-over-ethernet then the board will power up at this point.
   Start up the board, watch the serial console. Hit Ctrl+C to abort the autostart if the board is configured that way (it is by default). The bootloader's fconfig command can be used to disable autostart and configure the IP settings if you need to change them (default IP is 192.168.1.20).
   Make the kernel (tmp/deploy/images/vmlinux-routerstationpro.bin) available on the tftp server.
   If you are going to write the kernel to flash, remove the current kernel and rootfs flash partitions. You can list the partitions using the following bootloader command:RedBoot> fis list
   You can delete the existing kernel and rootfs with these commands:RedBoot> fis delete kernel
   RedBoot> fis delete rootfs

Booting a Kernel Directly

Load the kernel using the following bootloader command:

RedBoot> load -m tftp kernel-ubiquiti.bin

You should see a message on it being successfully loaded.

Execute the kernel:

RedBoot> exec -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO"


NOTE: Specifying the command line with -c is important as linux-yocto does not provide a default command line.

NOTE: you MUST declare board=UBNT-RSPRO, case the kernel needs this information to enable specific hw initialization, if you do not provide board=UBNT-RSPRO the kernel will consider "generic" profile (no usb, no ethernet, etc)

Writing a Kernel to Flash

Go to your tftp server and gzip the kernel you want in flash. It should halve the size.

Load the kernel using the following bootloader command:

RedBoot> load -r -b 0x80600000 -m tftp -h kernel-ubiquiti.bin.gz

This command should output something similar to the following:Raw file loaded 0x80600000-0x8087c537, assumed entry at 0x80600000

Calculate the length by subtracting the first number from the second number and then rounding the result up to the nearest 0x1000.

Using the length calculated above, create a flash partition for the kernel

RedBoot> fis create -b 0x80600000 -l 0x240000 kernel

NOTE: Change 0x240000 to your rounded length and change "kernel" to whatever you want to name your kernel

Booting a Kernel from Flash

To boot the flashed kernel perform the following steps.

At the bootloader prompt, load the kernel

RedBoot> fis load -d -e kernel

NOTE: Change the name "kernel" above if you chose something different earlier. Also, -e means 'elf' and -d means 'decompress'.

Execute the kernel using the exec command as above.

Automating the Boot Process

After writing the kernel to flash and testing the load and exec commands manually, you can automate the boot process with a boot script.

RedBoot> fconfig

NOTE: Answer the questions not specified here as they pertain to your environment.


Run script at boot: trueBoot 
script:
   .. fis load -d -e kernel
    .. exec
    Enter script, terminate with empty line>> fis load -d -e kernel
>> exec -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO"
>>


Answer the remaining questions and write the changes to flash:

Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0xbfff0000-0xc0000000: .
... Program from 0x87ff0000-0x88000000 at 0xbfff0000: .
Power cycle the board.

other os

openwrt (linux)

freebsd/mips ???

Category