2012 update

This article was written in 2005. It is no longer up-to-date. no longer exists. The hardware was in use until was shut down in 2008.

The Problem

We,, run a webserver at a housing ISP. The used hardware, common x86 crap, has a little problem: it doesn’t reboot itself and freezes when it should do the reset. Additionally, we don’t have a serial console available, which might be very useful in some cases.

The Plan

I have been using routers based on hardware from PC Engines for quite some time now. The hardware is based on an AMD Geode SC1100 and clocked with 266 MHz. The product is named WRAP — thereby the name of this project. The WRAP provides some ports to connect external stuff to it. This includes an I²C header and a LPC port.

Now my idea was to use some sort of a circuit to switch the reset- and power-lines of an ATX board, so we could reset the computer without either asking the ISP or even going there. This circuit would be connected to the WRAP using I²C and being controlled using a small program. As the WRAP has a serial port (RS-232), this one would be used for a serial console. I wanted to use either Linux or OpenBSD as the Operating System.

The Solution

Boot Loader

The first thing I had to get to work was a boot loader. Due to my good expierence with it, I first tried the famous GNU GRUB, which also includes network card drivers to load the kernel from the network. After finding the right parameters, it was quite easy to get it to work. I used the following configure parameters:

./configure --disable-{reiserfs,vstafs,jfs,xfs,ffs,ufs2,minix} \


Also due to my already existing expierence with Linux, I decided to go with it if I get it to work properly. Loading it wasn’t such a problem, but after initalizing the UART, the serial console was crippled. Not really good. After digging arround in the source code, I found the right place to jump out a function before it changes more settings. Used boot line at that time:

console=ttyS0,9600,8,n,1 ip=dhcp root=/dev/nfs nfsroot=$myserver:/opt/netboot


I wanted to have a very small and non-bloated set of programs for the userland. To archieve this, I linked most of the programs with dietlibc. Some other things are linked with uClibc, because they didn’t work properly with dietlibc.


An ATX board uses two connectors for the power- and reset-switches. They are run by a very low voltage and current, so it is possible to switch them using an optocoupler directly.

The optocoupler has to be controlled in some way using a program and has to be connected to the WRAP in some way. I used the I²2-bus because I’ve already had expierence with it (did a small project in school with it) and because I was simply interested in wether I get it to work.

After hours (or days?) of head scratching, I decided to go with a PCF8574 from Texas Instruments and an ILQ615-4 from Vishay.

An 8-bit I/O-Expander.
A multi-channel optocoupler. Note: You can use either the ILD615-4 with two channels or the ILQ615-4 with four of them. I used the ILQ615-4.


Picture of the board


View or download for gschem.


My WRAP-Powercontrol is now finished and installed. It’s operating very well.

Source Code

linux- The Linux kernel configuration I’m using.
linux- Two small patches to the Linux kernel. The first one is to switch the LPC port to GPIO mode and the second one fixes an issue with the serial console.
reset.c Resets a WRAP board. Might work with other SC1100 based boards, but it’ll need a different base address.
watchdog.c A simple, small watchdog program.
wrap-leds.c A program to control the LEDs in front of the WRAP board.