Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum

Keywords: Match:
Running Linux on the Sega Dreamcast (Part 5)
(continuation)

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 roast.sh 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 roast.sh 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 roast.sh 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.



    # ./roast.sh 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 . . .
  • http://www.billgatliff.com -- Additional information on embedded Linux, and GNU programming for embedded systems.
  • http://www.linuxdc.org -- The most organized of several sites dedicated to running Linux on the Dreamcast. This site hosts an IRC channel (irc.openprojects.net#linuxdc), provides several HOWTOs related to the Dreamcast, and hosts the source and patch distributions for this article.
  • http://linuxsh.sourceforge.net -- The official repository of Linux kernels and tools for the Hitachi SH microprocessor, including the kernel for the Dreamcast.
  • http://www.m17n.org -- 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.
  • http://mc.pp.se/dc -- Marcus Comstedt's website, which contains lots of engineering-level information about the Dreamcast. Also includes a HOWTO for building a Dreamcast serial cable.
  • http://www.cerc.utexas.edu/~andrewk/dc/ -- Andrew Kieschnick's website, which includes programs for loading code into the Dreamcast via the Broadband or serial cable adapters.
  • http://www.linuxfromscratch.org -- 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 LinuxDevices.com with permission of the author.



Related stories: Talk back! Do you have comments or questions about this story? talkback here.


(Click here for further information)


FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.

Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing¿s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.

Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn¿t leave you stranded in the dark. It¿s more than just a debugger, it¿s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that¿s positively illuminating.

Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.

High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.

Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.

Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.

Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG¿s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.

7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
GOLD SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Check out the latest Linux powered...

mobile phones!

other cool
gadgets



BREAKING NEWS

• First ALP Linux smartphone?
• First Atom-based nano-ITX board?
• New kernel boosts embedded
• First dual-monitor LTSP 5 set-up?
• Understanding Unix spells and curses
• Tools vendor touts low-cost Linux BSPs
• Debugger supports multi-core MIP64 chips
• Webinars tackle VxWorks-to-Linux ports
• Twin POS systems for Linux
• Mobile Firefox ready for download
• Miguel de Icaza on Mono 2.0
• Embedded Linux declining?
• Mobile WiMAX service launches in U.S.
• Euro Linux device conference announces speakers
• POS stack targets Linux netbooks


Most popular stories -- past 90 days:
• Open source phone goes mass-market
• Tinest Linux system, yet?
• Garmin Nav devices run Gnome Linux
• ARM9 board boots Debian in 0.69 seconds
• Low-cost laptop runs Linpus Linux
• Linux-friendly Beagle fetches $150
• Mini Linux PC breaks $100 barrier
• Open source camera records geotagged video to SATA HDD
• Open set-top box ships
• First $100 laptop runs Linux


DesktopLinux headlines:
• Mandriva 2009 debuts with KDE 4 desktop
• Debian Sid-based distro reviewed
• Miguel de Icaza on Mono 2.0
• RIP LinuxWorld
• Testers sought for Blackberry-Linux sync software
• Google updates photo editor for Linux
• Major Mono rev ships
• Intrepid Ibex beta-tests
• Linux netbook returns higher?
• Open-source image editing project launches


Also visit our sister site:


Sign up for LinuxDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Linux is a registered trademark of Linus Torvalds. All other marks are the property of their respective owners.