Note 1: Downloading and configuring will take about an hour or less (depending on your experience). Compiling the toolchain and KOS will take a few hours. Before beginning, please ensure you have at least 1.5 - 2GB of free hard drive space.

Note 2: It has been brought to my attention that the MinGW installer may sometimes report that some packages were unable to be downloaded. If this is the case, try reinstalling MinGW before continuing since the missing packages may contain dependencies required to build the toolchain.

Last edited by Dreamcast on Sat Jan 08, 2011 5:56 am, edited 1 time in total.

1) After KOS is built, type "cd ../kos-ports" and press the enter key.2) Type "make" and press the enter key.

FINAL STEPS

1) When you're sure everything has compiled correctly, you can delete the directories created earlier in the dc-chain folder.2) Navigate to the "c:\mingw\msys\1.0\etc" directory and edit the "profiles" file by either opening notepad and dropping the file onto it. At the bottom, add

"cd /usr/kos/kos" and then add "source environ.sh" below that. Save the file. When you start the mingw bash console, you'll now be at the root KOS directory

and have the environment variables configured.

Congratulations. If all went well, you now have a working toolchain and updated build of KOS. Happy deving.

Funny you should be the first to reply. I was just trying out your VMUBeep example after discovering the function in the VMU include .

The one thing I wish MinGW had is more precompiled packages. I haven't found a suitable SVN for it and subversion won't compile. The other thing is the vqenc and genromfs EXEs in the KOS package. I had to source older versions because they also won't compile (I think genromfs may have compiled in Cygwin, but vqenc hasn't in either). Neither of them have been updated in a long time, so using older versions probably won't matter anyways.

It would be useful if they had some kind of package manager though. At the very least, one of the ports-style ones that downloads and compiles the source code (and all the dependencies) for you. Something like MacPorts / Fink / Homebrew on a Mac, or emerge from Gentoo.

As for genromfs and vqenc... There's no inherent reason they shouldn't compile with MinGW. They certainly used to work quite a long time ago, although I think they might have needed patching. You definitely need the PNG and JPEG libraries for vqenc to compile.

Genromfs required you to have the MSYS SDK installed, and to make a small change to the source code in order to get it to build under it. I don't remember exactly what it was, because it was quite some time ago (and I'm reasonably sure that the changes/built version that I had disappeared with my old website).

That said, I'll be uploading a new set of patches to KOS' repo to build the toolchain properly with new versions of all the tools (Binutils 2.21, GCC 4.5.2, and Newlib 1.19.0) sometime hopefully later today. These fix all the thread stuff to be properly done (so it supports detaching threads, for instance).

I've updated the patches in the KOS repository, as I said I would (with 5 minutes to spare in the day).

I'll update the Makefile for dc-chain so that everything builds as expected tomorrow probably (with the current versions of everything and all). I built all my stuff without the Makefile in dc-chain, so I didn't modify it along the way.

Thanks, Bluecrab . For anyone wanting to update and use MinGW, hold on until Bluecrab updates the makefile. Once I verify whether or not mpfr 3.0.0 works (so far, only 2.4.2 has, but I hadn't patched 3.0.0 until now), I'll upload an archive of all of the packages so you just have to extract them to the base mingw installation and they'll be put in the right directories.

Vqenc finally compiled, but a change needs to be made to the source. It either needs an include for zlib.h added to readpng.c or just comment out the section that outputs the ZLIB version.

Genromfs uses POSIX-based functions Mingw doesn't support, so for that it's just easier to use the Cygwin built version and use the one Cygwin DLL it requires.

Thanks for the tip on Subversion, Blackaura. It will be much more convenient doing everything from within the console for the tutorial.

I've updated all of the dc-chain stuff in the KOS repo, so please test it out and make sure everything works all right. I had it build a toolchain, but I haven't actually tested it with anything as of yet (since I built my normal toolchain by hand the other day).

The Makefile seemed to build everything just fine, so I'm assuming it worked properly.

That's a rather odd error that GCC shouldn't be spitting out. It looks to me like your native compiler didn't compile the sh-elf-gcc properly for stage1.

Although, its also a bit odd that its passing -m4-single-only to the compiler at that point. The way I had things set up (and the way it built on my machine), -ml -m4-single-only is assumed to be the default, so neither of them are needed for the Dreamcast (they're effectively dummy switches).

That is another odd one... With that one, its apparently not picking up on your sh-elf-gcc from stage 1 of building GCC. Try putting the path to the binaries you're building (I'm guessing its /usr/local/dc2011/sh-elf/bin from what I see) in your PATH, and try again.

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum