This is the SEGA Dreamcast: SLIP/Linux HOWTO document. It is intended as a quick reference covering everything you need to know for building and configuring a SLIP - communication between a well known Intel x86 and the famous Dreamcast gaming console through a nullmodem cable. Hints, patches and references to the software needed to build the necessary software are given.
This document would not have been possible without all the information contributed by other people - those involved in the GNU/Linux SuperH Project  or the LinuxSH porting project , thousands of mailing list archives and tons of other HOWTOs, books or short hints found while surfing through the net.
Thanks to Alan Cox, who ported slattach.c to Linux, Bill Gatliff , who described the process for building the base Linux system, where my work started and Andrew Kieschnick , who wrotes this wonderful serial loader, which saves me lots of CD-Rs and money.
Dreamcast is a registered trademark of Sega, Inc. Other product names are trademarks of the respective holders, and are hereby considered properly acknowledged.
First version for public release.
You will find the most recent version of this document at
If you make a translation of this document into another language, let me know and I'll include a reference to it here.
I rely on you, the reader, to make this HOWTO useful. If you have any
suggestions, corrections, or comments, please send them to me
(email@example.com), and I will try to
incorporate them in the next revision. Please add
SEGA Dreamcast: SLIP/Linux HOWTO to the Subject-line of the mail
for filtering it into the appropriate folder.
Before sending bug reports or questions, please read all of the information in this HOWTO, and send detailed information about the problem.
If you publish this document on a CD-ROM or in hardcopy form, a complimentary copy would be appreciated. Mail me for my postal address. Also consider making a donation to the Linux Documentation Project to help support free documentation for Linux. Contact the Linux HOWTO coordinator, Tim Bynum (firstname.lastname@example.org), for more information.
Copyright (c) 2002 by Christian Berger. This document may be distributed under the terms set forth in the LDP license at sunsite.unc.edu/LDP/COPYRIGHT.html.
This HOWTO is free documentation; you can redistribute it and/or modify it under the terms of the LDP license. This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the LDP license for more details.
If you're new to embedded Linux development, please refer to the "Running Linux on the Sega Dreamcast" HOWTO  written by Bill Gatliff. This short document wakes my interest for developing on gaming consoles. If you'd like to get further information on something like the toolchain for the linux base system or how a bootloader does his job, please follow the given link and refer to Bill's HOWTO.
For starting your community developing in embedded Linux system, you need a x86 personal computer running Linux (mostly all modern distributions should do the work, I prefer Mandrake's one), a free serial port, the PC <--> Dreamcast serial cable (aka coders cable, $25 at your favorite dealer or auction website) and a VGA adapter when you aren't using your TV for watching your Dreamcast's reaction.
First of all, you need some space and access to the superuser account for building the base system described in . A Linux system is nothing without the well configured Linux kernel. Go straight to the LinuxSH porting project  and get the latest stable Linux kernel source tree simply using CVS .
Unpack the sources in your dedicated folder for building the whole stuff and patch it  using
patch -p0 < linux-2.4.13-pre.diff
Additionally to Bill's step by step description, you have to create a special device file using the superuser account for communicate with the build in serial port:
... cd $INITRD mkdir dev su -c "mknod ttySC1 c 204 9" ...
These two steps are necessary to build the kernel. The remaining stuff concerning the build of the toolchain is well described in . Please follow these step right before you're asked to create a ramdisk image because we've to add some software.
This chapter explains how to configure and build the tools you need to setup a SLIP - device.
The chapter "Building an application" in  describes the steps to build Busybox, a popular tool (aka "swiss army knife") to administer any *nices. In our case, we've just to alter the file Config.h to our wishes. Simply open your favorite editor an comment out these tools you don't need and remove the double dashs from those lines, which concern about networking, especially
... #define BB_IFCONFIG ... #define BB_PING ... #define BB_ROUTE ...
Without having at least these three tools, you won't be able to check your communication. Just leave the other lines in their proper state, save and quit. Follow the steps in Figure 7 in  for (cross) compiling this application and copying in their right place ($INITRD).
This tool is a layer between the device file corresponding to your serial port and a virtual network device for handling any IP request. Get the source at . Unpack the archive in your dedicated folder an compile it using following command:
... make CC=sh4-linux-gcc LDFLAGS=-static ...
The first argument CC means, that you want to build the source with your preferred C - compiler (in our case a cross compiler) and the second links our application without relying on any library (at this point, we don't have any - I hope, I'll describe this soon, too). After doing this, just copy the file slattach to $INITRD/sbin.
That's it. All you've to do now is to transfer this whole stuff into your Dreamcast as explained in  or just read on.
Okay, you've got this wonderful cross compiled stuff, but how do we get this into the Dreamcast?
Either you burn it onto a CD-R, put it in your Dreamcast, hit the power button and lean back as described in ...
or, even better, you use Andrew's tool  to load your complete Linux distribution through your coders cable and save CD-Rs, money and time. To do this, just ignore Bill's steps to build the Dreamcast boot CD and copy the scrambled binary (kernel-boot.bin) in the dcload-serial folder. Put the dcload-serial-client disc into your Dreamcast (please refer to  for further information to build such a disc), hit the power button and wait for your idle... prompt.
Seeing this, simply execute the following command on your Linux box, wait while these two guys transfer your Linux distribution and see your embedded Dreamcast after a while in action:
./dc-tool-serial-1.0.3-linux -t /dev/ttyS1 -e -b 115200 -x kernel-boot.bin
Please change these parameters to your corresponding environment.
So, you've just loaded your distribution into your Dreamcast, now it's time for using this connection.
Assuming you've correctly configured your Linux kernel (or left the standard one), simply enter following commands to start the SLIP - interface on your HOST:
... slattach -s 9600 -p slip /dev/ttyS1 & ifconfig sl0 192.168.0.1 pointopoint 192.168.0.2 up route add 192.168.0.1 dev lo route add 192.168.0.2 dev sl0 ...
The first line initiates the software layer between serial device and virtual network device. The following command configures your virtual network device as a direct connection between two hosts. The last two set the proper routes to both hosts.
The story on your Dreamcast is a little bit more tricky, when you've just followed Bill's explanation, because some essential things are missing. First at all, we've to mount the proc filesystem:
... mkdir /proc && mount -t proc none /proc ...
Without it, we can't read any information about our running Linux. The next ones are the same like above only with exchanged IP addresses:
... slattach /dev/ttySC1 ifconfig sl0 192.168.0.2 pointopoint 192.168.0.1 up route add 192.168.0.2 dev lo route add 192.168.0.1 dev sl0 ...
Okay, now it's time for the big final. Simply enter
... ping 192.168.0.2 ...
on your HOST and
... ping 192.168.0.1 ...
on your CLIENT. Lean back and congratulate yourself. You've connected two heterogenous architectures and let them talk to each other. At this point, you can run (almost) any IP based application between them.
Let me know your success stories.