Home‎ > ‎Sergey's Projects‎ > ‎

Flash-based Dial-up Router

Introduction

Some time ago I had only a dial-up connection to the Internet, and wanted to share this connection in my home network. I tried various setups, like using dial-on-demand on my "main" computer, or using Cisco 1005 router with an external modem, but wasn't satisfied. Therefore I decided to build a router myself. One of the requirements was using flash memory to store firmware, because I didn't want to have something rotating and noisy in this device.

Hardware

I used WH386SX motherboard with FPU and 16MB of RAM installed. For connectivity, I used US Robotics Sportster 33.6 internal modem, and NE2000 NIC.
I built a custom ISA board, containing 2.5MiB of flash memory and one serial port for console.

The flash storage based on five 4Mbit AM29F040B flash chips (in this design it possible to have up to 8 such devices, but I've got just 5). The flash memory is mapped through 64KiB window (at 0xd0000-0xdffff, could be changed by switches). A register at 0x310 (low 6-bits) is used to select a 64KiB page that is mapped to the mentioned above memory addresses. Higher 2 bits are used to control LEDs.

The serial port uses 16C550 UART, and MAX232 drivers.

The flash / serial card:


WH386SX motherboard:


Complete & working system in the rack:


Software

The router is running linux-2.4.22 kernel with busybox. I wrote a MTD (memory technology device) driver for my flash storage (based on Arcom code), the patch can be found in the attachments. The driver presents two MTD partitions:
  1. 512KiB - used to store kernel
  2. 2048KiB - used for JFFS2 filesystem, containing all the binaries and the data.
JFFS2 partition is normaly mounted read-only, and remounted read-write only to commit configuration changes.

I also write a set of simple (shell-based) CGI scripts, to control and configure the router.
Ċ
flash.pdf
(23k)
Sergey Kiselev,
Aug 16, 2011, 10:39 PM
ċ
flash.sch
(135k)
Sergey Kiselev,
Sep 5, 2008, 2:51 AM
ċ
linux-2.4.22-asmflash.patch.bz2
(9k)
Sergey Kiselev,
Sep 5, 2008, 2:54 AM
Ċ
Sergey Kiselev,
Aug 16, 2011, 10:39 PM
ċ
rs232isa.sch
(146k)
Sergey Kiselev,
Sep 5, 2008, 2:51 AM
Comments