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)


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.

4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.

Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.

Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.

Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.

Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.

Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.

Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.

Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.

 


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

• Linux-friendly SoCs target low-end multimedia
• CompactFlash as a COTS "standard"
• 65nm ARM9 SoCs target PNDs, smartphones
• Motorola Ming A1600 ships
• N810 gains Android installer
• PC/104-Plus board runs Linux on x86 SoC
• Webinars explore embedded Linux development
• Linux video camera geo-tags, writes to SATA drives
• Garmin Nav devices run Gnome Linux
• Ten LiMo phones this month?
• It's a Yankee Doodle Linux phone
• Wind River to host "Developer Day"
• Dev boards gain Linux support
• 802.11n zooms ahead
• Low-power mini-ITX board runs Linux


Most popular stories -- past 30 days:
• World's cheapest Linux-based laptop?
• Ubuntu ported to a PDA
• 64-way chip gains Linux IDE, dev cards, design wins
• Embedded PowerPC dev kits come with Linux
• Rapid time-to-evaluation -- a key goal for silicon providers
• Embedded Linux is doomed. DOOOMED!
• Rugged PDA available with Linux
• Netflix Player runs Linux
• Miniature Linux PC targets military apps
• $7 SoC runs Linux
• Android Developer Challenge announces first-round winners
• Dual-core ARM SoC clocks to 1.2GHz


Linux-Watch headlines:
• Microsoft tactics push India toward Linux
• Bell, SuperMicro sued over GPL
• "Business intelligence" software goes GPL
• Will Atom bomb?
• LF Summit videos posted
• Linux gains "embedded" maintainers
• Virtualization on tap in SLES and RHEL upgrades
• Linux gets security black eye
• Verizon chooses Linux "platform of choice"
• Hats off to Fedora 9


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.