PDA

View Full Version : Tutorial #1: Setting up cygwin and KOS 1.3.x



MetaFox
April 5th, 2005, 22:31
EDIT (4/13/05): Changed path settings to /etc/profile. Added environ.sh file that I left out after the upgrade of the tutorial to use 1.3.x.
EDIT (4/6/05): Upgraded tutorial to use KOS 1.3.x instead of 1.2.0.

These tutorials should help you get started with Dreamcast development, even if you haven't coded before in your life. I'm trying to make these as newbie friendly as possible, so if you have any trouble with these, post here and let me know, so I can update them as appropriate.

1) Download http://www.cygwin.com/setup.exe

2) Run setup.exe
a) Select Install for all users
b) Select Text file type: unix
c) Click on a mirror site
d) Check all the boxes - you want a complete install

This will take a while

3) When the installation is done, Download
http://s101533388.onlinehome.us/GPF/342sh-elf.rar
a) Extract to c:\cygwin\usr\local\dc

4) Download http://www.consolevision.com/members/metafox/dreamcast/arm_toolchain.rar
a) Extract to c:\cygwin\usr

5) Download http://s101533388.onlinehome.us/GPF/kos1.3.rar
a) Extract to c:\cygwin\usr\local\dc

6) Download http://s101533388.onlinehome.us/GPF/environ.rar
a) Extract to c:\cygwin\usr\local\dc\kos1.3\kos

7) Run a command prompt (cmd.exe, command.com depending on your version of Windows)

8) Type cd\cygwin

9) Type cygwin.bat

10) close cygwin

11) Open c:\cygwin\etc\profile in a text editor such as Notepad or Wordpad
a)Add these lines to the bottom of the file:
PATH=/usr/local/dc/arm-elf/bin:$PATH
PATH=/usr/local/dc/sh-elf/bin:$PATH

b)Then save the file.

Now that you have Cygwin and KOS setup and workable, go to Tutorial #2 where we will learn to compile a simple SDL game (port) to the Dreamcast.

Cyruz
April 6th, 2005, 22:08
All the links have been shortened and don't work...is there some way to fix that? -_-"

MetaFox
April 6th, 2005, 22:30
The original links didn't allow hotlinking. Try now.

Cyruz
April 6th, 2005, 23:03
It works. yay.

Cyruz
April 6th, 2005, 23:20
shouldn't c:\cygwin\usr\local\dc be where you extract kos to? Also the arrangement of 1.3 is different...so tutorial #2 is rather confusing >.>

MetaFox
April 7th, 2005, 00:35
shouldn't c:\cygwin\usr\local\dc be where you extract kos to?Yeah, you're right.


Also the arrangement of 1.3 is different...so tutorial #2 is rather confusing >.>Yeah, I completely forgot about different file names and whatnot. I wasn't going to go with 1.3.x, but decided to after the file downloads didn't work, as 1.3.x is stable, and it's less bugridden and has more features than 1.2.0. Everyone should be using the 1.3.x branch these days.

I'll fix tutorial #2 right now.

Saoshyant
April 7th, 2005, 02:51
Cheers fellow Metafox :)

(we can do praise in this forum right? well if not delete this. Kudos anyway, I was feeling a tutorial like this was needed.)

souLLy
April 7th, 2005, 10:00
great work meta, might even give this a go myself.

kgenthe
April 7th, 2005, 22:30
Well I PMed you a thanks yesterday, but since the ball has started rolling... thanks again :)

cysiomax
April 8th, 2005, 13:47
I tried to follow your tutorial, but I somehow failed with cygwin installation. I have downloaded all cygwin packages and installed them for all users.

I run cmd.exe, go to c:\cygwin and type cygwin.bat. It starts nicely, but when I enter 'useradd' I only get:

bash: useradd: command not found

OK, I can survive that. Then I looked into my directory, but the .bashrc is simply not there.

So I created one with the contents:

$ more .bashrc

PATH=/usr/local/dc/arm-elf/bin:$PATH
PATH=/usr/local/dc/sh-elf/bin:$PATH

However it has no effect, even if I quit cygwin and login again. The changed variables are not in my environment.

I can compile regular C++ programs (non-DC) without any problems.

Maybe I don't have all packages? I run setup again and pressed view button to see the list of not installed packages. I can only see: emacs-leim and gcc-testsuite, so everything else should be installed. The directory with packages on disk, that was created during setup is 487MB big. The directory c:\cygwin (with kos/armtoos/sh-elf) is 1.77 GB big.

Perhaps my environment is important:

I'm running WinXP Pro on my notebook. I have 2 users: "admin" with administrator rights, that I used for installing cygwin and "user2" without administrator rights which I normally use for development.

I tried both users, but the cygwin only works for "admin", which I can survive.

Any clues what I'm doing wrong, so that I cannot change the PATH variable?

Thanks,
Cysio

GPF
April 8th, 2005, 19:14
Im not that familiar with the .bashrc file, but usually I put my settings in my /etc/profile and those get put into my environment.

GPF
April 8th, 2005, 19:25
also looks like in the change from kos 1.2 to kos 1.3 tutorial you forgot to readd the section about either copying the /usr/local/dc/kos1.3/kos/environ_base.sh to ~/environ.sh and then running source environ.sh after starting up cygwin or adding it to your /etc/profile.

Or you can download my environ.sh file and put it in your home directory http://s101533388.onlinehome.us/GPF/environ.rar

Troy

cysiomax
April 9th, 2005, 11:32
Thanks for info, after putting the variables into /etc/profile I can see the correct variables in my environment.

Cysio

fackue
June 5th, 2005, 06:41
Anyone have mirrors of the files down (GPF's hosted files)?

GPF
June 5th, 2005, 07:20
Anyone have mirrors of the files down (GPF's hosted files)?
SiZiOUS site http://membres.lycos.fr/sbibuilder/ has them mirrored, I need to reupload them still to my new site


Troy

SiZiOUS
June 5th, 2005, 13:30
http://sbibuilder.free.fr/files/dev/

Another mirror.

fackue
June 8th, 2005, 22:11
For those that are having trouble with this tutorial I've set up an ISO with everything on it. You just gotta install it.

http://consolevision.com/dreamcast/dev/

Thanks to MetaFox (for the tutorial), Quzar (for help with minimizing CYGWIN's size), and Consolevision (for hosting).