Przygotowanie i instalacja OpenWrt na modemie USRobotics UR9108
Ostatnia zmiana: 2013-11-26 18:43
USRobotics USR9108 jest modemem/ruterem ADSL dość wiekowym, ale nadal ciekawym pod względem sprzętowym. Jego krótka specyfikacja:
- procesor BCM6348 250MHz
- flash 4MB
- ram 16MB
- 1x USB 1.1 host
- 1x RS232C TTL
- 1x jtag
- WiFi 802.11b/g (Broadcom 4318) w slocie minipci
- czteroportowy przełącznik z obsługą vlanów
- modem ADSL
Obecnie obsługuje go OpenWrt w wersji rozwojowej - trunk oraz stabilnej - Backfire. Poza modemem ADSL wspierane są wszystkie pozostałe elementy - USB, przełącznik, rs, wifi. Można użyć gotowego obrazu z openwrt.org lub skompilować samodzielnie.
Kompilacja
Należy użyć i skompilować aktualną wersję OpenWrt Trunk pobraną z svn. Jako platformę należy wybrać
Broadcom BCM63xx [2.6], target profile -
Broadcom WiFi (default), target image -
squashfs. W
Kernel modules -> Wireless drivers należy zaznaczyć
kmod-b43 oraz
Remove unnecessary firmware files podając
5 jako
Core revision to include oraz
G w
PHY types to include. Pozwoli to na zmniejszenie rozmiaru obrazu wynikowego przez usunięcie zbędnych plików z firmware. Z kolei w
Kernel modules -> USB Support należy zaznaczyć
kmod-usb-core oraz
kmod-usb-ohci. Urządzenie nie ma USB 2.0, więc opcji
kmod-usb2 nie ma sensu zaznaczać. Jeżeli będziemy używać kodowania WPA2, w
Network należy upewnić się, że jest zaznaczony program
wpad-mini. Przydatne będzie także zaznaczenia pakietów
crda oraz
iw (pakiety do zarządzania interfejsem radiowym). Inne pakiety można zaznaczyć wg potrzeb.
Firmware należy skompilować w standardowy sposób (make). Plik wynikowy dla USR9108 to
openwrt-USR9108-squashfs-cfe.bin.
Instalacja przez CFE
Należy przygotować komputer połączony kablem ethernet z ruterem. Adres komputera powinien być nadany statycznie, 192.168.1.100. Należy także zainstalować dowolny serwer tftp, uruchomić go i w jego głównym katalogu umieścić plik
openwrt-USR9108-squashfs-cfe.bin.
Obecnie instalacja możliwa jest tylko przy pomocy kabla RS232C dołączonego do złącza na płytce urządzenia (złącze obok CPU - 4piny: pin1 (kwadrat) - Tx,Rx,VCC,GND). Ustawiamy prędkość 115200 8N1 a następnie włączony zasilanie. W trakcie uruchamiania CFE należy nacisnąć dowolny klawisz. Flaszowanie odbywa się przy pomocy polecenia
cfe> flashimage 192.168.1.100:openwrt-USR9108-squashfs-cfe.bin
z poziomu CFE.
Instalacja przez www
Oczywiście można zainstalować też OpenWrt korzystając z opcji aktualizacji w oryginalnym firmware. Tak po prostu.
Podział przełącznika
Port 4 jako WAN, porty 1,2,3 - jako LAN. Konfiguracja w /etc/config/network
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'lan'
option 'type' 'bridge'
option 'ifname' 'eth1.0'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'
config 'interface' 'wan'
option 'ifname' 'eth1.1'
option 'proto' 'dhcp'
config 'switch' 'eth1'
option 'enable_vlan' '1'
option 'reset' '1'
config 'switch_vlan' 'eth1_0'
option 'device' 'eth1'
option 'vlan' '0'
option 'ports' '0 1 2 4 5t'
config 'switch_vlan' 'eth1_1'
option 'device' 'eth1'
option 'vlan' '1'
option 'ports' '3 5t'
Bootlog
CFE version 1.0.37-4.3 for BCM96348 (32bit,SP,BE)
Build Date: Tue Jan 17 07:46:56 CST 2006 (root@new-host-2)
Copyright (C) 2000-2005 Broadcom Corporation.
Boot Address 0xbfc00000
Initializing Arena.
Initializing Devices.
Parallel flash device: name M29W320ET, id 0x2256, size 4096KB
CPU type 0x29107: 256MHz, Bus: 128MHz, Ref: 32MHz
Total memory: 16777216 bytes (16MB)
Total memory used by CFE: 0x80401000 - 0x805252C0 (1196736)
Initialized Data: 0x8041C590 - 0x8041EA50 (9408)
BSS Area: 0x8041EA50 - 0x804232C0 (18544)
Local Heap: 0x804232C0 - 0x805232C0 (1048576)
Stack Area: 0x805232C0 - 0x805252C0 (8192)
Text (code) segment: 0x80401000 - 0x8041C590 (112016)
Boot area (physical): 0x00526000 - 0x00566000
Relocation Factor: I:00000000 - D:00000000
Board IP address : 192.168.1.1
Host IP address : 192.168.1.100
Gateway IP address :
Run from flash/host (f/h) : f
Default host run file name : vmlinux
Default host flash file name : bcm963xx_fs_kernel
Boot delay (0-9 seconds) : 1
Board Id Name : 96348GW-A
Psi size in KB : 24
Number of MAC Addresses (1-32) : 11
Base MAC Address : 00:14:c1:1f:c0:e9
Ethernet PHY Type : External Switch Using Reverse MII
Memory size in MB : 16
Country code : FR
Press any key to stop auto run (1 seconds)
Auto run second count down: 0
Code Address: 0x80010000, Entry Address: 0x80010000
Decompression OK!
Entry at 0x80010000
Closing network.
Starting program at 0x80010000
Linux version 2.6.35.9 (cezary@eko.one.pl) (gcc version 4.3.3 (GCC) ) #4 Thu Feb 10 17:47:31 CET 2011
Detected Broadcom 0x6348 CPU revision b0
CPU frequency is 256 MHz
16MB of RAM installed
registering 37 GPIOs
board_bcm963xx: CFE version: 1.0.37-4.3
bootconsole [early0] enabled
CPU revision is: 00029107 (Broadcom BCM6348)
board_bcm963xx: board name: 96348GW-A
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 8028a6b0, node_mem_map 802dc000
Normal zone: 32 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 4064 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 13296k/16384k available (2167k kernel code, 3088k reserved, 372k data, 160k init, 0k highmem)
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:128
Calibrating delay loop... 254.97 BogoMIPS (lpj=509952)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:01.0: reg 10: [mem 0x00000000-0x00001fff]
pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30001fff]
pci 0000:00:01.0: BAR 0: set to [mem 0x30000000-0x30001fff] (PCI address [0x30000000-0x30001fff]
Switching to clocksource MIPS
PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:01.0 to 64
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0D, vendor 0x4243)
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
ssb: Core 2 found: PCI (cc 0x804, rev 0x0C, vendor 0x4243)
ssb: Core 3 found: PCMCIA (cc 0x80D, rev 0x07, vendor 0x4243)
ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
PCI: CLS 0 bytes, default 32
audit: initializing netlink socket (disabled)
type=2000 audit(0.316:1): initialized
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 25
io scheduler noop registered
io scheduler deadline registered (default)
gpiodev: gpio device registered with major 254
bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0300 (irq = 10) is a bcm63xx_uart
console [ttyS0] enabled, bootconsole disabled
bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
CFI mfr 0x00000020
CFI id 0x00002256
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.0.
bcm963xx: Swapping erase regions for top-boot CFI table.
number of CFI chips: 1
bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE boot tag found with version 6 and board type 96348GW-A
bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
bcm963xx_flash: Partition 1 is kernel offset 10100 and length dff00
bcm963xx_flash: Partition 2 is rootfs offset f0000 and length 300000
bcm963xx_flash: Partition 3 is nvram offset 3f0000 and length 10000
bcm963xx_flash: Partition 4 is linux offset 10000 and length 3e0000
bcm963xx_flash: Spare partition is 3b0000 offset and length 40000
Creating 5 MTD partitions on "bcm963xx":
0x000000000000-0x000000010000 : "CFE"
0x000000010100-0x0000000f0000 : "kernel"
mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
0x0000000f0000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=3A0000, len=50000
0x0000003a0000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
0x000000010000-0x0000003f0000 : "linux"
bcm63xx_enet MII bus: probed
bcm63xx_wdt started, timer margin: 30 sec
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 160k freed
eth1: link forced UP - 100/full - flow control off/off
roboswitch: Probing device eth0:
No Robo switch in managed mode found, phy_id = 0xffffffff
roboswitch: Probing device eth1: found a 5325! It's a 5350.
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
eth1: link forced UP - 100/full - flow control off/off
device eth1.0 entered promiscuous mode
device eth1 entered promiscuous mode
br-lan: port 1(eth1.0) entering forwarding state
br-lan: port 1(eth1.0) entering forwarding state
Compat-wireless backport release: compat-wireless-2011-01-31-4-g86702b3
Backport based on wireless-testing.git master-2011-02-07
cfg80211: Calling CRDA to update world regulatory domain
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: World regulatory domain updated:
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
b43-phy0: Broadcom 4318 WLAN found (core revision 9)
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
Registered led device: b43-phy0::radio
Broadcom 43xx driver loaded [ Features: PL, GPIO LED Mask: 0x000f, Firmware-ID: FW13 ]
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (210 buckets, 840 max)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 1
bcm63xx_ohci bcm63xx_ohci.0: irq 20, io mem 0xfffe1b00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
fuse init (API version 7.14)
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)