News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Running Linux on the Sega Dreamcast (Part 5)

Sep 24, 1997 — by Rick Lehrbaum — from the LinuxDevices Archive — 20 views

Building the Dreamcast boot CD

We're in the home stretch now! All that's left to do is to burn kernel-boot.bin onto a CD, move the CD to the Dreamcast, hit the POWER button, and watch your new kernel boot.

As I mentioned in the previous section, the sh-boot package contains a script called that automates the CD burning process. This script renames kernel-boot.bin to 1ST_READ.BIN (the startup file name as recorded in IP.BIN), invokes mkisofs to construct an ISO9660 filesystem image, and then uses cdrecord to actually burn the CD.

To make the script work, you must set the value of CDRECORD at the top of the script file to the identity of your CD-R burner. Use the commands in Figure 11 to get the ID, then change the 1,0,0 in to the appropriate value if necessary.

The cdrecord program relies on Linux's ide-scsi device driver, hence the call to modprobe at the start of the procedure. You will almost certainly need to exit X-Windows if you are running it, because most Linux X-Window managers install device drivers that prevent ide-scsi from initializing properly. If the call to modprobe fails with an error indicating that the ide-scsi device cannot be installed, exit from X-Windows and try again.

    # modprobe ide-scsi
    # cdrecord -scanbus

    scsibus1: 1,0,0 100) 'PHILIPS ' 'PCRW804 ' ' 1.5' Removable CD-ROM

Figure 11: Finding your CD-R burner's device id

With CDRECORD in set properly, insert a CD-R and run the script using the commands in Figure 12. Sit back, relax and congratulate yourself while your Dreamcast Linux CD cooks. Once that's done, pop the CD into the Dreamcast, apply power, and in a few seconds you should see Linux boot and run the Busybox shell application.

    # ./ kernel-boot.bin

Figure 12: Burning the CD

Thoughts for the future

This article covers a lot in a short space. In addition to building a Hitachi SH cross compiler toolchain, you also built the GNU C runtime library, a Linux kernel, and a ramdisk image containing the Busybox shell application. And as if that wasn't enough, you put everything together into a bootloader image and burned a CD that booted in the Dreamcast.

Where do you want to go next? If you think that an embedded Linux system lies in your future, then you owe it to yourself to play with Linux on an inexpensive, non-PC setup like the Dreamcast as much as possible before you need to make a living at it. One suggestion is to replace Busybox with an application of your own design, compiled and statically linked with the Hitachi SH compilation tools. Another idea is to gather up several other bits of software from the Internet, and try to make your Dreamcast look and act as much like your Linux PC workstation possible.

If you stick with the Dreamcast, then before long you will want to invest in a Sega Broadband Adapter, which will give your Dreamcast an Internet-ready connection of its own (the author routinely checks his email and browses the Web from his Dreamcast console, just because he can), as well as eliminate the need to burn CD-R's. Or maybe you want to dig out your soldering iron and a handful of RS232 level conversion chips, and put a serial port on your Dreamcast to use for downloading code and who-knows-what else. Links to information on these and other ideas can be found in the section called Resources, at the end of this article.

Far from “just a gaming console”, the inexpensive and flexible Dreamcast hardware platform is just the thing for an embedded Linux guru-in-training. Hopefully, this article is just your beginning.

The end

Story navigation . . . Want this in PDF format? download it here

Resources . . .
  • — Additional information on embedded Linux, and GNU programming for embedded systems.
  • — The most organized of several sites dedicated to running Linux on the Dreamcast. This site hosts an IRC channel (, provides several HOWTOs related to the Dreamcast, and hosts the source and patch distributions for this article.
  • — The official repository of Linux kernels and tools for the Hitachi SH microprocessor, including the kernel for the Dreamcast.
  • — The Organization for Multilingulization. Provides a Dreamcast Linux distribution CD via their website, which is thoroughly under-documented and poorly supported. Also provides LinuxSH-specific GNU tool distributions, some of which were used in this article.
  • — Marcus Comstedt's website, which contains lots of engineering-level information about the Dreamcast. Also includes a HOWTO for building a Dreamcast serial cable.
  • — Andrew Kieschnick's website, which includes programs for loading code into the Dreamcast via the Broadband or serial cable adapters.
  • — The Linux From Scratch website. Provides details on how to build a complete Linux setup from source code.

Acknowledgements . . .

The author wishes to acknowledge the following individuals . . .

  • M. R. Brown and Karl Trygve Kalleberg, for their help and support in preparing and reviewing this article.
  • Marcus Comstedt, for his reverse-engineering of the Dreamcast hardware.

About the Author: Bill Gatliff is an independent consultant with almost ten years of embedded development and training experience. He specializes GNU-based embedded development, and in using and adapting GNU tools to meet the needs of difficult development problems. He welcomes the opportunity to participate in projects of all types. Bill is a Contributing Editor for Embedded Systems Programming Magazine, a member of the Advisory Panel for the Embedded Systems Conference, maintainer of the Crossgcc FAQ, creator of the gdbstubs project, and a noted author and speaker. Bill welcomes feedback and suggestions. Contact information is on his website.

Copyright: This article is Copyright © 2001 by Bill Gatliff. All rights reserved. Reproduction for personal use is encouraged as long as the document is reproduced in its entirety, including this copyright notice. For other uses, contact the author. This article has been reproduced by with permission of the author.


This article was originally published on and has been donated to the open source community by QuinStreet Inc. Please visit for up-to-date news and articles about Linux and open source.

Comments are closed.