Linux/SH bootstraps for SEGA Dreamcast
Copyright (C) 2000 YAEGASHI Takeshi <yaegashi@ma.kcom.ne.jp>

0. Getting started

Before playing with it, please check the following web sites.

	http://mc.pp.se/dc/
	http://www.allusion.net/dcdev/dcsoftware/


1. Building bootable image

Currently there are two bootstraps in this directory.  They are
intended to be loaded at and started from 0x8c010000 by Dreamcast's
firmware.  Please check the actual source codes yourself before using.

sh-stub-boot.S: booting GDB stub.  You need to get through with
building the correct GDB stub for Dreamcast in the top of sh-ipl+g
tree.  It will load sh-stub.bin at 0xacff0000 and starts there.

kernel-boot.S: booting Linux kernel with initrd.  You need following
files to build.

	zImage.bin: compressed kernel image, loaded at 0x8c710000
	initrd.bin: initrd image(probably gzipped), loaded at 0x8c800000

After loading it sets boot parameters and starts from 0x8c710000.

You can build these images individually like this:

	% make sh-stub-boot.bin


2. Testing image

If GDB stub debugging is already available, you can test your boot
image without writing it to CD-R and avoid the risk of a failure.
Please refer to .gdbinit.

% sh-linux-gdb kernel-boot.elf
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sh-linux"...
(no debugging symbols found)...
0xacff18e6 in ?? ()
Loading section .text, size 0xbe lma 0x8c010000
Loading section .data, size 0x4484ae lma 0x8c0100c0
Start address 0x8c010000 , load size 4490604
Transfer rate: 51102 bits/sec.
(gdb) continue
...and see whether it starts


3. Writing CD-R

First read the instruction in Marcus' site above, and see roast.sh
script.  scramble.c is taken from his site.  You need to build your
own IP.BIN.

IMPORTANT: Dreamcast cannot read CD-RW!
