WRT54GS project

From Wildsong
Jump to navigationJump to search

23 Aug 2005

I just checked in on the uClibc site and discovered the new buildroot project. This is the best thing since sliced cheese. I set it up to use subversion and built a complete Linux system from scratch in just a few hours, including the entire gcc tool chain. I have it booting up a VMWARE machine.

Next I will make it boot an old PC using a 32MB compact flash in an IDE adapter.


2004 - So far, I have gotten my WRT54GS (from www.redzuco.com) and flashed it with OpenWRT thereby voiding the waranty.

Potential projects

Install serial port header.

Install one MAX chip and a DB9 to use as a console port.

Connect the second serial port (at TTL signal levels) to the Garmin GPS-25.

Stream NMEA data from the GPS to clients

Parse NMEA data and make it a NTP server

Play with bandwidth management

Build a weather station


Notes

You can telnet into the router and it gives you a root prompt. It uses a bridged configuration.

# ifconfig
lo       Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vlan0    Link encap:Ethernet  HWaddr 00:12:17:0C:CB:37
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:102747 errors:0 dropped:0 overruns:0 frame:0
         TX packets:479 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:7878788 (7.5 MiB)  TX bytes:75863 (74.0 KiB)

vlan1    Link encap:Ethernet  HWaddr 00:12:17:0C:CB:38
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:63201 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:37541394 (35.8 MiB)
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.123.0   *               255.255.255.0   U     0      0        0 br0
# dmesg
CPU revision is: 00029007
Primary instruction cache 8kb, linesize 16 bytes (2 ways)
Primary data cache 4kb, linesize 16 bytes (2 ways)
Linux version 2.4.20 ([email protected]) (gcc version 3.3.3) #1 Mon Dec 6 04:13:50 EST 2004
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM4712 rev 1 at 200 MHz
Calibrating delay loop... 199.47 BogoMIPS
Memory: 30396k/32768k available (1408k kernel code, 2372k reserved, 100k data, 68k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: Disabled
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch ([email protected])
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
'''ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 0) is a 16550A'''    two serial ports internally!
Software Watchdog Timer: 0.05, timer margin: 60 sec
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
number of CFI chips: 1
0: offset=0x0,size=0x20000,blocks=64
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 913
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x007e0000 : "linux"
0x000e4480-0x001b6435 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x007e0000-0x00800000 : "nvram"
0x001c0000-0x007e0000 : "OpenWrt"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
Bridge firewalling registered
802.1Q VLAN Support v1.7 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 68k freed
Algorithmics/MIPS FPU Emulator v1.5
diag boardtype: 00000101
using v2 hardware
led -> 00
led -> 01
jffs2.bbc: SIZE compression mode activated.
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.50.21.10
eth1: Broadcom BCM43XX 802.11 Wireless Controller  3.50.21.10 (Compiled in . at 20:53:00 on Jan 21 2004)
device eth0 entered promiscuous mode
vlan0: add 01:00:5e:00:00:01 mcast address to master interface
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan0) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
vlan1: Setting MAC address to  00 12 17 0c cb 38.
vlan1: add 01:00:5e:00:00:01 mcast address to master interface
led -> 00

If eth0 is the wired and eth1 is the wireless, where is the WAN port?

Links

OpenWRT

Lud's Linux Corner (WRT54GS page) Kismet, SNMPd

BatBox Linux Installs into a ramdisk, to allow exploring and experimenting with a stock WRT.