Setting up the Environment in Windows

Everything related to getting the environment up and running

Setting up the Environment in Windows

Postby Maximus32 on Sat Oct 25, 2008 10:47 am

Here's a small guide to getting Bricks-OS to compile on a Windows host.

1 - First you'll need a subversion client to get your hands on the source code. On windows I am using TortoiseSVN becouse it integrates so nicely into windows, but you can use whatever client you like. The path to the lates source code is:
Code: Select all
https://bricks-os.svn.sourceforge.net/svnroot/bricks-os/trunk


2 - Once you have the source code you'll need to set the BRICKS_ROOT environment variable. The variable points to the root of the Bricks-OS source directory. I will assume you all know where to set an environment variable in windows. You can test if it is set by opening cmd, and typing:
Code: Select all
echo %BRICKS_ROOT%


3 - Create the bin and lib directories for the platform (pc/gba/ps2-ee/...) you want to build. If you don't create these directories the Makefiles won't be able to create the libraries and binaries. This needs to be fixed in the Makefiles someday so they will be created automatically. Example:
Code: Select all
<BRICKS_ROOT>/lib/wii
<BRICKS_ROOT>/bin/wii


4 - Install the compilers. In windows I am using devKitPRO for GBA, NDS, PSP, NGC and Wii. For the PS2 I am using precompiled compilers from the ps2dev website. All are free compiler packages based on GCC.

5 - Compile bricks-os for a specified platform. Open a cmd prompt. Go to the <BRICKS_ROOT> directory. And type:
Code: Select all
make -f Makefile.<platform> clean all

examples:
make -f Makefile.gba clean all
make -f Makefile.nds clean all (NOTE: this compiles both ARM7 and ARM9)
make -f Makefile.ngc clean all
make -f Makefile.wii clean all
make -f Makefile.ps2-ee clean all


You should now have your binary located in <BRICKS_ROOT>/bin/<platform>. On some platforms there are more makefile options, like creating a bootable ISO, or sending the file to the device. These are platform specific so please look into the makefiles (<BRICKS_ROOT>/Makefile.<platform>) for all available build targets.
Consoles: 2x PS1, 3x PS2, 1x PS3, 1x PSP, 1x N64, 2x GameCube, 1x Wii, 4x GBA, 1x DS, 1x DreamCast
Maximus32
Site Admin
 
Posts: 52
Joined: Tue Jul 15, 2008 8:01 pm

Re: Setting up the Environment in Windows

Postby cosmito on Wed Nov 12, 2008 12:30 am

Hi,

Cool project!

I encountered some problems compiling under cygwin.

Code: Select all
$ make -f Makefile.ps2 clean all
/usr/local/ps2dev/bricks-os/include/makeinclude/rules.local.BRICKS:5: *** multiple target patterns.  Stop.
make: *** [clean] Error 2


I set the env variable like :
$ export BRICKS_ROOT=$PS2DEV/bricks-os

I've got same results under MigGW.

Looks something odd with the BRICKS_ROOT variable. If in the files you change from
$(BRICKS_ROOT)/
to
/local/ps2dev/bricks-os/ (supposing it points to the bricks-os sources)

it seems to work.
cosmito
 
Posts: 6
Joined: Wed Nov 12, 2008 12:06 am

Re: Setting up the Environment in Windows

Postby Maximus32 on Wed Nov 12, 2008 8:19 am

Hi,

Thanks for the feedback.

I've only compiled bricks-os using "cmd" in windows. The environment variables I have set in windows (systemproperties->advanced->environmentvariables). Currently my BRICKS_ROOT points to "F:/dev/projects/bricks-os"

I will try using Cygwin/MinGW when I get the time, and update here.

EDIT: I just instaled MinGW+MSYS by following this tutorial. I set my BRICKS_ROOT in /etc/profile as "export BRICKS_ROOT=/home/maximus32/dev/projects/bricks-os". I was able to compile the PS2 version without problems "make -f Makefile.ps2-ee clean all". Note that I use the ps2-ee Makefile, becouse the IOP version is not supported yet (Makefile.ps2 = ee+iop).
Consoles: 2x PS1, 3x PS2, 1x PS3, 1x PSP, 1x N64, 2x GameCube, 1x Wii, 4x GBA, 1x DS, 1x DreamCast
Maximus32
Site Admin
 
Posts: 52
Joined: Tue Jul 15, 2008 8:01 pm

Re: Setting up the Environment in Windows

Postby cosmito on Wed Nov 12, 2008 10:09 pm

This is odd... I'm trying MinGW like you did and even after adding the export command to the .profile (previously I typed it on the console - the result should be the same) I keep getting the error :

/usr/local/ps2dev/bricks-os/include/makeinclude/rules.local.BRICKS:5: *** multiple target patterns. Stop.

The only difference I see from you is that I have the project under the /usr/local/ and not the /home/ but this doesn't look relevant... Is it?
Once again Linux things calls me stupid :)

I'm going to try on a real Linux soon.
cosmito
 
Posts: 6
Joined: Wed Nov 12, 2008 12:06 am

Re: Setting up the Environment in Windows

Postby Maximus32 on Thu Nov 13, 2008 8:19 am

I have made some changes to the makefiles recently, are you using the latest version of the source? NOTE: If you update now you will update EVERY file, becouse I added GPL copyright headers.
Consoles: 2x PS1, 3x PS2, 1x PS3, 1x PSP, 1x N64, 2x GameCube, 1x Wii, 4x GBA, 1x DS, 1x DreamCast
Maximus32
Site Admin
 
Posts: 52
Joined: Tue Jul 15, 2008 8:01 pm

Re: Setting up the Environment in Windows

Postby cosmito on Thu Nov 13, 2008 9:49 pm

I updated the sources now but I've got the same error. I'll came back to it later...
cosmito
 
Posts: 6
Joined: Wed Nov 12, 2008 12:06 am

Re: Setting up the Environment in Windows

Postby Maximus32 on Thu Nov 13, 2008 10:48 pm

rules.local.BRICKS:5:
Code: Select all
all.local: $(MY_OBJS) $(MY_OBJ) $(MY_LIB) $(MY_ELF)

The only thing wrong here could be the BRICKS_ROOT (used by MY_OBJ, MY_LIB and MY_ELF)

I think perhaps it has something to with using backslashes, instead of forwardslashes in your BRICKS_ROOT. Could you check the value of your BRICKS_ROOT? Or perhaps it has something to do with the "make" you're using. Mixing Linux with Windows path names is tricky:

Windows make does not understand /c/home/...
Linux make does not understand C:\blabla\...
Consoles: 2x PS1, 3x PS2, 1x PS3, 1x PSP, 1x N64, 2x GameCube, 1x Wii, 4x GBA, 1x DS, 1x DreamCast
Maximus32
Site Admin
 
Posts: 52
Joined: Tue Jul 15, 2008 8:01 pm


Return to Installing & Compiling

Who is online

Users browsing this forum: No registered users and 1 guest

cron