Personal tools
You are here: Home Wireless OpenWRT 8.09 and X-Wrt Installation on PC Engines Wrap

OpenWRT 8.09 and X-Wrt Installation on PC Engines Wrap

Howto get OpenWRT v8.09 r14511 installed and running on a x86 Wrap with an Atheros AR5006X wireless radio

Write the image to a 64MByte compact flash card, and boot. Use minicom as a console on the serial port at 38400,8,n,1.

Using the console, reconfigure the network settings from their defaults so that the 'lan' interface is operational in the local environment:

# Copyright (C) 2006 OpenWrt.org

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 ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.0.126
        option netmask  255.255.255.0
        option gateway  192.168.0.254
        option dns      192.168.0.18

 Apply the changes to the lan network configuration:

# ifup lan

Set the root password using the console:

# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root

Using the LuCI web configuration to customise

 Login as root, using the password set above

OpenWRT login

 

Software packages added:

  • kmod-i2c-scx200
  • kmod-leds-wrap
  • kmod-ath5k
  • hostapd
  • iw
  • kmod-ieee80211

 

SSH

Upload SSH public key into the router. This is just one long line copied from ~/.ssh/id_dsa.pub

(or from putty etc)

OpenWRT - System - SSH-Keys

Disable password based authentication:

OpenWrt - Services - Dropbear SSHd

 

Wireless

Configure the wireless interface for WPA2 with a PSK.

OpenWrt - Network - Networks - WLan

VERY IMPORTANT: Using the ath5k driver failed to achieve a positive outcome (a lot of wasted time). The driver is close to being fully functional, but the interface didn't come up automatically. This setup uses the madwifi kernel module. Note that the type for wadwifi in the configuration file is 'atheros', whereas the type for ath5k is 'mac80211'.

config 'wifi-device' 'wifi0'
        option 'type' 'atheros'
        option 'disabled' '0'
        option 'diversity' '1'
        option 'channel' '8'
        option 'hwmode' '11g'

config 'wifi-iface'
        option 'device' 'wifi0'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'ssid' 'Newnham'
        option 'encryption' 'psk2'
        option 'key' 'dnsdy83rw78erjhsdfnjdfsnHJHJHdh383838...a long secret.. kgsdjhfs8' 

LEDS

With the kmod-leds-wrap package installed, it is possible to configure the LEDs on the Wrap. e.g.

OpenWrt - System - LED Configuration

 

Links

Appendices

 

default /etc/config/network configuration

# Copyright (C) 2006 OpenWrt.org

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 ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

'ifup lan' log

# ifup lan
br-lan: port 1(eth0) entering disabled state
eth0: remaining active for wake-on-lan
device eth0 left promiscuous mode
br-lan: port 1(eth0) entering disabled state
eth0: DSPCFG accepted after 0 usec.
eth0: link up.
eth0: Setting full-duplex based on negotiated link capability.
br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state

 

Boot log

Linux version 2.6.25.17 (nbd@baustelle) (gcc version 4.1.2) #1 Sun Feb 15 02:46:19 CET 2009
BIOS-provided physical RAM map:
 BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
 BIOS-e801: 0000000000100000 - 0000000004000000 (usable)
64MB LOWMEM available.
Scan SMP from c0000000 for 1024 bytes.
Scan SMP from c009fc00 for 1024 bytes.
Scan SMP from c00f0000 for 65536 bytes.
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->    16384
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    16384
DMI not present or invalid.
Allocating PCI resources starting at 10000000 (gap: 04000000:fc000000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: block2mtd.block2mtd=/dev/hda2,65536,rootfs root=/dev/mtdblo
ck0 rootfstype=jffs2 init=/etc/preinit  noinitrd console=tty0 console=ttyS0,38400n8 reboot=bios
No local APIC present or hardware disabled
Initializing CPU#0
PID hash table entries: 256 (order: 8, 1024 bytes)
Detected 233.291 MHz processor.
Console: colour dummy device 80x25
console [tty0] enabled
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 62156k/65536k available (1405k kernel code, 2968k reserved, 583k data, 1
56k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffb9000 - 0xfffff000   ( 280 kB)
    vmalloc : 0xc4800000 - 0xfffb7000   ( 951 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
      .init : 0xc02f4000 - 0xc031b000   ( 156 kB)
      .data : 0xc025f7a8 - 0xc02f145c   ( 583 kB)
      .text : 0xc0100000 - 0xc025f7a8   (1405 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Calibrating delay using timer specific routine.. 467.38 BogoMIPS (lpj=2336921)
Mount-cache hash table entries: 512
Compat vDSO mapped to ffffe000.
CPU: NSC Unknown stepping 01
Checking 'hlt' instruction... OK.
Checking for popad bug... OK.
Freeing SMP alternatives: 0k freed
net_namespace: 540 bytes
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfc2b3, last bus=0
PCI: Using configuration type 1
Setting up standard PCI resources
Linux Plug and Play Support v0.97 (c) Adam Belay
PCI: Probing PCI hardware
PCI: Device 0000:00:12.5 not found by BIOS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
microcode: CPU0 not a capable Intel processor
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
scx200: NatSemi SCx200 Driver
scx200: GPIO base 0xf400
scx200: Configuration Block base 0x9000
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12ac
Non-volatile memory driver v1.2
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a NS16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a NS16550A
Uniform Multi-Platform E-IDE driver
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SC1200: IDE controller (0x100b:0x0502 rev 0x01) at  PCI slot 0000:00:12.2
SC1200: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:PIO, hdb:PIO
    ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:PIO, hdd:PIO
Clocksource tsc unstable (delta = -112236661 ns)
hda: TOSHIBA THNCF064MMA, CFA DISK drive
hda: applying conservative PIO "downgrade"
hda: applying conservative PIO "downgrade"
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 125184 sectors (64 MB) w/2KiB Cache, CHS=978/4/32
 hda: hda1 hda2
block2mtd: version $Revision: 1.30 $
Creating 1 MTD partitions on "rootfs":
0x00000000-0x03030000 : "rootfs"
split_squashfs: no squashfs found in "rootfs"
block2mtd: mtd0: [rootfs] erase_size = 64KiB [65536]
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
enabling scx200 high-res timer (1 MHz +0 ppm)
TCP vegas registered
NET: Registered protocol family 1
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>
Using IPI Shortcut mode
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 156k freed
Please be patient, while OpenWrt loads ...
- preinit -
Press CTRL-C for failsafe
- init -

Please press Enter to activate this console. natsemi dp8381x driver, version 2.1, Sept 11, 2006
  originally by Donald Becker <becker@scyld.com>
  2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
natsemi eth0: NatSemi DP8381[56] at 0x80040000 (0000:00:0e.0), 00:0d:b9:00:0f:10, IRQ 10, port TP.
natsemi eth1: NatSemi DP8381[56] at 0x80080000 (0000:00:10.0), 00:0d:b9:00:0f:11, IRQ 11, port TP.
^@^@PPP generic driver version 2.4.2
eth0: DSPCFG accepted after 0 usec.
eth0: link up.
eth0: Setting full-duplex based on negotiated link capability.
br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state



BusyBox v1.11.2 (2009-01-09 09:23:46 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (8.09, r14511) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
^@root@OpenWrt:/#

Useful commands

uci show wireless
wifi up
opkg list_installed
opkg list
iw list
Document Actions